diff options
Diffstat (limited to 'ospf6d')
38 files changed, 499 insertions, 1690 deletions
diff --git a/ospf6d/.gitignore b/ospf6d/.gitignore new file mode 100644 index 00000000..3fef0b78 --- /dev/null +++ b/ospf6d/.gitignore @@ -0,0 +1,18 @@ +Makefile.in +Makefile +*.o +*.patch +ospf6d +ospf6d.conf +tags +TAGS +.deps +.nfs* +*.lo +*.la +*.libs +.arch-inventory +.arch-ids +*~ +*.loT +*.a diff --git a/ospf6d/ChangeLog b/ospf6d/ChangeLog deleted file mode 100644 index f4ad9283..00000000 --- a/ospf6d/ChangeLog +++ /dev/null @@ -1,1199 +0,0 @@ -2007-10-22 Phil Spagnolo <phillip.a.spagnolo@boeing.com> - - * ospf6_asbr.c: (ospf6_asbr_lsentry_remove) Remove shortcut - of LSDB search - it's based on assumption non-BEST routes - can't have ASBR routes, which appears to be wrong. Safest to - search. - -2007-06-07 Pavol Rusnak <prusnak@suse.cz> - - * ospf6_lsa.c: (no_debug_ospf6_lsa_hex_cmd) Fix bug: must use strcmp - to compare strings. - -2007-04-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_snmp.c: (ospfv3AreaEntry, ospfv3AreaLsdbEntry) Fix some - zlog_debug printf formats to work with 64-bit size_t. - -2007-03-08 David Siebörger d.sieborger@ru.ac.za - - * ospf6_neighbor.c: (ospf6_neighbor_show) Fix bug #322, ospf6d - wasn't updated to match thread times changing to relative - time. - -2007-02-27 Pavol Rusnak <prusnak@suse.cz> - - * ospf6_lsa.c: (ospf6_lsa_handler_name) Fix bug: must use strcmp - to compare strings. - -2007-02-02 Greg Troxel <Greg Troxel <gdt@ir.bbn.com>> - - * ospf6d.h: remove declaration of errno (should be via header) - -2006-03-01 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: fix bug of needless forwarding address - * ospf6d.h: version 0.9.7r - -2006-02-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * valgrind check and memory fix - * route table identification string added - * ospf6d.h: version 0.9.7q - -2005-10-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_neighbor.c: add the calling of ospf6_maxage_remove () - when the neighbor went out of Exchange/Loading. - -2005-10-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: fix bug of calculating AS-External routes - in other areas. Add debugging function for border-router - calculation. - * ospf6d.h: version 0.9.7p - -2005-10-01 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_asbr.c: Remove local hard-coded tables zroute_name and - zroute_abname. Change the ZROUTE_NAME macro to use new library - function zebra_route_string(). Remove the ZROUTE_ABNAME macro. - (ospf6_asbr_external_route_show): Replace ZROUTE_ABNAME() with - a call to zebra_route_char(), and be sure to fix the format string, - since we now have a char instead of a char *. - * ospf6_zebra.c: Remove local hard-coded tables zebra_route_name and - zebra_route_abname. Note that the zebra_route_name[] table - contained mixed-case strings, whereas the zebra_route_string() - function returns lower-case strings. - (ospf6_zebra_read_ipv6): Change debug message to use new library - function zebra_route_string() instead of zebra_route_name[]. - (show_zebra): Use new library function zebra_route_string() instead - of zebra_route_name[]. - -2005-08-09 Paul Jakma <paul.jakma@sun.com> - - * ospf6_asbr.c: (ospf6_asbr_redistribute_add) Fix sense of testing - of route_map_apply return code, it can return many things other - than RMAP_MATCH which do not indicate DENY. Should test explicitly - for equality to RMAP_DENYMATCH instead. - -2005-06-24 Harald Welte <laforge@gnumonks.org> - - * ospf6_abr.[ch], ospf6_area.[ch]: Add area filter-list (in|out) - support and area import and export lists support. - -2005-06-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_message.c: Changed to be insensitive to changes of neighbors' - IP source address in the OSPF packets. It was sometimes problematic - in actual operation (needed some operational cost: restarting - all-neighbor routers when I/F NIC was changed). Due to this change, - a previously safe case, attaching multiple interface to the same - link will now be dengerous and will not work. Remedy to that should - be applied later. - -2005-06-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_interface.c: fix the way inactivity_timer is called. Because - inactivity_timer() deletes the neighbor from the neighbor_list, it - cannot be called by thread_execute() from inner side of the - neighbor_list for-loop. - -2005-05-31 Hasso Tepper <hasso at quagga.net> - - * ospf6d.c: No need for double ';'. Fixes parsing "show ipv6 ospf6 - database ..." commands for vtysh by extract.pl. Remove duplicate - install_element calls. - -2005-04-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_zebra.c (ospf6_zebra_redistribute, ospf6_zebra_no_redistribute): - Change 2nd arg to zebra_redistribute_send from zclient->sock - to zclient. - -2005-04-07 Paul Jakma <paul@dishone.st> - - * (global) Fix up list loops to match changes in lib/linklist, - and some basic auditing of usage. - * ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single - scan of the area list, rather than scanning all areas first for - INTER_ROUTER and then again for INTER_NETWORK. According to - 16.2, the scan should be area specific anyway, and further - ospf6d does not seem to implement 16.3 anyway. - -2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_interface.[ch]: (ospf6_interface_lookup_by_name) Remove unused - function. - -2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_zebra.c: (ospf6_zebra_if_del) Previously, this whole function - was commented out. But this is not safe: we should at least update - the ifindex when the interface is deleted. So the new version - updates the interface status and sets ifp->ifindex to - IFINDEX_INTERNAL. - (ospf6_zebra_route_update) Use if_indextoname properly. - -2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_route.c: (ospf6_route_show, ospf6_route_show_detail) Protect - against the possibility that the string returned by if_indextoname - may not terminate with '\0'. - -2005-03-02 Vincent Jardin <Vincent.Jardin@6wind.com> - - * ospf6_zebra.c: Fix core dump when router-id is provided with - an empty ospf6d.conf file (no context router ospf6) because - ospf6_create has not been called yet. - -2005-01-25 Paul Jakma <paul@dishone.st> - - * ospf6_asbr.c: Add "hsls" to the zroute_name const char array. - -2004-12-24 Hasso Tepper <hasso at quagga.net> - - * *.c: Change level of debug messages to LOG_DEBUG. - -2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_main.c: (main) The 2nd argument to openzlog has been removed. - Note that stdout logging will no longer be enabled by default when - not running as a daemon. - -2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu> - - * ospf6_main.c: (sigint,sigterm) Use zlog_notice for termination - message. - (main) Remove commented-out call to pid_output_lock (which should - never be called other than from inside pid_output). And use - zlog_notice to print the startup message, which now includes - the vty port. - -2004-11-26 Hasso Tepper <hasso at quagga.net> - - * ospf6_snmp.c: Fix compile: listnode -> struct listnode *. - -2004-11-25 Hasso Tepper <hasso at quagga.net> - - * ospf6_main.c: Make group to run as configurable. - -2004-11-05 Phil Spagnolo <phillip.a.spagnolo@boeing.com> - * ospf6_flood.c: When adding a thread to retransmit an lsa after - rxmt_interval, the ospf6d used thread_add_event(). However, - thread_add_event() executes immediately and ignores the delay parameter. - This was causing unnecesary unicast LSU sends. Adding the thread has - been changed to use thread_add_timer() which will expire after delay. - After the fix results appear consistent with expectation. - -2004-10-12 Hasso Tepper <hasso at quagga.net> - - * ospf6_snmp.c: Remove defaults used to initialize smux connection to - snmpd. Connection is initialized only if smux peer is configured. - -2004-10-11 Hasso Tepper <hasso at quagga.net> - - * osp6_top.c, ospf6_top.h: Better handling for router-id. If we use - common one, don't output it into configuration - only statically - configured one. - -2004-10-10 Paul Jakma <paul@dishone.st> - - * Makefile.am: fix listing of ospf_snmp.c in noinst_HEADERS - * ospf6_route.c: Add const qualifier to various char arrays of - constants. signed/unsigned fixes. - (ospf6_linkstate_table_show) argv is const - * ospf6_snmp.c: listnode typedef is dead. - (ospf6_snmp_init) Take struct thread_master arg, needed for - smux_init. - * ospf6_snmp.h: update ospf6_snmp_init declaration. - * ospf6d.c: (ospf6_init) add const qualifier to sargv, pass master - to ospf_snmp6_init. - * ospf6_asbr.c: const char update. - * ospf6_interface.c: ditto, plus signed/unsigned fixes. - (ipv6_ospf6_cost) Check whether cost fits in u_int32_t and use - strtoul. - * ospf6_intra.c: const char update. Parenthesise expression. - * ospf6_lsa.c: signed/unsigned and const char updates. - * ospf6_proto.c: ditto. - * ospf6_message.c: ditto. - * ospf6_lsdb.c: signed/unsigned update. - * ospf6_main.c: const char update. - * ospf6_neighbor.c: ditto. - * ospf6_spf.c: ditto. - * ospf6_top.c: ditto. - -2004-10-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_snmp.c: add partial support for SNMP - (i.e. ospfv3AreaLsdbTable). - * OSPFv3-MIB.txt: Net-SNMP translate Unsigned32 range - (0..'FFFFFFFF'h) incorrectly to (0..-1). Those parts for - Unsigned32 range are changed to (0..4294967295). - Also, doubtful 'not-accessible's are changed to read-only. - -2004-10-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_snmp.[ch], OSPFV3-MIB.txt: start supporting SNMP. - it follows draft-ietf-ospf-ospfv3-mib-08.txt, but change - OSPFv3 tree to {experimental 102} based on - http://www.iana.org/assignments/smi-numbers: - Prefix: iso.org.dod.internet.experimental (1.3.6.1.3.) - 102 OSPFv3 OSPF for IPv6 [Joyal] - -2004-10-03 Hasso Tepper <hasso at quagga.net> - - * ospf6_zebra.c: Use router id from zebra daemon if it wasn't set in - configuration. - -2004-09-25 Hasso Tepper <hasso at estpak.ee> - - * ospf6_asbr.c, ospf6_lsa.c, ospf6_proto.c, ospf6_proto.h: Fix - compiler warnings. - -2004-09-23 Hasso Tepper <hasso at quagga.net> - - * *.[c|h]: list -> struct list *, listnode -> struct listnode *. - -2004-09-13 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_intra.c, ospf6_route.[ch]: try to fix assertion failure - in brouter's route_remove - * ospf6d.h: version 0.9.7o - -2004-09-12 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.c: route_count_assert bug fix - * ospf6d.h: version 0.9.7n - -2004-09-03 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_area.c, ospf6_route.c, ospf6_top.c, ospf6d.c: - "show intra-route" function and "show SPF result" function is - changed. - * ospf6_neighbor.c: Changed to update stub intra-prefix origination - when it is not DR. - * ospf6_route.h: resolv conflict between best flag and - active-summary flag. - * ospf6d.h: version 0.9.7m - -2004-09-02 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: E-bit check in examining AS-External-LSA - * ospf6_abr.c: E-bit set in receiving Inter-Area-Router-LSA - -2004-09-02 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * *.[ch]: Logging LSAs of particular type is added. - lsa_handler is now using vector in order to adjust - existing LSA modules. - * ospf6d.h: version 0.9.7l - -2004-08-28 Hasso Tepper <hasso at quagga.net> - - * ospf6_main.c: Modify for sigevents. - -2004-08-26 Hasso Tepper <hasso@estpak.ee> - - * ospf6_interface.c, ospf6_top.c, ospf6d.c: for vtysh. - -2004-08-19 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: Bug in ASBR check fixed. - * ospf6d.h: version 0.9.7k - -2004-08-19 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: Bug in AS-External Origination fixed. - * ospf6d.h: version 0.9.7j - -2004-08-15 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * *.c: Area support almost done. (almost ! ;p) - * ospf6d.h: version 0.9.7i - -2004-08-15 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_message.c: Bug cause BadLSReq is fixed. - * ospf6_abr.c: Border Router check. - * ospf6d.h: version 0.9.7h - -2004-08-14 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_area.[ch], ospf6_abr.[ch]: area range, - border-routers, Inter-Area-Router-LSA origination - * ospf6d.h: version 0.9.7g - -2004-08-12 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * *.[c,h]: LSA refreshing is changed and cleaned up. - * ospf6d.h: version 0.9.7f - -2004-08-01 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_abr.[ch]: add files for abr function. - * *.c: VTY_NEWLINE -> VNL - * ospf6d.h: version 0.9.7e - show database functions are rewritten. - -2004-07-23 Hasso Tepper <hasso@estpak.ee> - - * ospf6_interface.c, ospf6_zebra.c: use ifp->mtu6 instead of - ifp->mtu. - -2004-07-23 Paul Jakma <paul@dishone.st> - - * ospf6_main.c: Delete LOG_PERROR, not portable. - * ospf6_network.c: (ospf6_set_pktinfo) use setsockopt_ipv6_pktinfo - -2004-07-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_message.c, ospf6_interface.c: add a command to configure - ospf6 ifmtu on a interface. - * ospf6d.h: version 0.9.7d - -2004-05-18 Hasso Tepper <hasso@estpak.ee> - - * *.*: Merge rewritten ospf6d from Zebra repository. - * ospf6_network.c, ospf6_main.c: Merged privs stuff back in. - * ospf6_zebra.c: Sync back to zclient changes. - * ospf6_asbr.c: Added isis to the routings list. - * ospf6_main.c: "version.h" -> <lib/version.h> - -2004-05-17 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_flood.[ch], ospf6_lsa.[ch], ospf6_lsdb.h, ospf6_message.c - ospf6_neighbor.c: Fix crash bug and change the way to count - how many neighbors include paticular LSA on its retrans-list. - * ospf6d.h: version 0.9.7c - -2004-05-03 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_message.[ch], ospf6_interface.c: adjust send/recv buffer - size to interface MTUs. - * ospf6d.h: version 0.9.7b - -2003-08-18 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * *.[ch]: rewrite all source code from scratch - * ospf6d.h: version 0.9.7 - -2003-08-11 Taisuke Sasaki <sasaki@soft.net.fujitsu.co.jp> - - * ospf6_ism.c: DR Election bug fix. - -2003-04-25 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: AS-External LSA refresh was based on the - prefix of the obsolete LSA. It was wrong so fixed. - * version: 0.9.6p - -2002-11-09 Vincent Jardin <jardin@6wind.com> - - * ospf6_interface.c: update link-local address on interface creation. - -2002-11-09 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: apply MinLSInterval to AS-External-LSA origination. - * ospf6_lsa.c: change not to issue flooding caused by expire event - when the received LSA is (already) MaxAge. - * ospf6_spf.c: fix a bug which is that ospf6d calculates - wrong nexthop when failed to find Link-LSA for the neighbor. - * ospf6_damp.c ospf6_dbex.c ospf6_neighbor.c ospf6_spf.c: - some clean up - * version: 0.9.6o - -2002-10-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: bug of failing ASE lsa refresh fixed. - * version: 0.9.6n - -2002-10-01 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: AS-External-LSA origination function - is re-written. - * ospf6_damp.[ch]: New feature that damps flaps is added. - * version: 0.9.6m - -2002-07-14 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_spf.c: unwanted assert() in ospf6_spf_nexthop_calculation() - is deleted. - * version: 0.9.6l - -2002-07-14 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dbex.c: bug that ospf6d fails to refresh self-originated - LSA if he have not the LSA before has been fixed. - * ospf6_asbr.c: bug of failing removing ASE LSA when remove - message arrived from zebra has been fixed. - * version: 0.9.6k - -2002-07-13 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_zebra.c: bug reported [zebra 14642] fixed. - The bug was related to the synchronization between zebra - and ospf6d. Now synchronization will be correctly done. - * version: 0.9.6j - -2002-07-07 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsdb.c: bug fixed in ospf6_lsdb_type_router (). - * ospf6_dbex.c: because of retrans list structure changed - due to LSDB change, removal of old instance from retrans-list - is not necessary anymore. this caused crash but now fixed. - * version: 0.9.6i - -2002-07-07 Kunihiro Ishiguro <kunihiro@ipinfusion.com> - - * zebra-0.93 released. - -2002-07-07 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsdb.c: entirely rewritten. now ospf6d uses - radix tree by using lib/table.[ch] for LSDB lookup. - * ospf6_abr.c, ospf6_asbr.c, ospf6_intra.c: hook changed - due to rewriting of lsdb module. - * ospf6_neighbor.c: lack of check existence and find correct - instance of the LSA which is going to be removed from neighbor's - retransmission was filled. - * version: 0.9.6h - -2002-07-07 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_intra.c: bug fix for Intra-route deletion. - * ospf6_route.c: bug fix for path comparison. - * version: 0.9.6g - -2002-06-28 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.c: some logs trying to find the situation - when assert occur are added. route duration statistics - added. - * ospf6_zebra.c: trying to fix the problem reported by - [zebra 14318] but not yet sure. - * version: 0.9.6f - -2002-06-25 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_intra.c: new file for management of intra-prefix LSA. - * ospf6_abr.c: inter area route calculation code added. - * version: 0.9.6e - -2002-06-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.c: All AS-External route was removed when - one of the ASBR path was gone, but the route from other ASBR - path should stay remained. this bug is fixed. - * version: 0.9.6d - -2002-06-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.c: route table calculation bug fixed. [zebra 14105] - * ospf6_spf.c, ospf6_route.c, etc.: log message cleaned up. - * version: 0.9.6c - -2002-04-27 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.c: [zebra 13514] bug fix. - thanks to Harald Koch. - * version: 0.9.6b - -2002-04-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dump.c: fix bug of log function - * ospf6_area.c: fix bug of intra route deletion - * version: 0.9.6a - -2002-04-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * merged with "current" version. - * version: 0.9.6 - -2001-03-11 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsdb.c ospf6_spf.c: log message changed for debug. - -2001-02-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * version: 0.9.5i - - * ospf6_asbr.c: Added code that finds alternative - AS-External route when remove AS-External route. - This is temporary fix ... - - * ospf6_redistribute.c: remove redistributed routes - immediately when 'no redistribute ...' - -2001-02-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * version: 0.9.5h - - * ospf6_spf.c, ospf6_lsa.c: Change to originate Link-LSA on - point-to-point links. - - * ospf6_message.c: Bug of log messages of self-originated - Hello packet fixed. - -2001-02-09 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * version: 0.9.5g - * ospf6_asbr.c: fix for the bug that AS-External route - is not get removed. - -2001-02-09 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsdb.c: crash bug while receiving wrong LSA scope bit - has been temporarily fixed - -2001-12-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_asbr.[ch]: The byte order bug in encoding/decoding - the bits/metric field in AS-External-LSA fixed. - Fixed to update E-bit in Router-LSA of itself. - Reported by Taisuke Sasaki ([zebra 11548]). - - * README: updated. - - * version: 0.9.5f - -2001-11-21 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_prefix.c: Intra-prefix-LSA bug fixed. - * ospf6_abr.[ch]: added (only just placeholder yet) - -2001-11-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.c: fix to overwrite a prefix when another - addition to the prefix is given. freeze function changed - not to remove routes by default. - - * version: 0.9.5e - -2001-11-19 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * version: 0.9.5d - - * ospf6_lsa.c ospf6_spf.c: SPF Calculations are now - scheduled by hook. - - * ospf6_route.c: ospf6_route_add bug fix, - ospf6_route_remove_all corrected. - -2001-11-15 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_hook.[ch]: added. - * Almost half of the code has been rewritten. - especially, ospf6_route.[ch]. Hook call has been injected - much. - * ospf6_asbr.[ch]: added. - -2001-10-17 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dbex.c: ospf6d was wrong to omit reoriginating - of LSA when the self-originated LSA was received from others. - fixed. - * ospf6d.h: version: 0.9.5c - -2001-10-16 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsa.c: 'force-prefix' was not executed. fixed. - * ospf6d.h: version: 0.9.5b - -2001-10-13 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_interface.c: 'passive-interface' is now moved to - 'ipv6 ospf6 passive' in INTERFACE NODE. 'prefix-list' which - specifies the filter prefix for connected address prefix also - moved to INTERFACE NODE as 'ipv6 ospf6 advertise prefix-list WORD'. - The old obsoleted commands are still acceptable though. New command - 'ipv6 ospf6 advertise force-prefix' added, which which tells ospf6d - to advertise rather prefix than stub local-address even on loopback - or pointopoint interfaces. - - * ospf6_dump.c: 'ospf6 debug hello' -> 'ospf6 debug message hello'. - same for other message type. The older is still acceptable. - - * ospf6_lsa.c: Changed AS-External generation to new one which uses - LSA hooks. Delete old garbage. - -2001-10-02 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6d.c: turn off and turn on sequence with - 'no interface' 'interface' cmds was not work. fixed. - - * ospf6_lsa.c: generating Intra-Area-Prefix-LSA for stub - did not care duplicate prefixes. fixed. - -2001-09-07 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_message.c: There was a bug that prevent LSDB - to syncronize. It was a DbDesc packet bug that Slave - sends two different DbDesc packet on the same sequence - number. This cause many LSAs are dropped when Exchanging - LSDB, because the latter DbDesc packet that have the same - sequence number will be ignored as duplicate packet. - This seems to be exist at least before 0.9.4 version. - Now this is the most stable candidate. - - * ospf6d.h: version 0.9.5a - -2001-09-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_zebra.c ospf6_spf.c ospf6_lsa.c : - delete nexthop check to certify the nexthop is Link-local address. - Suppress Link-LSA origination on links other than Broadcast. - SPF's nexthop calculation first checks linklocal address - in Link-LSA, then checks source address of neighbor's packets. - - * ospf6_interface.c ospf6_ism.c ospf6_lsa.c ospf6_nsm.c: - intra-area-prefix-lsa origination func moved to new one. - - * ospf6_interface.h ospf6d.[ch] ospf6_lsa.c: - interface_area_cmd now changed to have 'passive' - and 'prefix-list' option. - - * ospf6_prefix.c: - clean up. - -2001-09-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dbex.c ospf6_interface.c ospf6_ism.c ospf6_lsa.[ch]: - clean up and new LSA origination functions added. - - * ospf6_route.c ospf6_lsdb.c: make vty function more - clean/understandable. - - * ospf6d.h: version 0.9.5 - -2001-08-24 Kunihiro Ishiguro <kunihiro@ipinfusion.com> - - * ospf6_lsdb.c: Use IS_LSA_MAXAGE macro instead of - ospf6_lsa_is_maxage. - - * ospf6_lsa.h (IS_LSA_MAXAGE): Add new macro to check MaxAge. - -2001-08-21 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsdb.c: if There's no previous prefix - ospf6d was wrongly not calculate the prefix. - this reported by (v6 16029) is fixed. - - * ospf6_neighbor.c: Instance of LSA Summary included - in DbDesc packet was wrongly freed. The bug cause - malformed DbDesc, ExChange <-> ExStart flapping, - and then crash. - - * ospf6d.h: version 0.9.4 - -2001-08-21 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.[ch]: Showing format is changed. - 'show ipv6 route ospf6' -> 'show ipv6 ospf6 route' - 'show ipv6 route ospf6 external' -> - 'show ipv6 ospf6 route redistribute' - - * ospf6_lsdb.c ospf6_lsa.c ospf6_neighbor.c ospf6_interface.c: - memory leak in LS list fixed. - - * all: clean up - - * ospf6d.h: version 0.9.3 - -2001-08-20 Kunihiro Ishiguro <kunihiro@ipinfusion.com> - - * ospf6d.c (ospf6_timeval_sub_equal): Remove function. - - * ospf6_spf.c (ospf6_timeval_cmp): Rewrite ospf6_timeval_cmp(). - (ospf6_timeval_add_equal): Function moved from ospf6d.c - -2001-08-19 Kunihiro Ishiguro <kunihiro@ipinfusion.com> - - * zebra-0.92a released. - -2001-08-15 Kunihiro Ishiguro <kunihiro@ipinfusion.com> - - * zebra-0.92 released. - -2001-08-09 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsdb.c ospf6_neighbor.c: - LSDB function/structure and LS list function has been rewritten. - memory leak has been decreased. - - * ospf6_lsa.[ch] ospf6_dbex.c: garbage code has been deleted. - - * ospf6d.h: version 0.9.2 - -2001-08-07 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dbex.c ospf6_lsdb.c: - Retransmition list had a critical bug that breaks LSDB - synchronization. When new LSA be added to retrans-list, - old must be removed, but it was not. So new LSA dropped, - and LSA Acknowledgement did not work. The bug was fixed. - - * ospf6d.h: version 0.9.1 - -2001-06-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_spf.c: crash bug fix in temporary treat code for - Router-LSA whose LS-ID != 0 - - * ospf6_dbex.c: RFC2328 13.(4) was wrongly coded. - (4) Else if the LSA's LS age is equal to MaxAge, and there is - currently *NO* instance of the LSA in the router's link state - ... - - * ospf6_lsa.c: RFC2328 13.1 checksum tie breaker - had been neglected, and has just added now. - - * ospf6d.h: version 0.9.0 - ospf6d expected to work with hitachi gr2000 from these fixes. - -2001-06-12 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsa.c: Fix bug in creating Intra-Area-Prefix-LSA. - DR was mis-include others prefixes advertised by their Link-LSA. - - * ospf6_route.c: Fix bug in calculating intra area routes. - Not all prefixes in Intra-Area-Prefix-LSA was calculated. - - * ospf6_spf.c: - Changed to quit when a error occured in calculating SPF tree. - Very messy hack for the bug reported by [zebra 8807]. This - is not tested yet. - Changed to quit SPF calculation when a nexthop calculation - errors. - - * ospf6_zebra.c: - Support for interface address deletion. - - * ospf6d.h: - version: 0.8.y - -2001-04-18 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6d.h - Due to previous change (DR Election algorithm changed), - backward compatibility will be lost from this version. - version: 0.8.x - -2001-04-18 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_message.c ospf6_ism.c: - Bug of router_id comparison - -2001-04-17 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dbex.c: ospf6_dbex_is_maxage_to_be_dropped() had - some bug causing Loading state lasts long. - version: 0.8.v - -2001-04-08 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.c: BUG in AS-External route calculation fixed. - It was using OLD LSDB... - Version: 0.8.u- - -2001-04-08 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_area.c, ospf6_dbex.c, ospf6_interface.c, - ospf6_lsa.c, ospf6_lsdb.c, ospf6_lsdb.h, ospf6_message.c, - ospf6_neighbor.c, ospf6_neighbor.h, ospf6_nsm.c, - ospf6_redistribute.c, ospf6_route.c, ospf6_spf.c: - Delete old LSDB function. - - * ospf6d.h: - Version: 0.8.u - -2001-04-05 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_area.c, ospf6_area.h, ospf6_dbex.c, ospf6_interface.c, - ospf6_interface.h, ospf6_lsa.c, ospf6_lsdb.c, ospf6_lsdb.h, - ospf6_message.c, ospf6_nsm.c, ospf6_redistribute.c, ospf6_route.c, - ospf6_spf.c, ospf6_top.c, ospf6_top.h, ospf6d.h: - Changed to use New LSDB. - Version: 0.8.t - -2001-04-02 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsa.c: - Interface stub check in Intra-Area-Prefix-LSA origination - was wrong. - fixed. - - * ospf6_area.h, ospf6_dbex.c, ospf6_interface.c, - ospf6_interface.h, ospf6_lsa.c, ospf6_lsa.h, ospf6_lsdb.c, - ospf6_message.c, ospf6_neighbor.c, ospf6_nsm.c, - ospf6_redistribute.c, ospf6_top.c, ospf6_top.h, ospf6d.c: - New LSDB functions, but not changed to be used. - - * ospf6d.h: - Version: 0.8.s - -2001-03-28 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_area.c ospf6_area.h ospf6_dbex.c ospf6_dump.c - ospf6_interface.c ospf6_interface.h ospf6_lsa.c - ospf6_message.c ospf6_redistribute.c ospf6_spf.c ospf6_top.c - ospf6_top.h ospf6_zebra.c ospf6d.c ospf6d.h: cleaning. - -2001-03-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6d.h: - version: 0.8.r - - * ospf6_neighbor.[ch], ospf6_lsa.[ch]: - just clean up and log clearify. - - * ospf6_message.[ch]: - Packet receiving function and dumping OSPFv3 packet has been - changed simple and clean. - - * ospf6_dbex.[ch], ospf6_interface.[ch], ospf6_lsdb.[ch], - ospf6_neighbor.[ch], ospf6_nsm.[ch]: - LSList(i.e. summary list, request list, retrans list, etc) have - been rewritten based on new LSDB module. The main LSDB have not - yet shifted to this new module, but will shift eventually. - This change expected to resolve the problem that the ospf6d keeps - on sending redundant LSUpdate/LSAck. - - * ospf6_interface.c: changed default MTU from 1500 to 1280. - It was possible that the ospf6d could not send packet (e.g. - LSUpdate in response to LSReq in my case) when the packet - size accidentally reached near 1500 (I was forget about IP - header :p). It is a bit illegal to set MTU 1280 constantly, - but I failed once with I/F MTU from kernel (through zebra), - and thinks that 1280 is more stable than kernel variable. - Comments will be appriciated. - -2001-03-15 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dbex.c, ospf6_interface.c, ospf6_ism.c, ospf6_lsdb.[ch], - ospf6_neighbor.c, ospf6_spf.c, ospf6d.c: - Fix for crash. ospf6d has ever been crashing when - 'no interface' command executed, and when starting up with - the configuration which does not include 'router ospf6'. - these has been fixed. - -2001-02-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsa.c, ospf6_message.c: - LSA summary (exchanged while Adjacency bring up) may expire - (may reach MaxAge). Handling this has been added but - it's a little bit quick hack. - - * ospf6_message.c: - Thread chain bug fixed. Read network thread chain has been cut - when receive packets on not-enabled interface. this was wrong - and fixed. - -2001-02-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_message.c: - I/F MTU check part on sending packet had some bug, and it's fixed. - Ospf6d has believed a value from zebra as I/F MTU, but from now - I/F MTU is set to constant 1500. This is workaround for ATM. - -2001-02-01 Kunihiro Ishiguro <kunihiro@zebra.org> - - * zebra-0.91 is released. - -2001-01-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * just code clean up of almost all module. - * ospf6_dump.c, ospf6_lsa.c: file dependency. - * ospf6_mesg.[ch]: changed filename to ospf6_message.[ch] - -2001-01-09 Kunihiro Ishiguro <kunihiro@zebra.org> - - * zebra-0.90 is released. - -2001-01-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_mesg.c,ospf6_lsa.c: doubly cancel thread bug fixed. - version 0.8.k CRASHed for this. - * ospf6_lsa.c: bug of logging fixed. - version: 0.8.l - -2001-01-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_neighbor.c: fix typo when trying to delete - MaxAge AS-External LSA. MaxAge LSA remaining bug is expected - to be fixed. - version: 0.8.k - -2001-01-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_mesg.c: add I/F Mtu check for sending LS Update. - - * ospf6_dbex.c, ospf6_mesg.c, ospf6_neighbor.c, ospf6_neighbor.h, - ospf6_spf.c: Changed type of hisaddr field in ospf6_neighbor - structure, from sockaddr_in6 to in6_addr. No protocol/processing - changed. - -2001-01-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_mesg.c, ospf6_neighbor.[ch]: Speed up of - Database Exchange. - version: 0.8.j - - Because the LS Request list was checked only when attempt - to send (retransmit) LS Request packet, Loading state lasted - long (for RxmtInterval) unexpectedly. This was fixed; LS Request - packet will be send as soon as one received a LS Update packet. - -2001-01-01 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6d.h (OSPF6_VTYSH_PATH): Change "/tmp/ospf6d" to - /tmp/.ospf6d". - -2000-12-29 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dump.[ch]: simplified. - -2000-12-19 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_route.c: Fix bug of using unavailable route. - version: 0.8.d - -2000-11-30 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_spf.c: calculate statistics. version: 0.8.d - -2000-11-26 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_mesg.c, ospf6_nsm.c: LSDB sync bug fixed. - version: 0.8.c - -2000-11-26 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_dbex.c: Start debugging and cleaning. - - * ospf6_area.c, ospf6_dbex.c, ospf6_interface.c, ospf6_lsa.c, - ospf6_proto.c, ospf6_top.c: add some function to clarify codes. - -2000-11-26 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_spf.c: Delete old garbage (which was enclosed by #if 0) - - * ospf6_redistribute.c: "redistribute ospf6" was generated in - "router ospf6" in config file. It is a bug, and fixed. - wrong warning message was deleted. - - * ospf6_main.c: If daemon mode, ospf6d was silent even if - the config file was wrong. It is a bug, and fixed. - - * ospf6_route.c, ospf6_zebra.c: Zebra syncronization method - has been changed. delete garbages. allow nexthop of :: in case - of connected route. - - * ospf6_dbex.c: Delete annoying log messages. - - * ospf6_lsa.c: Changed string for LSA log. - -2000-11-21 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_spf.c: some careless bug fixed. - - * ospf6_route.c: changed not to send garbage route - whose nexthop is not linklocal address. - -2000-11-09 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_rtable.c: renamed to ospf6_route.c - whole functionality has been rewritten as new code. - new functions not yet installs routes; the old - functions still remains. cleaning log messages. - - * ospf6_spf.c: whole functionality has been rewritten - as new code. new command "show ipv6 ospf6 spf node", - "show ipv6 ospf6 spf tree", "show ipv6 ospf6 spf table" - has been added. Memory leak was fixed. cleaning log messages. - - * ospf6d version: 0.7.c - -2000-10-02 Kunihiro Ishiguro <kunihiro@zebra.org> - - * zebra-0.89 is released. - -2000-09-10 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_lsdb.c (ospf6_lsdb_remove_maxage_lsa): Fix compile - warnings. - -2000-08-17 Kunihiro Ishiguro <kunihiro@zebra.org> - - * zebra-0.88 is released. - -2000-08-06 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_rtable.h (struct ospf6_nexthop): Change ifindex type from - unsigned long to unsigned int. - -2000-04-28 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6d.h: Include some headers for avoid warning. - - * ospf6_routemap.h: Add newfile. - -1999-11-21 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_network.c: Respect IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP - rather than RFC2133. - -1999-10-21 Jun-ichiro itojun Hagino <itojun@itojun.org> - - * ospf6_network.c (ospf6_ipv6_decode_ipv4): Fix bug of conversion - from IPv4 Mapped Address to IPv4 address. - -1999-08-08 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_lsa.c (construct_link_lsa): Enclose KAME specific part by - #ifdef/#endif. - -1999-07-29 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_mesg.c: add new message process function. - -1999-07-25 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_main.c (sighup): Call of log_rotate() removed. - -1999-07-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - ospf6_dbex.{c,h}: variable "acknowledge" has been deleted. - -1999-07-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * *.{c,h}: lsa data structure has been drastically - changed. - -1999-07-16 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * *.{c,h}: bug of updating LSA's which is self - originated has been fixed. - -1999-07-14 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * *.{c,h} : log clean up. - -1999-07-05 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6d.c (ospf6_init): Change to use install_default. - -1999-07-03 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_rtable.c (nexthop_*): added some function that handles - new nexthop structure. - -1999-07-01 Rick Payne <rickp@rossfell.co.uk> - - * ospf6_zebra.c (ospf6_zebra_init): Install standard commands to - ZEBRA_NODE. - -1999-06-09 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_rtable.h: added for new routing table of ospf6d - -1999-05-14 Stephen R. van den Berg <srb@cuci.nl> - - * ospf6_main.c (signal_init): SIGTERM call sigint. - (sigint): Loggging more better message. - -1999-05-13 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - *ospf6_spf.c (get_prefix_lsa_of_vertex): bug fix about network vertex. - -1999-05-08 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_network.c (send_linkstate_ack): Check HAVE_SIN6_SCOPE_ID - is defined. - * ospf6_mesg.c (make_hello): Likewise. - * ospf6_lsa.c (lsa_flood): Likewise. - -1999-05-07 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_spf.c, etc: Many bug fix. - intra-area-prefix-LSA treatment changed. - network byte order of neighbor ifid changed. - -1999-05-07 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_zebra.h (struct zebra): Add hitory entry to structure. - -1999-05-05 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_main.c (main): Add KAME check for binding vty socket. - (main): Delete old interface get routine garbage. - - * ospf6d.c: Change all `show ip6' statement to `show ipv6'. - (show_ipv6_ospf6_requestlist): Add description. - -1999-05-04 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * ospf6_lsa.c, etc: Many bug fix, now two routers - on the same segment can become FULL neighbor state - each other. - -1999-05-03 Kunihiro Ishiguro <kunihiro@zebra.org> - - * Makefile.am: Add file dependency. - (depend): Add target. - -1999-05-02 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> - - * Clean up and fix have been almost done. This code - now testing stage of Intra area routing. - - * Configuration Vty become more similar to Cisco. - -1999-04-22 Kunihiro Ishiguro <kunihiro@zebra.org> - - * Trim training newline from zlog format arguemnt. - - * ospf6_dump.c (ospf6_err): Commented out ospf6_err and - ospf6_warn. Same kind of function should be implemented as - zlog_err or zlog_warn or someting. - - * ospf6d.c: Change OSPF_NODE to OSPF6_NODE. - Change OSPF_DEFAULT_CONFIG to OSPF6_DEFAULT_CONFIG. - - -1999-04-21 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_mesg.c (make_hello): Add check of SIN6_LEN - -1999-04-16 Kunihiro Ishiguro <kunihiro@zebra.org> - - * ospf6_neighbor.c: Change list_clear_all to list_delete_all_node. - Remove list_delete_all fuction and use lib/linklist.c's one. - -1999-04-14 Kunihiro Ishiguro <kunihiro@zebra.org> - - * mcast_join(),mcast_leave()'s argument socket length is removed. - -1999-04-08 <kunihiro@zebra.org> - - * ospf6_zebra.h (ospf_zebra_read): Fix typo. - - * ospf6_interface.h: Tempolary add struct rt_addrinfo. - -1999-03-05 Kunihiro Ishiguro <kunihiro@zebra.org> - - * Merge from ospfd-zebra-990303 codes. - -1999-02-23 Kunihiro Ishiguro <kunihiro@zebra.org> - - * Makefile.in: add new file. - - * Makefile.am: @INCLUDES@ is added for OS/library specific IPv6 - directory search. - - * Import files from Yasuhiro Ohara <yasu@sfc.wide.ad.jp>'s ospfd. - Impterted files are: - Makefile.am, ospf_area.h, ospf_dump.c, ospf_interface.c, - ospf_interface.h, ospf_lsa.c, ospf_lsa.h, ospf_main.c, - ospf_mesg.c, ospf_mesg.h, ospf_neighbor.c, - ospf_neighbor.h,ospf_network.c, ospf_network.h, ospf_proto.h, - ospf_spf.c, ospf_spf.h, ospf_types.h, ospfd.c, ospfd.h diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am index ad828713..01bc6fe0 100644 --- a/ospf6d/Makefile.am +++ b/ospf6d/Makefile.am @@ -4,6 +4,9 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib @SNMP_INCLUDES@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 +AM_CFLAGS = $(PICFLAGS) +AM_LDFLAGS = $(PILDFLAGS) + noinst_LIBRARIES = libospf6.a sbin_PROGRAMS = ospf6d diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 180a2048..8224b109 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -472,7 +472,7 @@ ospf6_abr_originate_summary_to_area (struct ospf6_route *route, ospf6_lsa_originate_area (lsa, area); } -void +static void ospf6_abr_range_update (struct ospf6_route *range) { u_int32_t cost = 0; @@ -762,7 +762,7 @@ ospf6_abr_reimport (struct ospf6_area *oa) /* Display functions */ -int +static int ospf6_inter_area_prefix_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { struct ospf6_inter_prefix_lsa *prefix_lsa; @@ -787,7 +787,7 @@ ospf6_inter_area_prefix_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) return 0; } -int +static int ospf6_inter_area_router_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { struct ospf6_inter_router_lsa *router_lsa; @@ -841,7 +841,7 @@ config_write_ospf6_debug_abr (struct vty *vty) } void -install_element_ospf6_debug_abr () +install_element_ospf6_debug_abr (void) { install_element (ENABLE_NODE, &debug_ospf6_abr_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_abr_cmd); @@ -864,7 +864,7 @@ struct ospf6_lsa_handler inter_router_handler = }; void -ospf6_abr_init () +ospf6_abr_init (void) { ospf6_install_lsa_handler (&inter_prefix_handler); ospf6_install_lsa_handler (&inter_router_handler); diff --git a/ospf6d/ospf6_abr.h b/ospf6d/ospf6_abr.h index 84c6fa5e..5d00c474 100644 --- a/ospf6d/ospf6_abr.h +++ b/ospf6d/ospf6_abr.h @@ -52,24 +52,22 @@ struct ospf6_inter_router_lsa { (E)->metric &= htonl (0x00000000); \ (E)->metric |= htonl (0x00ffffff) & htonl (C); } -int ospf6_is_router_abr (struct ospf6 *o); +extern int ospf6_is_router_abr (struct ospf6 *o); -void ospf6_abr_enable_area (struct ospf6_area *oa); -void ospf6_abr_disable_area (struct ospf6_area *oa); +extern void ospf6_abr_enable_area (struct ospf6_area *oa); +extern void ospf6_abr_disable_area (struct ospf6_area *oa); -void ospf6_abr_originate_summary_to_area (struct ospf6_route *route, - struct ospf6_area *area); -void ospf6_abr_originate_summary (struct ospf6_route *route); -void ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa); -void ospf6_abr_examin_brouter (u_int32_t router_id); -void ospf6_abr_reimport (struct ospf6_area *oa); +extern void ospf6_abr_originate_summary_to_area (struct ospf6_route *route, + struct ospf6_area *area); +extern void ospf6_abr_originate_summary (struct ospf6_route *route); +extern void ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa); +extern void ospf6_abr_examin_brouter (u_int32_t router_id); +extern void ospf6_abr_reimport (struct ospf6_area *oa); -int config_write_ospf6_debug_abr (struct vty *vty); -void install_element_ospf6_debug_abr (); -int ospf6_abr_config_write (struct vty *vty); +extern int config_write_ospf6_debug_abr (struct vty *vty); +extern void install_element_ospf6_debug_abr (void); +extern int ospf6_abr_config_write (struct vty *vty); -void ospf6_abr_init (); +extern void ospf6_abr_init (void); #endif /*OSPF6_ABR_H*/ - - diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 94283dba..3bfc0cae 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -54,7 +54,7 @@ ospf6_area_cmp (void *va, void *vb) } /* schedule routing table recalculation */ -void +static void ospf6_area_lsdb_hook_add (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -84,7 +84,7 @@ ospf6_area_lsdb_hook_add (struct ospf6_lsa *lsa) } } -void +static void ospf6_area_lsdb_hook_remove (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -114,14 +114,14 @@ ospf6_area_lsdb_hook_remove (struct ospf6_lsa *lsa) } } -void +static void ospf6_area_route_hook_add (struct ospf6_route *route) { struct ospf6_route *copy = ospf6_route_copy (route); ospf6_route_add (copy, ospf6->route_table); } -void +static void ospf6_area_route_hook_remove (struct ospf6_route *route) { struct ospf6_route *copy; @@ -230,7 +230,7 @@ ospf6_area_lookup (u_int32_t area_id, struct ospf6 *ospf6) return (struct ospf6_area *) NULL; } -struct ospf6_area * +static struct ospf6_area * ospf6_area_get (u_int32_t area_id, struct ospf6 *o) { struct ospf6_area *oa; @@ -364,7 +364,7 @@ ALIAS (area_range, OSPF6_AREA_ID_STR "Configured address range\n" "Specify IPv6 prefix\n" - ); + ) DEFUN (no_area_range, no_area_range_cmd, @@ -746,7 +746,7 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root, } void -ospf6_area_init () +ospf6_area_init (void) { install_element (VIEW_NODE, &show_ipv6_ospf6_spf_tree_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_area_spf_tree_cmd); diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h index 6bf7e0b5..c7c5ee35 100644 --- a/ospf6d/ospf6_area.h +++ b/ospf6d/ospf6_area.h @@ -112,19 +112,18 @@ struct ospf6_area #define IS_AREA_STUB(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_STUB)) /* prototypes */ -int ospf6_area_cmp (void *va, void *vb); +extern int ospf6_area_cmp (void *va, void *vb); -struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *); -void ospf6_area_delete (struct ospf6_area *); -struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *); +extern struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *); +extern void ospf6_area_delete (struct ospf6_area *); +extern struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *); -void ospf6_area_enable (struct ospf6_area *); -void ospf6_area_disable (struct ospf6_area *); +extern void ospf6_area_enable (struct ospf6_area *); +extern void ospf6_area_disable (struct ospf6_area *); -void ospf6_area_show (struct vty *, struct ospf6_area *); +extern void ospf6_area_show (struct vty *, struct ospf6_area *); -void ospf6_area_config_write (struct vty *vty); -void ospf6_area_init (); +extern void ospf6_area_config_write (struct vty *vty); +extern void ospf6_area_init (void); #endif /* OSPF_AREA_H */ - diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index c12eecae..37b912b4 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -53,7 +53,7 @@ unsigned char conf_debug_ospf6_asbr = 0; #define ZROUTE_NAME(x) zebra_route_string(x) /* AS External LSA origination */ -void +static void ospf6_as_external_lsa_originate (struct ospf6_route *route) { char buffer[OSPF6_MAX_LSASIZE]; @@ -336,7 +336,7 @@ ospf6_asbr_lsentry_remove (struct ospf6_route *asbr_entry) /* redistribute function */ -void +static void ospf6_asbr_routemap_set (int type, const char *mapname) { if (ospf6->rmap[type].name) @@ -345,7 +345,7 @@ ospf6_asbr_routemap_set (int type, const char *mapname) ospf6->rmap[type].map = route_map_lookup_by_name (mapname); } -void +static void ospf6_asbr_routemap_unset (int type) { if (ospf6->rmap[type].name) @@ -354,7 +354,7 @@ ospf6_asbr_routemap_unset (int type) ospf6->rmap[type].map = NULL; } -void +static void ospf6_asbr_routemap_update (const char *mapname) { int type; @@ -378,13 +378,13 @@ ospf6_asbr_is_asbr (struct ospf6 *o) return o->external_table->count; } -void +static void ospf6_asbr_redistribute_set (int type) { ospf6_zebra_redistribute (type); } -void +static void ospf6_asbr_redistribute_unset (int type) { struct ospf6_route *route; @@ -731,7 +731,7 @@ ospf6_redistribute_config_write (struct vty *vty) return 0; } -void +static void ospf6_redistribute_show_config (struct vty *vty) { int type; @@ -774,7 +774,7 @@ ospf6_redistribute_show_config (struct vty *vty) /* Routemap Functions */ -route_map_result_t +static route_map_result_t ospf6_routemap_rule_match_address_prefixlist (void *rule, struct prefix *prefix, route_map_object_t type, @@ -793,13 +793,13 @@ ospf6_routemap_rule_match_address_prefixlist (void *rule, RMAP_NOMATCH : RMAP_MATCH); } -void * +static void * ospf6_routemap_rule_match_address_prefixlist_compile (const char *arg) { return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg); } -void +static void ospf6_routemap_rule_match_address_prefixlist_free (void *rule) { XFREE (MTYPE_ROUTE_MAP_COMPILED, rule); @@ -814,7 +814,7 @@ ospf6_routemap_rule_match_address_prefixlist_cmd = ospf6_routemap_rule_match_address_prefixlist_free, }; -route_map_result_t +static route_map_result_t ospf6_routemap_rule_set_metric_type (void *rule, struct prefix *prefix, route_map_object_t type, void *object) { @@ -832,7 +832,7 @@ ospf6_routemap_rule_set_metric_type (void *rule, struct prefix *prefix, return RMAP_OKAY; } -void * +static void * ospf6_routemap_rule_set_metric_type_compile (const char *arg) { if (strcmp (arg, "type-2") && strcmp (arg, "type-1")) @@ -840,7 +840,7 @@ ospf6_routemap_rule_set_metric_type_compile (const char *arg) return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg); } -void +static void ospf6_routemap_rule_set_metric_type_free (void *rule) { XFREE (MTYPE_ROUTE_MAP_COMPILED, rule); @@ -855,7 +855,7 @@ ospf6_routemap_rule_set_metric_type_cmd = ospf6_routemap_rule_set_metric_type_free, }; -route_map_result_t +static route_map_result_t ospf6_routemap_rule_set_metric (void *rule, struct prefix *prefix, route_map_object_t type, void *object) { @@ -869,7 +869,7 @@ ospf6_routemap_rule_set_metric (void *rule, struct prefix *prefix, return RMAP_OKAY; } -void * +static void * ospf6_routemap_rule_set_metric_compile (const char *arg) { u_int32_t metric; @@ -880,7 +880,7 @@ ospf6_routemap_rule_set_metric_compile (const char *arg) return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg); } -void +static void ospf6_routemap_rule_set_metric_free (void *rule) { XFREE (MTYPE_ROUTE_MAP_COMPILED, rule); @@ -895,7 +895,7 @@ ospf6_routemap_rule_set_metric_cmd = ospf6_routemap_rule_set_metric_free, }; -route_map_result_t +static route_map_result_t ospf6_routemap_rule_set_forwarding (void *rule, struct prefix *prefix, route_map_object_t type, void *object) { @@ -915,7 +915,7 @@ ospf6_routemap_rule_set_forwarding (void *rule, struct prefix *prefix, return RMAP_OKAY; } -void * +static void * ospf6_routemap_rule_set_forwarding_compile (const char *arg) { struct in6_addr a; @@ -924,7 +924,7 @@ ospf6_routemap_rule_set_forwarding_compile (const char *arg) return XSTRDUP (MTYPE_ROUTE_MAP_COMPILED, arg); } -void +static void ospf6_routemap_rule_set_forwarding_free (void *rule) { XFREE (MTYPE_ROUTE_MAP_COMPILED, rule); @@ -939,7 +939,7 @@ ospf6_routemap_rule_set_forwarding_cmd = ospf6_routemap_rule_set_forwarding_free, }; -int +static int route_map_command_status (struct vty *vty, int ret) { if (! ret) @@ -1074,8 +1074,8 @@ DEFUN (ospf6_routemap_no_set_forwarding, return route_map_command_status (vty, ret); } -void -ospf6_routemap_init () +static void +ospf6_routemap_init (void) { route_map_init (); route_map_init_vty (); @@ -1106,7 +1106,7 @@ ospf6_routemap_init () /* Display functions */ -int +static int ospf6_as_external_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { struct ospf6_as_external_lsa *external; @@ -1154,7 +1154,7 @@ ospf6_as_external_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) return 0; } -void +static void ospf6_asbr_external_route_show (struct vty *vty, struct ospf6_route *route) { struct ospf6_external_info *info = route->route_option; @@ -1206,7 +1206,7 @@ struct ospf6_lsa_handler as_external_handler = }; void -ospf6_asbr_init () +ospf6_asbr_init (void) { ospf6_routemap_init (); diff --git a/ospf6d/ospf6_asbr.h b/ospf6d/ospf6_asbr.h index f3aabc8d..7166aa3e 100644 --- a/ospf6d/ospf6_asbr.h +++ b/ospf6d/ospf6_asbr.h @@ -63,24 +63,24 @@ struct ospf6_as_external_lsa { (E)->bits_metric &= htonl (0xff000000); \ (E)->bits_metric |= htonl (0x00ffffff) & htonl (C); } -void ospf6_asbr_lsa_add (struct ospf6_lsa *lsa); -void ospf6_asbr_lsa_remove (struct ospf6_lsa *lsa); -void ospf6_asbr_lsentry_add (struct ospf6_route *asbr_entry); -void ospf6_asbr_lsentry_remove (struct ospf6_route *asbr_entry); +extern void ospf6_asbr_lsa_add (struct ospf6_lsa *lsa); +extern void ospf6_asbr_lsa_remove (struct ospf6_lsa *lsa); +extern void ospf6_asbr_lsentry_add (struct ospf6_route *asbr_entry); +extern void ospf6_asbr_lsentry_remove (struct ospf6_route *asbr_entry); -int ospf6_asbr_is_asbr (struct ospf6 *o); -void -ospf6_asbr_redistribute_add (int type, int ifindex, struct prefix *prefix, - u_int nexthop_num, struct in6_addr *nexthop); -void -ospf6_asbr_redistribute_remove (int type, int ifindex, struct prefix *prefix); +extern int ospf6_asbr_is_asbr (struct ospf6 *o); +extern void ospf6_asbr_redistribute_add (int type, int ifindex, + struct prefix *prefix, + u_int nexthop_num, + struct in6_addr *nexthop); +extern void ospf6_asbr_redistribute_remove (int type, int ifindex, + struct prefix *prefix); -int ospf6_redistribute_config_write (struct vty *vty); +extern int ospf6_redistribute_config_write (struct vty *vty); -void ospf6_asbr_init (); +extern void ospf6_asbr_init (void); -int config_write_ospf6_debug_asbr (struct vty *vty); -void install_element_ospf6_debug_asbr (); +extern int config_write_ospf6_debug_asbr (struct vty *vty); +extern void install_element_ospf6_debug_asbr (void); #endif /* OSPF6_ASBR_H */ - diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 39b7c1f3..8c460293 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -241,7 +241,7 @@ ospf6_install_lsa (struct ospf6_lsa *lsa) /* RFC2740 section 3.5.2. Sending Link State Update packets */ /* RFC2328 section 13.3 Next step in the flooding procedure */ -void +static void ospf6_flood_interface (struct ospf6_neighbor *from, struct ospf6_lsa *lsa, struct ospf6_interface *oi) { @@ -387,7 +387,7 @@ ospf6_flood_interface (struct ospf6_neighbor *from, } } -void +static void ospf6_flood_area (struct ospf6_neighbor *from, struct ospf6_lsa *lsa, struct ospf6_area *oa) { @@ -410,7 +410,7 @@ ospf6_flood_area (struct ospf6_neighbor *from, } } -void +static void ospf6_flood_process (struct ospf6_neighbor *from, struct ospf6_lsa *lsa, struct ospf6 *process) { @@ -440,7 +440,7 @@ ospf6_flood (struct ospf6_neighbor *from, struct ospf6_lsa *lsa) ospf6_flood_process (from, lsa, ospf6); } -void +static void ospf6_flood_clear_interface (struct ospf6_lsa *lsa, struct ospf6_interface *oi) { struct listnode *node, *nnode; @@ -463,7 +463,7 @@ ospf6_flood_clear_interface (struct ospf6_lsa *lsa, struct ospf6_interface *oi) } } -void +static void ospf6_flood_clear_area (struct ospf6_lsa *lsa, struct ospf6_area *oa) { struct listnode *node, *nnode; @@ -485,7 +485,7 @@ ospf6_flood_clear_area (struct ospf6_lsa *lsa, struct ospf6_area *oa) } } -void +static void ospf6_flood_clear_process (struct ospf6_lsa *lsa, struct ospf6 *process) { struct listnode *node, *nnode; @@ -676,7 +676,7 @@ ospf6_acknowledge_lsa_allother (struct ospf6_lsa *lsa, int ismore_recent, early of ospf6_receive_lsa () */ } -void +static void ospf6_acknowledge_lsa (struct ospf6_lsa *lsa, int ismore_recent, struct ospf6_neighbor *from) { @@ -1013,7 +1013,7 @@ config_write_ospf6_debug_flood (struct vty *vty) } void -install_element_ospf6_debug_flood () +install_element_ospf6_debug_flood (void) { install_element (ENABLE_NODE, &debug_ospf6_flooding_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_flooding_cmd); diff --git a/ospf6d/ospf6_flood.h b/ospf6d/ospf6_flood.h index 4851c141..3a6f300b 100644 --- a/ospf6d/ospf6_flood.h +++ b/ospf6d/ospf6_flood.h @@ -32,34 +32,34 @@ extern unsigned char conf_debug_ospf6_flooding; (conf_debug_ospf6_flooding) /* Function Prototypes */ -struct ospf6_lsdb *ospf6_get_scoped_lsdb (struct ospf6_lsa *lsa); -struct ospf6_lsdb *ospf6_get_scoped_lsdb_self (struct ospf6_lsa *lsa); +extern struct ospf6_lsdb *ospf6_get_scoped_lsdb (struct ospf6_lsa *lsa); +extern struct ospf6_lsdb *ospf6_get_scoped_lsdb_self (struct ospf6_lsa *lsa); /* origination & purging */ -void ospf6_lsa_originate (struct ospf6_lsa *lsa); -void ospf6_lsa_originate_process (struct ospf6_lsa *lsa, - struct ospf6 *process); -void ospf6_lsa_originate_area (struct ospf6_lsa *lsa, - struct ospf6_area *oa); -void ospf6_lsa_originate_interface (struct ospf6_lsa *lsa, - struct ospf6_interface *oi); -void ospf6_lsa_purge (struct ospf6_lsa *lsa); +extern void ospf6_lsa_originate (struct ospf6_lsa *lsa); +extern void ospf6_lsa_originate_process (struct ospf6_lsa *lsa, + struct ospf6 *process); +extern void ospf6_lsa_originate_area (struct ospf6_lsa *lsa, + struct ospf6_area *oa); +extern void ospf6_lsa_originate_interface (struct ospf6_lsa *lsa, + struct ospf6_interface *oi); +extern void ospf6_lsa_purge (struct ospf6_lsa *lsa); /* access method to retrans_count */ -void ospf6_increment_retrans_count (struct ospf6_lsa *lsa); -void ospf6_decrement_retrans_count (struct ospf6_lsa *lsa); +extern void ospf6_increment_retrans_count (struct ospf6_lsa *lsa); +extern void ospf6_decrement_retrans_count (struct ospf6_lsa *lsa); /* flooding & clear flooding */ -void ospf6_flood_clear (struct ospf6_lsa *lsa); -void ospf6_flood (struct ospf6_neighbor *from, struct ospf6_lsa *lsa); +extern void ospf6_flood_clear (struct ospf6_lsa *lsa); +extern void ospf6_flood (struct ospf6_neighbor *from, struct ospf6_lsa *lsa); /* receive & install */ -void ospf6_receive_lsa (struct ospf6_neighbor *from, - struct ospf6_lsa_header *header); -void ospf6_install_lsa (struct ospf6_lsa *lsa); +extern void ospf6_receive_lsa (struct ospf6_neighbor *from, + struct ospf6_lsa_header *header); +extern void ospf6_install_lsa (struct ospf6_lsa *lsa); -int config_write_ospf6_debug_flood (struct vty *vty); -void install_element_ospf6_debug_flood (); +extern int config_write_ospf6_debug_flood (struct vty *vty); +extern void install_element_ospf6_debug_flood (void); #endif /* OSPF6_FLOOD_H */ diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index ab8c4519..d266f78e 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -72,7 +72,7 @@ ospf6_interface_lookup_by_ifindex (int ifindex) } /* schedule routing table recalculation */ -void +static void ospf6_interface_lsdb_hook (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -692,7 +692,7 @@ neighbor_change (struct thread *thread) return 0; } -int +static int loopind (struct thread *thread) { struct ospf6_interface *oi; @@ -739,7 +739,7 @@ interface_down (struct thread *thread) /* show specified interface structure */ -int +static int ospf6_interface_show (struct vty *vty, struct interface *ifp) { struct ospf6_interface *oi; @@ -897,7 +897,7 @@ ALIAS (show_ipv6_ospf6_interface, IP6_STR OSPF6_STR INTERFACE_STR - ); + ) DEFUN (show_ipv6_ospf6_interface_ifname_prefix, show_ipv6_ospf6_interface_ifname_prefix_cmd, @@ -946,7 +946,7 @@ ALIAS (show_ipv6_ospf6_interface_ifname_prefix, OSPF6_ROUTE_ADDRESS_STR OSPF6_ROUTE_PREFIX_STR "Dispaly details of the prefixes\n" - ); + ) ALIAS (show_ipv6_ospf6_interface_ifname_prefix, show_ipv6_ospf6_interface_ifname_prefix_match_cmd, @@ -960,7 +960,7 @@ ALIAS (show_ipv6_ospf6_interface_ifname_prefix, OSPF6_ROUTE_PREFIX_STR OSPF6_ROUTE_MATCH_STR "Dispaly details of the prefixes\n" - ); + ) DEFUN (show_ipv6_ospf6_interface_prefix, show_ipv6_ospf6_interface_prefix_cmd, @@ -999,7 +999,7 @@ ALIAS (show_ipv6_ospf6_interface_prefix, OSPF6_ROUTE_ADDRESS_STR OSPF6_ROUTE_PREFIX_STR "Dispaly details of the prefixes\n" - ); + ) ALIAS (show_ipv6_ospf6_interface_prefix, show_ipv6_ospf6_interface_prefix_match_cmd, @@ -1012,7 +1012,7 @@ ALIAS (show_ipv6_ospf6_interface_prefix, OSPF6_ROUTE_PREFIX_STR OSPF6_ROUTE_MATCH_STR "Dispaly details of the prefixes\n" - ); + ) /* interface variable set command */ @@ -1463,7 +1463,7 @@ DEFUN (no_ipv6_ospf6_advertise_prefix_list, return CMD_SUCCESS; } -int +static int config_write_ospf6_interface (struct vty *vty) { struct listnode *i; @@ -1519,7 +1519,7 @@ static struct cmd_node interface_node = }; void -ospf6_interface_init () +ospf6_interface_init (void) { /* Install interface node. */ install_node (&interface_node, config_write_ospf6_interface); @@ -1596,7 +1596,7 @@ config_write_ospf6_debug_interface (struct vty *vty) } void -install_element_ospf6_debug_interface () +install_element_ospf6_debug_interface (void) { install_element (ENABLE_NODE, &debug_ospf6_interface_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_interface_cmd); diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h index fb93ceda..878c29e2 100644 --- a/ospf6d/ospf6_interface.h +++ b/ospf6d/ospf6_interface.h @@ -124,29 +124,28 @@ extern const char *ospf6_interface_state_str[]; /* Function Prototypes */ -struct ospf6_interface *ospf6_interface_lookup_by_ifindex (int); -struct ospf6_interface *ospf6_interface_create (struct interface *); -void ospf6_interface_delete (struct ospf6_interface *); +extern struct ospf6_interface *ospf6_interface_lookup_by_ifindex (int); +extern struct ospf6_interface *ospf6_interface_create (struct interface *); +extern void ospf6_interface_delete (struct ospf6_interface *); -void ospf6_interface_enable (struct ospf6_interface *); -void ospf6_interface_disable (struct ospf6_interface *); +extern void ospf6_interface_enable (struct ospf6_interface *); +extern void ospf6_interface_disable (struct ospf6_interface *); -void ospf6_interface_if_add (struct interface *); -void ospf6_interface_if_del (struct interface *); -void ospf6_interface_state_update (struct interface *); -void ospf6_interface_connected_route_update (struct interface *); +extern void ospf6_interface_if_add (struct interface *); +extern void ospf6_interface_if_del (struct interface *); +extern void ospf6_interface_state_update (struct interface *); +extern void ospf6_interface_connected_route_update (struct interface *); /* interface event */ -int interface_up (struct thread *); -int interface_down (struct thread *); -int wait_timer (struct thread *); -int backup_seen (struct thread *); -int neighbor_change (struct thread *); +extern int interface_up (struct thread *); +extern int interface_down (struct thread *); +extern int wait_timer (struct thread *); +extern int backup_seen (struct thread *); +extern int neighbor_change (struct thread *); -void ospf6_interface_init (); +extern void ospf6_interface_init (void); -int config_write_ospf6_debug_interface (struct vty *vty); -void install_element_ospf6_debug_interface (); +extern int config_write_ospf6_debug_interface (struct vty *vty); +extern void install_element_ospf6_debug_interface (void); #endif /* OSPF6_INTERFACE_H */ - diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index ffd9c725..103e8fc2 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -56,7 +56,7 @@ u_int32_t conf_debug_ospf6_brouter_specific_area_id; /* RFC2740 3.4.3.1 Router-LSA */ /******************************/ -int +static int ospf6_router_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { char *start, *end, *current; @@ -316,7 +316,7 @@ ospf6_router_lsa_originate (struct thread *thread) /* RFC2740 3.4.3.2 Network-LSA */ /*******************************/ -int +static int ospf6_network_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { char *start, *end, *current; @@ -462,7 +462,7 @@ ospf6_network_lsa_originate (struct thread *thread) /* RFC2740 3.4.3.6 Link-LSA */ /****************************/ -int +static int ospf6_link_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { char *start, *end, *current; @@ -615,7 +615,7 @@ ospf6_link_lsa_originate (struct thread *thread) /* RFC2740 3.4.3.7 Intra-Area-Prefix-LSA */ /*****************************************/ -int +static int ospf6_intra_prefix_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { char *start, *end, *current; @@ -1238,7 +1238,7 @@ ospf6_intra_route_calculation (struct ospf6_area *oa) zlog_debug ("Re-examin intra-routes for area %s: Done", oa->name); } -void +static void ospf6_brouter_debug_print (struct ospf6_route *brouter) { u_int32_t brouter_id; diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h index 8a9474a8..19c1f121 100644 --- a/ospf6d/ospf6_intra.h +++ b/ospf6d/ospf6_intra.h @@ -187,25 +187,28 @@ struct ospf6_intra_prefix_lsa /* Function Prototypes */ -char *ospf6_router_lsdesc_lookup (u_char type, u_int32_t interface_id, - u_int32_t neighbor_interface_id, - u_int32_t neighbor_router_id, - struct ospf6_lsa *lsa); -char *ospf6_network_lsdesc_lookup (u_int32_t router_id, - struct ospf6_lsa *lsa); - -int ospf6_router_lsa_originate (struct thread *); -int ospf6_network_lsa_originate (struct thread *); -int ospf6_link_lsa_originate (struct thread *); -int ospf6_intra_prefix_lsa_originate_transit (struct thread *); -int ospf6_intra_prefix_lsa_originate_stub (struct thread *); -void ospf6_intra_prefix_lsa_add (struct ospf6_lsa *lsa); -void ospf6_intra_prefix_lsa_remove (struct ospf6_lsa *lsa); - -void ospf6_intra_route_calculation (struct ospf6_area *oa); -void ospf6_intra_brouter_calculation (struct ospf6_area *oa); - -void ospf6_intra_init (); +extern char *ospf6_router_lsdesc_lookup (u_char type, u_int32_t interface_id, + u_int32_t neighbor_interface_id, + u_int32_t neighbor_router_id, + struct ospf6_lsa *lsa); +extern char *ospf6_network_lsdesc_lookup (u_int32_t router_id, + struct ospf6_lsa *lsa); + +extern int ospf6_router_lsa_originate (struct thread *); +extern int ospf6_network_lsa_originate (struct thread *); +extern int ospf6_link_lsa_originate (struct thread *); +extern int ospf6_intra_prefix_lsa_originate_transit (struct thread *); +extern int ospf6_intra_prefix_lsa_originate_stub (struct thread *); +extern void ospf6_intra_prefix_lsa_add (struct ospf6_lsa *lsa); +extern void ospf6_intra_prefix_lsa_remove (struct ospf6_lsa *lsa); + +extern void ospf6_intra_route_calculation (struct ospf6_area *oa); +extern void ospf6_intra_brouter_calculation (struct ospf6_area *oa); + +extern void ospf6_intra_init (void); + +extern int config_write_ospf6_debug_brouter (struct vty *vty); +extern void install_element_ospf6_debug_brouter (void); int config_write_ospf6_debug_brouter (struct vty *vty); void install_element_ospf6_debug_brouter (); diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index e57384b3..87df7418 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -45,7 +45,7 @@ vector ospf6_lsa_handler_vector; -int +static int ospf6_unknown_lsa_show (struct vty *vty, struct ospf6_lsa *lsa) { u_char *start, *end, *current; @@ -703,14 +703,14 @@ ospf6_lsa_checksum (struct ospf6_lsa_header *lsa_header) } void -ospf6_lsa_init () +ospf6_lsa_init (void) { ospf6_lsa_handler_vector = vector_init (0); ospf6_install_lsa_handler (&unknown_handler); } -char * +static char * ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) { static char buf[64]; @@ -870,7 +870,7 @@ struct cmd_element no_debug_ospf6_lsa_type_cmd; struct cmd_element no_debug_ospf6_lsa_type_detail_cmd; void -install_element_ospf6_debug_lsa () +install_element_ospf6_debug_lsa (void) { u_int i; struct ospf6_lsa_handler *handler; diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h index 0e1b9117..fb0f27cd 100644 --- a/ospf6d/ospf6_lsa.h +++ b/ospf6d/ospf6_lsa.h @@ -206,47 +206,47 @@ extern struct ospf6_lsa_handler unknown_handler; /* Function Prototypes */ -const char *ospf6_lstype_name (u_int16_t type); -u_char ospf6_lstype_debug (u_int16_t type); -int ospf6_lsa_is_differ (struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2); -int ospf6_lsa_is_changed (struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2); -u_int16_t ospf6_lsa_age_current (struct ospf6_lsa *); -void ospf6_lsa_age_update_to_send (struct ospf6_lsa *, u_int32_t); -void ospf6_lsa_premature_aging (struct ospf6_lsa *); -int ospf6_lsa_compare (struct ospf6_lsa *, struct ospf6_lsa *); - -char *ospf6_lsa_printbuf (struct ospf6_lsa *lsa, char *buf, int size); -void ospf6_lsa_header_print_raw (struct ospf6_lsa_header *header); -void ospf6_lsa_header_print (struct ospf6_lsa *lsa); -void ospf6_lsa_show_summary_header (struct vty *vty); -void ospf6_lsa_show_summary (struct vty *vty, struct ospf6_lsa *lsa); -void ospf6_lsa_show_dump (struct vty *vty, struct ospf6_lsa *lsa); -void ospf6_lsa_show_internal (struct vty *vty, struct ospf6_lsa *lsa); -void ospf6_lsa_show (struct vty *vty, struct ospf6_lsa *lsa); - -struct ospf6_lsa *ospf6_lsa_create (struct ospf6_lsa_header *header); -struct ospf6_lsa *ospf6_lsa_create_headeronly (struct ospf6_lsa_header *header); -void ospf6_lsa_delete (struct ospf6_lsa *lsa); -struct ospf6_lsa *ospf6_lsa_copy (struct ospf6_lsa *); - -void ospf6_lsa_lock (struct ospf6_lsa *); -void ospf6_lsa_unlock (struct ospf6_lsa *); - -int ospf6_lsa_expire (struct thread *); -int ospf6_lsa_refresh (struct thread *); - -unsigned short ospf6_lsa_checksum (struct ospf6_lsa_header *); -int ospf6_lsa_prohibited_duration (u_int16_t type, u_int32_t id, - u_int32_t adv_router, void *scope); - -void ospf6_install_lsa_handler (struct ospf6_lsa_handler *handler); -struct ospf6_lsa_handler *ospf6_get_lsa_handler (u_int16_t type); - -void ospf6_lsa_init (); -void ospf6_lsa_cmd_init (); - -int config_write_ospf6_debug_lsa (struct vty *vty); -void install_element_ospf6_debug_lsa (); +extern const char *ospf6_lstype_name (u_int16_t type); +extern u_char ospf6_lstype_debug (u_int16_t type); +extern int ospf6_lsa_is_differ (struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2); +extern int ospf6_lsa_is_changed (struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2); +extern u_int16_t ospf6_lsa_age_current (struct ospf6_lsa *); +extern void ospf6_lsa_age_update_to_send (struct ospf6_lsa *, u_int32_t); +extern void ospf6_lsa_premature_aging (struct ospf6_lsa *); +extern int ospf6_lsa_compare (struct ospf6_lsa *, struct ospf6_lsa *); + +extern char *ospf6_lsa_printbuf (struct ospf6_lsa *lsa, char *buf, int size); +extern void ospf6_lsa_header_print_raw (struct ospf6_lsa_header *header); +extern void ospf6_lsa_header_print (struct ospf6_lsa *lsa); +extern void ospf6_lsa_show_summary_header (struct vty *vty); +extern void ospf6_lsa_show_summary (struct vty *vty, struct ospf6_lsa *lsa); +extern void ospf6_lsa_show_dump (struct vty *vty, struct ospf6_lsa *lsa); +extern void ospf6_lsa_show_internal (struct vty *vty, struct ospf6_lsa *lsa); +extern void ospf6_lsa_show (struct vty *vty, struct ospf6_lsa *lsa); + +extern struct ospf6_lsa *ospf6_lsa_create (struct ospf6_lsa_header *header); +extern struct ospf6_lsa *ospf6_lsa_create_headeronly (struct ospf6_lsa_header *header); +extern void ospf6_lsa_delete (struct ospf6_lsa *lsa); +extern struct ospf6_lsa *ospf6_lsa_copy (struct ospf6_lsa *); + +extern void ospf6_lsa_lock (struct ospf6_lsa *); +extern void ospf6_lsa_unlock (struct ospf6_lsa *); + +extern int ospf6_lsa_expire (struct thread *); +extern int ospf6_lsa_refresh (struct thread *); + +extern unsigned short ospf6_lsa_checksum (struct ospf6_lsa_header *); +extern int ospf6_lsa_prohibited_duration (u_int16_t type, u_int32_t id, + u_int32_t adv_router, void *scope); + +extern void ospf6_install_lsa_handler (struct ospf6_lsa_handler *handler); +extern struct ospf6_lsa_handler *ospf6_get_lsa_handler (u_int16_t type); + +extern void ospf6_lsa_init (void); +extern void ospf6_lsa_cmd_init (void); + +extern int config_write_ospf6_debug_lsa (struct vty *vty); +extern void install_element_ospf6_debug_lsa (void); #endif /* OSPF6_LSA_H */ diff --git a/ospf6d/ospf6_lsdb.h b/ospf6d/ospf6_lsdb.h index a9eba69d..71297dae 100644 --- a/ospf6d/ospf6_lsdb.h +++ b/ospf6d/ospf6_lsdb.h @@ -50,51 +50,49 @@ struct ospf6_lsdb } while (0) /* Function Prototypes */ -struct ospf6_lsdb *ospf6_lsdb_create (void *data); -void ospf6_lsdb_delete (struct ospf6_lsdb *lsdb); +extern struct ospf6_lsdb *ospf6_lsdb_create (void *data); +extern void ospf6_lsdb_delete (struct ospf6_lsdb *lsdb); -struct ospf6_lsa * -ospf6_lsdb_lookup (u_int16_t type, u_int32_t id, u_int32_t adv_router, - struct ospf6_lsdb *lsdb); -struct ospf6_lsa * -ospf6_lsdb_lookup_next (u_int16_t type, u_int32_t id, - u_int32_t adv_router, struct ospf6_lsdb *lsdb); +extern struct ospf6_lsa *ospf6_lsdb_lookup (u_int16_t type, u_int32_t id, + u_int32_t adv_router, + struct ospf6_lsdb *lsdb); +extern struct ospf6_lsa *ospf6_lsdb_lookup_next (u_int16_t type, u_int32_t id, + u_int32_t adv_router, + struct ospf6_lsdb *lsdb); -void ospf6_lsdb_add (struct ospf6_lsa *lsa, struct ospf6_lsdb *lsdb); -void ospf6_lsdb_remove (struct ospf6_lsa *lsa, struct ospf6_lsdb *lsdb); +extern void ospf6_lsdb_add (struct ospf6_lsa *lsa, struct ospf6_lsdb *lsdb); +extern void ospf6_lsdb_remove (struct ospf6_lsa *lsa, struct ospf6_lsdb *lsdb); -struct ospf6_lsa *ospf6_lsdb_head (struct ospf6_lsdb *lsdb); -struct ospf6_lsa *ospf6_lsdb_next (struct ospf6_lsa *lsa); +extern struct ospf6_lsa *ospf6_lsdb_head (struct ospf6_lsdb *lsdb); +extern struct ospf6_lsa *ospf6_lsdb_next (struct ospf6_lsa *lsa); -struct ospf6_lsa *ospf6_lsdb_type_router_head (u_int16_t type, +extern struct ospf6_lsa *ospf6_lsdb_type_router_head (u_int16_t type, u_int32_t adv_router, struct ospf6_lsdb *lsdb); -struct ospf6_lsa *ospf6_lsdb_type_router_next (u_int16_t type, +extern struct ospf6_lsa *ospf6_lsdb_type_router_next (u_int16_t type, u_int32_t adv_router, struct ospf6_lsa *lsa); -struct ospf6_lsa *ospf6_lsdb_type_head (u_int16_t type, - struct ospf6_lsdb *lsdb); -struct ospf6_lsa *ospf6_lsdb_type_next (u_int16_t type, - struct ospf6_lsa *lsa); +extern struct ospf6_lsa *ospf6_lsdb_type_head (u_int16_t type, + struct ospf6_lsdb *lsdb); +extern struct ospf6_lsa *ospf6_lsdb_type_next (u_int16_t type, + struct ospf6_lsa *lsa); -void ospf6_lsdb_remove_all (struct ospf6_lsdb *lsdb); +extern void ospf6_lsdb_remove_all (struct ospf6_lsdb *lsdb); #define OSPF6_LSDB_SHOW_LEVEL_NORMAL 0 #define OSPF6_LSDB_SHOW_LEVEL_DETAIL 1 #define OSPF6_LSDB_SHOW_LEVEL_INTERNAL 2 #define OSPF6_LSDB_SHOW_LEVEL_DUMP 3 -void ospf6_lsdb_show - (struct vty *vty, int level, - u_int16_t *type, u_int32_t *id, u_int32_t *adv_router, - struct ospf6_lsdb *lsdb); +extern void ospf6_lsdb_show (struct vty *vty, int level, u_int16_t *type, + u_int32_t *id, u_int32_t *adv_router, + struct ospf6_lsdb *lsdb); -u_int32_t ospf6_new_ls_id - (u_int16_t type, u_int32_t adv_router, struct ospf6_lsdb *lsdb); -u_int32_t ospf6_new_ls_seqnum - (u_int16_t type, u_int32_t id, u_int32_t adv_router, struct ospf6_lsdb *lsdb); +extern u_int32_t ospf6_new_ls_id (u_int16_t type, u_int32_t adv_router, + struct ospf6_lsdb *lsdb); +extern u_int32_t ospf6_new_ls_seqnum (u_int16_t type, u_int32_t id, + u_int32_t adv_router, + struct ospf6_lsdb *lsdb); #endif /* OSPF6_LSDB_H */ - - diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 680f4b7f..73d9150e 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -125,14 +125,14 @@ Report bugs to zebra@zebra.org\n", progname); } /* SIGHUP handler. */ -void +static void sighup (void) { zlog_info ("SIGHUP received"); } /* SIGINT handler. */ -void +static void sigint (void) { zlog_notice ("Terminating on signal SIGINT"); @@ -140,7 +140,7 @@ sigint (void) } /* SIGTERM handler. */ -void +static void sigterm (void) { zlog_notice ("Terminating on signal SIGTERM"); @@ -148,7 +148,7 @@ sigterm (void) } /* SIGUSR1 handler. */ -void +static void sigusr1 (void) { zlog_info ("SIGUSR1 received"); diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 6ece88b8..c257092a 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -272,7 +272,7 @@ ospf6_header_examin (struct in6_addr *src, struct in6_addr *dst, return MSG_OK; } -void +static void ospf6_hello_recv (struct in6_addr *src, struct in6_addr *dst, struct ospf6_interface *oi, struct ospf6_header *oh) { @@ -810,7 +810,7 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh, memcpy (&on->dbdesc_last, dbdesc, sizeof (struct ospf6_dbdesc)); } -void +static void ospf6_dbdesc_recv (struct in6_addr *src, struct in6_addr *dst, struct ospf6_interface *oi, struct ospf6_header *oh) { @@ -859,7 +859,7 @@ ospf6_dbdesc_recv (struct in6_addr *src, struct in6_addr *dst, } } -void +static void ospf6_lsreq_recv (struct in6_addr *src, struct in6_addr *dst, struct ospf6_interface *oi, struct ospf6_header *oh) { @@ -946,7 +946,7 @@ ospf6_lsreq_recv (struct in6_addr *src, struct in6_addr *dst, thread_add_event (master, ospf6_lsupdate_send_neighbor, on, 0); } -void +static void ospf6_lsupdate_recv (struct in6_addr *src, struct in6_addr *dst, struct ospf6_interface *oi, struct ospf6_header *oh) { @@ -1025,7 +1025,7 @@ ospf6_lsupdate_recv (struct in6_addr *src, struct in6_addr *dst, } } -void +static void ospf6_lsack_recv (struct in6_addr *src, struct in6_addr *dst, struct ospf6_interface *oi, struct ospf6_header *oh) { @@ -1133,14 +1133,14 @@ ospf6_lsack_recv (struct in6_addr *src, struct in6_addr *dst, } } -u_char *recvbuf = NULL; -u_char *sendbuf = NULL; -unsigned int iobuflen = 0; +static u_char *recvbuf = NULL; +static u_char *sendbuf = NULL; +static unsigned int iobuflen = 0; int ospf6_iobuf_size (unsigned int size) { - char *recvnew, *sendnew; + u_char *recvnew, *sendnew; if (size <= iobuflen) return iobuflen; @@ -1290,7 +1290,7 @@ ospf6_receive (struct thread *thread) return 0; } -void +static void ospf6_send (struct in6_addr *src, struct in6_addr *dst, struct ospf6_interface *oi, struct ospf6_header *oh) { @@ -1396,7 +1396,7 @@ ospf6_hello_send (struct thread *thread) hello->drouter = oi->drouter; hello->bdrouter = oi->bdrouter; - p = (char *)((caddr_t) hello + sizeof (struct ospf6_hello)); + p = (u_char *)((caddr_t) hello + sizeof (struct ospf6_hello)); for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on)) { @@ -1469,7 +1469,7 @@ ospf6_dbdesc_send (struct thread *thread) dbdesc->seqnum = htonl (on->dbdesc_seqnum); /* if this is not initial one, set LSA headers in dbdesc */ - p = (char *)((caddr_t) dbdesc + sizeof (struct ospf6_dbdesc)); + p = (u_char *)((caddr_t) dbdesc + sizeof (struct ospf6_dbdesc)); if (! CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_IBIT)) { for (lsa = ospf6_lsdb_head (on->dbdesc_list); lsa; @@ -1575,7 +1575,7 @@ ospf6_lsreq_send (struct thread *thread) oh = (struct ospf6_header *) sendbuf; /* set Request entries in lsreq */ - p = (char *)((caddr_t) oh + sizeof (struct ospf6_header)); + p = (u_char *)((caddr_t) oh + sizeof (struct ospf6_header)); for (lsa = ospf6_lsdb_head (on->request_list); lsa; lsa = ospf6_lsdb_next (lsa)) { @@ -1639,7 +1639,7 @@ ospf6_lsupdate_send_neighbor (struct thread *thread) lsupdate = (struct ospf6_lsupdate *) ((caddr_t) oh + sizeof (struct ospf6_header)); - p = (char *)((caddr_t) lsupdate + sizeof (struct ospf6_lsupdate)); + p = (u_char *)((caddr_t) lsupdate + sizeof (struct ospf6_lsupdate)); num = 0; /* lsupdate_list lists those LSA which doesn't need to be @@ -1734,7 +1734,7 @@ ospf6_lsupdate_send_interface (struct thread *thread) lsupdate = (struct ospf6_lsupdate *)((caddr_t) oh + sizeof (struct ospf6_header)); - p = (char *)((caddr_t) lsupdate + sizeof (struct ospf6_lsupdate)); + p = (u_char *)((caddr_t) lsupdate + sizeof (struct ospf6_lsupdate)); num = 0; for (lsa = ospf6_lsdb_head (oi->lsupdate_list); lsa; @@ -1803,7 +1803,7 @@ ospf6_lsack_send_neighbor (struct thread *thread) memset (sendbuf, 0, iobuflen); oh = (struct ospf6_header *) sendbuf; - p = (char *)((caddr_t) oh + sizeof (struct ospf6_header)); + p = (u_char *)((caddr_t) oh + sizeof (struct ospf6_header)); for (lsa = ospf6_lsdb_head (on->lsack_list); lsa; lsa = ospf6_lsdb_next (lsa)) @@ -1863,7 +1863,7 @@ ospf6_lsack_send_interface (struct thread *thread) memset (sendbuf, 0, iobuflen); oh = (struct ospf6_header *) sendbuf; - p = (char *)((caddr_t) oh + sizeof (struct ospf6_header)); + p = (u_char *)((caddr_t) oh + sizeof (struct ospf6_header)); for (lsa = ospf6_lsdb_head (oi->lsack_list); lsa; lsa = ospf6_lsdb_next (lsa)) @@ -1979,7 +1979,7 @@ ALIAS (debug_ospf6_message, "Debug All message\n" "Debug only sending message\n" "Debug only receiving message\n" - ); + ) DEFUN (no_debug_ospf6_message, @@ -2055,7 +2055,7 @@ ALIAS (no_debug_ospf6_message, "Debug All message\n" "Debug only sending message\n" "Debug only receiving message\n" - ); + ) int config_write_ospf6_debug_message (struct vty *vty) @@ -2116,7 +2116,7 @@ config_write_ospf6_debug_message (struct vty *vty) } void -install_element_ospf6_debug_message () +install_element_ospf6_debug_message (void) { install_element (ENABLE_NODE, &debug_ospf6_message_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_message_cmd); diff --git a/ospf6d/ospf6_message.h b/ospf6d/ospf6_message.h index 95b07ced..ebb6308e 100644 --- a/ospf6d/ospf6_message.h +++ b/ospf6d/ospf6_message.h @@ -116,26 +116,26 @@ struct ospf6_lsupdate /* It is just a sequence of LSA Headers */ /* Function definition */ -void ospf6_hello_print (struct ospf6_header *); -void ospf6_dbdesc_print (struct ospf6_header *); -void ospf6_lsreq_print (struct ospf6_header *); -void ospf6_lsupdate_print (struct ospf6_header *); -void ospf6_lsack_print (struct ospf6_header *); - -int ospf6_iobuf_size (unsigned int size); -int ospf6_receive (struct thread *thread); - -int ospf6_hello_send (struct thread *thread); -int ospf6_dbdesc_send (struct thread *thread); -int ospf6_dbdesc_send_newone (struct thread *thread); -int ospf6_lsreq_send (struct thread *thread); -int ospf6_lsupdate_send_interface (struct thread *thread); -int ospf6_lsupdate_send_neighbor (struct thread *thread); -int ospf6_lsack_send_interface (struct thread *thread); -int ospf6_lsack_send_neighbor (struct thread *thread); - -int config_write_ospf6_debug_message (struct vty *); -void install_element_ospf6_debug_message (); +extern void ospf6_hello_print (struct ospf6_header *); +extern void ospf6_dbdesc_print (struct ospf6_header *); +extern void ospf6_lsreq_print (struct ospf6_header *); +extern void ospf6_lsupdate_print (struct ospf6_header *); +extern void ospf6_lsack_print (struct ospf6_header *); + +extern int ospf6_iobuf_size (unsigned int size); +extern int ospf6_receive (struct thread *thread); + +extern int ospf6_hello_send (struct thread *thread); +extern int ospf6_dbdesc_send (struct thread *thread); +extern int ospf6_dbdesc_send_newone (struct thread *thread); +extern int ospf6_lsreq_send (struct thread *thread); +extern int ospf6_lsupdate_send_interface (struct thread *thread); +extern int ospf6_lsupdate_send_neighbor (struct thread *thread); +extern int ospf6_lsack_send_interface (struct thread *thread); +extern int ospf6_lsack_send_neighbor (struct thread *thread); + +extern int config_write_ospf6_debug_message (struct vty *); +extern void install_element_ospf6_debug_message (void); #endif /* OSPF6_MESSAGE_H */ diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 9c1cf236..8a5d698d 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -183,7 +183,7 @@ ospf6_neighbor_state_change (u_char next_state, struct ospf6_neighbor *on) } /* RFC2328 section 10.4 */ -int +static int need_adjacency (struct ospf6_neighbor *on) { if (on->ospf6_if->state == OSPF6_INTERFACE_POINTTOPOINT || @@ -551,7 +551,7 @@ inactivity_timer (struct thread *thread) /* vty functions */ /* show neighbor structure */ -void +static void ospf6_neighbor_show (struct vty *vty, struct ospf6_neighbor *on) { char router_id[16]; @@ -612,7 +612,7 @@ ospf6_neighbor_show (struct vty *vty, struct ospf6_neighbor *on) ospf6_interface_state_str[on->ospf6_if->state], VNL); } -void +static void ospf6_neighbor_show_drchoice (struct vty *vty, struct ospf6_neighbor *on) { char router_id[16]; @@ -641,7 +641,7 @@ ospf6_neighbor_show_drchoice (struct vty *vty, struct ospf6_neighbor *on) VNL); } -void +static void ospf6_neighbor_show_detail (struct vty *vty, struct ospf6_neighbor *on) { char drouter[16], bdrouter[16]; @@ -801,7 +801,7 @@ ALIAS (show_ipv6_ospf6_neighbor, "Neighbor list\n" "Display details\n" "Display DR choices\n" - ); + ) DEFUN (show_ipv6_ospf6_neighbor_one, show_ipv6_ospf6_neighbor_one_cmd, @@ -839,7 +839,7 @@ DEFUN (show_ipv6_ospf6_neighbor_one, } void -ospf6_neighbor_init () +ospf6_neighbor_init (void) { install_element (VIEW_NODE, &show_ipv6_ospf6_neighbor_cmd); install_element (VIEW_NODE, &show_ipv6_ospf6_neighbor_detail_cmd); @@ -878,7 +878,7 @@ ALIAS (debug_ospf6_neighbor, "Debug OSPFv3 Neighbor\n" "Debug OSPFv3 Neighbor State Change\n" "Debug OSPFv3 Neighbor Event\n" - ); + ) DEFUN (no_debug_ospf6_neighbor, no_debug_ospf6_neighbor_cmd, @@ -913,7 +913,7 @@ ALIAS (no_debug_ospf6_neighbor, "Debug OSPFv3 Neighbor\n" "Debug OSPFv3 Neighbor State Change\n" "Debug OSPFv3 Neighbor Event\n" - ); + ) int config_write_ospf6_debug_neighbor (struct vty *vty) @@ -929,7 +929,7 @@ config_write_ospf6_debug_neighbor (struct vty *vty) } void -install_element_ospf6_debug_neighbor () +install_element_ospf6_debug_neighbor (void) { install_element (ENABLE_NODE, &debug_ospf6_neighbor_cmd); install_element (ENABLE_NODE, &debug_ospf6_neighbor_detail_cmd); diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h index 8f94790d..b3bd173f 100644 --- a/ospf6d/ospf6_neighbor.h +++ b/ospf6d/ospf6_neighbor.h @@ -105,7 +105,7 @@ struct ospf6_neighbor #define OSPF6_NEIGHBOR_LOADING 7 #define OSPF6_NEIGHBOR_FULL 8 -const extern char *ospf6_neighbor_state_str[]; +extern const char *ospf6_neighbor_state_str[]; /* Function Prototypes */ @@ -119,20 +119,19 @@ struct ospf6_neighbor *ospf6_neighbor_create (u_int32_t, void ospf6_neighbor_delete (struct ospf6_neighbor *); /* Neighbor event */ -int hello_received (struct thread *); -int twoway_received (struct thread *); -int negotiation_done (struct thread *); -int exchange_done (struct thread *); -int loading_done (struct thread *); -int adj_ok (struct thread *); -int seqnumber_mismatch (struct thread *); -int bad_lsreq (struct thread *); -int oneway_received (struct thread *); -int inactivity_timer (struct thread *); - -void ospf6_neighbor_init (); -int config_write_ospf6_debug_neighbor (struct vty *vty); -void install_element_ospf6_debug_neighbor (); +extern int hello_received (struct thread *); +extern int twoway_received (struct thread *); +extern int negotiation_done (struct thread *); +extern int exchange_done (struct thread *); +extern int loading_done (struct thread *); +extern int adj_ok (struct thread *); +extern int seqnumber_mismatch (struct thread *); +extern int bad_lsreq (struct thread *); +extern int oneway_received (struct thread *); +extern int inactivity_timer (struct thread *); + +extern void ospf6_neighbor_init (void); +extern int config_write_ospf6_debug_neighbor (struct vty *vty); +extern void install_element_ospf6_debug_neighbor (void); #endif /* OSPF6_NEIGHBOR_H */ - diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c index 8c0cbf5e..96b82af3 100644 --- a/ospf6d/ospf6_network.c +++ b/ospf6d/ospf6_network.c @@ -38,7 +38,7 @@ struct in6_addr alldrouters6; /* setsockopt ReUseAddr to on */ void -ospf6_set_reuseaddr () +ospf6_set_reuseaddr (void) { u_int on = 0; if (setsockopt (ospf6_sock, SOL_SOCKET, SO_REUSEADDR, &on, @@ -48,7 +48,7 @@ ospf6_set_reuseaddr () /* setsockopt MulticastLoop to off */ void -ospf6_reset_mcastloop () +ospf6_reset_mcastloop (void) { u_int off = 0; if (setsockopt (ospf6_sock, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, @@ -58,13 +58,13 @@ ospf6_reset_mcastloop () } void -ospf6_set_pktinfo () +ospf6_set_pktinfo (void) { setsockopt_ipv6_pktinfo (ospf6_sock, 1); } void -ospf6_set_checksum () +ospf6_set_checksum (void) { int offset = 12; #ifndef DISABLE_IPV6_CHECKSUM @@ -78,7 +78,7 @@ ospf6_set_checksum () /* Make ospf6d's server socket. */ int -ospf6_serv_sock () +ospf6_serv_sock (void) { if (ospf6d_privs.change (ZPRIVS_RAISE)) zlog_err ("ospf6_serv_sock: could not raise privs"); @@ -193,7 +193,7 @@ ospf6_leave_alldrouters (u_int ifindex) #endif } -int +static int iov_count (struct iovec *iov) { int i; @@ -202,7 +202,7 @@ iov_count (struct iovec *iov) return i; } -int +static int iov_totallen (struct iovec *iov) { int i; diff --git a/ospf6d/ospf6_network.h b/ospf6d/ospf6_network.h index 9a4d795e..fd8758e8 100644 --- a/ospf6d/ospf6_network.h +++ b/ospf6d/ospf6_network.h @@ -29,22 +29,22 @@ extern struct in6_addr allspfrouters6; extern struct in6_addr alldrouters6; /* Function Prototypes */ -void ospf6_set_reuseaddr (); -void ospf6_reset_mcastloop (); -void ospf6_set_pktinfo (); -void ospf6_set_checksum (); - -int ospf6_serv_sock (); - -void ospf6_join_allspfrouters (u_int); -void ospf6_leave_allspfrouters (u_int); -void ospf6_join_alldrouters (u_int); -void ospf6_leave_alldrouters (u_int); - -int ospf6_sendmsg (struct in6_addr *, struct in6_addr *, - unsigned int *, struct iovec *); -int ospf6_recvmsg (struct in6_addr *, struct in6_addr *, - unsigned int *, struct iovec *); +extern void ospf6_set_reuseaddr (void); +extern void ospf6_reset_mcastloop (void); +extern void ospf6_set_pktinfo (void); +extern void ospf6_set_checksum (void); + +extern int ospf6_serv_sock (void); + +extern void ospf6_join_allspfrouters (u_int); +extern void ospf6_leave_allspfrouters (u_int); +extern void ospf6_join_alldrouters (u_int); +extern void ospf6_leave_alldrouters (u_int); + +extern int ospf6_sendmsg (struct in6_addr *, struct in6_addr *, + unsigned int *, struct iovec *); +extern int ospf6_recvmsg (struct in6_addr *, struct in6_addr *, + unsigned int *, struct iovec *); #endif /* OSPF6_NETWORK_H */ diff --git a/ospf6d/ospf6_proto.h b/ospf6d/ospf6_proto.h index 9fe821df..a8c1b1a0 100644 --- a/ospf6d/ospf6_proto.h +++ b/ospf6d/ospf6_proto.h @@ -112,11 +112,10 @@ do { \ OSPF6_PREFIX_SPACE ((op)->prefix_length)); \ } while (0) -void ospf6_prefix_apply_mask (struct ospf6_prefix *op); -void ospf6_prefix_options_printbuf (u_int8_t prefix_options, - char *buf, int size); -void ospf6_capability_printbuf (char capability, char *buf, int size); -void ospf6_options_printbuf (u_char *options, char *buf, int size); +extern void ospf6_prefix_apply_mask (struct ospf6_prefix *op); +extern void ospf6_prefix_options_printbuf (u_int8_t prefix_options, + char *buf, int size); +extern void ospf6_capability_printbuf (char capability, char *buf, int size); +extern void ospf6_options_printbuf (u_char *options, char *buf, int size); #endif /* OSPF6_PROTO_H */ - diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 38fdd51a..a89ed7e7 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -174,7 +174,7 @@ const char *ospf6_path_type_substr[OSPF6_PATH_TYPE_MAX] = struct ospf6_route * -ospf6_route_create () +ospf6_route_create (void) { struct ospf6_route *route; route = XCALLOC (MTYPE_OSPF6_ROUTE, sizeof (struct ospf6_route)); @@ -928,7 +928,7 @@ ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route) vty_out (vty, "%s", VNL); } -void +static void ospf6_route_show_table_summary (struct vty *vty, struct ospf6_route_table *table) { @@ -971,7 +971,7 @@ ospf6_route_show_table_summary (struct vty *vty, } } -void +static void ospf6_route_show_table_prefix (struct vty *vty, struct prefix *prefix, struct ospf6_route_table *table) @@ -993,7 +993,7 @@ ospf6_route_show_table_prefix (struct vty *vty, ospf6_route_unlock (route); } -void +static void ospf6_route_show_table_address (struct vty *vty, struct prefix *prefix, struct ospf6_route_table *table) @@ -1016,7 +1016,7 @@ ospf6_route_show_table_address (struct vty *vty, ospf6_route_unlock (route); } -void +static void ospf6_route_show_table_match (struct vty *vty, int detail, struct prefix *prefix, struct ospf6_route_table *table) @@ -1035,7 +1035,7 @@ ospf6_route_show_table_match (struct vty *vty, int detail, } } -void +static void ospf6_route_show_table_type (struct vty *vty, int detail, u_char type, struct ospf6_route_table *table) { @@ -1055,7 +1055,7 @@ ospf6_route_show_table_type (struct vty *vty, int detail, u_char type, } } -void +static void ospf6_route_show_table (struct vty *vty, int detail, struct ospf6_route_table *table) { @@ -1173,14 +1173,14 @@ ospf6_route_table_show (struct vty *vty, int argc, const char *argv[], return CMD_SUCCESS; } -void +static void ospf6_linkstate_show_header (struct vty *vty) { vty_out (vty, "%-7s %-15s %-15s %-8s %-14s %s%s", "Type", "Router-ID", "Net-ID", "Rtr-Bits", "Options", "Cost", VNL); } -void +static void ospf6_linkstate_show (struct vty *vty, struct ospf6_route *route) { u_int32_t router, id; @@ -1205,7 +1205,7 @@ ospf6_linkstate_show (struct vty *vty, struct ospf6_route *route) } -void +static void ospf6_linkstate_show_table_exact (struct vty *vty, struct prefix *prefix, struct ospf6_route_table *table) @@ -1227,7 +1227,7 @@ ospf6_linkstate_show_table_exact (struct vty *vty, ospf6_route_unlock (route); } -void +static void ospf6_linkstate_show_table (struct vty *vty, int detail, struct ospf6_route_table *table) { @@ -1393,7 +1393,7 @@ config_write_ospf6_debug_route (struct vty *vty) } void -install_element_ospf6_debug_route () +install_element_ospf6_debug_route (void) { install_element (ENABLE_NODE, &debug_ospf6_route_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_route_cmd); diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h index 722fa158..3ee52b5f 100644 --- a/ospf6d/ospf6_route.h +++ b/ospf6d/ospf6_route.h @@ -246,61 +246,59 @@ extern const char *ospf6_path_type_substr[OSPF6_PATH_TYPE_MAX]; (*(u_int32_t *)(&(x)->u.prefix6.s6_addr[4])) /* Function prototype */ -void ospf6_linkstate_prefix (u_int32_t adv_router, u_int32_t id, - struct prefix *prefix); -void ospf6_linkstate_prefix2str (struct prefix *prefix, char *buf, int size); - -struct ospf6_route *ospf6_route_create (); -void ospf6_route_delete (struct ospf6_route *); -struct ospf6_route *ospf6_route_copy (struct ospf6_route *route); - -void ospf6_route_lock (struct ospf6_route *route); -void ospf6_route_unlock (struct ospf6_route *route); - -struct ospf6_route * -ospf6_route_lookup (struct prefix *prefix, - struct ospf6_route_table *table); -struct ospf6_route * -ospf6_route_lookup_identical (struct ospf6_route *route, - struct ospf6_route_table *table); -struct ospf6_route * -ospf6_route_lookup_bestmatch (struct prefix *prefix, - struct ospf6_route_table *table); - -struct ospf6_route * -ospf6_route_add (struct ospf6_route *route, struct ospf6_route_table *table); -void -ospf6_route_remove (struct ospf6_route *route, struct ospf6_route_table *table); - -struct ospf6_route *ospf6_route_head (struct ospf6_route_table *table); -struct ospf6_route *ospf6_route_next (struct ospf6_route *route); -struct ospf6_route *ospf6_route_best_next (struct ospf6_route *route); - -struct ospf6_route *ospf6_route_match_head (struct prefix *prefix, +extern void ospf6_linkstate_prefix (u_int32_t adv_router, u_int32_t id, + struct prefix *prefix); +extern void ospf6_linkstate_prefix2str (struct prefix *prefix, char *buf, + int size); + +extern struct ospf6_route *ospf6_route_create (void); +extern void ospf6_route_delete (struct ospf6_route *); +extern struct ospf6_route *ospf6_route_copy (struct ospf6_route *route); + +extern void ospf6_route_lock (struct ospf6_route *route); +extern void ospf6_route_unlock (struct ospf6_route *route); + +extern struct ospf6_route *ospf6_route_lookup (struct prefix *prefix, + struct ospf6_route_table *table); +extern struct ospf6_route *ospf6_route_lookup_identical (struct ospf6_route *route, struct ospf6_route_table *table); -struct ospf6_route *ospf6_route_match_next (struct prefix *prefix, - struct ospf6_route *route); +extern struct ospf6_route *ospf6_route_lookup_bestmatch (struct prefix *prefix, + struct ospf6_route_table *table); -void ospf6_route_remove_all (struct ospf6_route_table *); -struct ospf6_route_table *ospf6_route_table_create (int s, int t); -void ospf6_route_table_delete (struct ospf6_route_table *); -void ospf6_route_dump (struct ospf6_route_table *table); +extern struct ospf6_route *ospf6_route_add (struct ospf6_route *route, + struct ospf6_route_table *table); +extern void ospf6_route_remove (struct ospf6_route *route, + struct ospf6_route_table *table); + +extern struct ospf6_route *ospf6_route_head (struct ospf6_route_table *table); +extern struct ospf6_route *ospf6_route_next (struct ospf6_route *route); +extern struct ospf6_route *ospf6_route_best_next (struct ospf6_route *route); + +extern struct ospf6_route *ospf6_route_match_head (struct prefix *prefix, + struct ospf6_route_table *table); +extern struct ospf6_route *ospf6_route_match_next (struct prefix *prefix, + struct ospf6_route *route); +extern void ospf6_route_remove_all (struct ospf6_route_table *); +extern struct ospf6_route_table *ospf6_route_table_create (int s, int t); +extern void ospf6_route_table_delete (struct ospf6_route_table *); +extern void ospf6_route_dump (struct ospf6_route_table *table); -void ospf6_route_show (struct vty *vty, struct ospf6_route *route); -void ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route); +extern void ospf6_route_show (struct vty *vty, struct ospf6_route *route); +extern void ospf6_route_show_detail (struct vty *vty, struct ospf6_route *route); -int ospf6_route_table_show (struct vty *, int, const char *[], - struct ospf6_route_table *); -int ospf6_linkstate_table_show (struct vty *vty, int argc, const char *argv[], - struct ospf6_route_table *table); +extern int ospf6_route_table_show (struct vty *, int, const char *[], + struct ospf6_route_table *); +extern int ospf6_linkstate_table_show (struct vty *vty, int argc, + const char *argv[], + struct ospf6_route_table *table); -void ospf6_brouter_show_header (struct vty *vty); -void ospf6_brouter_show (struct vty *vty, struct ospf6_route *route); +extern void ospf6_brouter_show_header (struct vty *vty); +extern void ospf6_brouter_show (struct vty *vty, struct ospf6_route *route); -int config_write_ospf6_debug_route (struct vty *vty); -void install_element_ospf6_debug_route (); -void ospf6_route_init (); +extern int config_write_ospf6_debug_route (struct vty *vty); +extern void install_element_ospf6_debug_route (void); +extern void ospf6_route_init (void); #endif /* OSPF6_ROUTE_H */ diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c index a1d8d4c9..8d9842ce 100644 --- a/ospf6d/ospf6_snmp.c +++ b/ospf6d/ospf6_snmp.c @@ -25,11 +25,12 @@ #ifdef HAVE_NETSNMP #include <net-snmp/net-snmp-config.h> -#endif /*HAVE_NETSNMP*/ - +#include <net-snmp/net-snmp-includes.h> +#else #include <asn1.h> #include <snmp.h> #include <snmp_impl.h> +#endif #include "log.h" #include "vty.h" diff --git a/ospf6d/ospf6_snmp.h b/ospf6d/ospf6_snmp.h index 7ef784c9..5c67893c 100644 --- a/ospf6d/ospf6_snmp.h +++ b/ospf6d/ospf6_snmp.h @@ -22,7 +22,7 @@ #ifndef OSPF6_SNMP_H #define OSPF6_SNMP_H -void ospf6_snmp_init (struct thread_master *); +extern void ospf6_snmp_init (struct thread_master *); #endif /*OSPF6_SNMP_H*/ diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 08c1eb73..44e11f9d 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -43,7 +43,7 @@ unsigned char conf_debug_ospf6_spf = 0; -int +static int ospf6_vertex_cmp (void *a, void *b) { struct ospf6_vertex *va = (struct ospf6_vertex *) a; @@ -53,7 +53,7 @@ ospf6_vertex_cmp (void *a, void *b) return (va->cost - vb->cost); } -int +static int ospf6_vertex_id_cmp (void *a, void *b) { struct ospf6_vertex *va = (struct ospf6_vertex *) a; @@ -70,7 +70,7 @@ ospf6_vertex_id_cmp (void *a, void *b) return ret; } -struct ospf6_vertex * +static struct ospf6_vertex * ospf6_vertex_create (struct ospf6_lsa *lsa) { struct ospf6_vertex *v; @@ -113,14 +113,14 @@ ospf6_vertex_create (struct ospf6_lsa *lsa) return v; } -void +static void ospf6_vertex_delete (struct ospf6_vertex *v) { list_delete (v->child_list); XFREE (MTYPE_OSPF6_VERTEX, v); } -struct ospf6_lsa * +static struct ospf6_lsa * ospf6_lsdesc_lsa (caddr_t lsdesc, struct ospf6_vertex *v) { struct ospf6_lsa *lsa; @@ -166,7 +166,7 @@ ospf6_lsdesc_lsa (caddr_t lsdesc, struct ospf6_vertex *v) return lsa; } -char * +static char * ospf6_lsdesc_backlink (struct ospf6_lsa *lsa, caddr_t lsdesc, struct ospf6_vertex *v) { @@ -218,7 +218,7 @@ ospf6_lsdesc_backlink (struct ospf6_lsa *lsa, return found; } -void +static void ospf6_nexthop_calc (struct ospf6_vertex *w, struct ospf6_vertex *v, caddr_t lsdesc) { @@ -274,7 +274,7 @@ ospf6_nexthop_calc (struct ospf6_vertex *w, struct ospf6_vertex *v, zlog_debug ("No nexthop for %s found", w->name); } -int +static int ospf6_spf_install (struct ospf6_vertex *v, struct ospf6_route_table *result_table) { @@ -487,7 +487,7 @@ ospf6_spf_calculation (u_int32_t router_id, pqueue_delete (candidate_list); } -void +static void ospf6_spf_log_database (struct ospf6_area *oa) { char *p, *end, buffer[256]; @@ -512,7 +512,7 @@ ospf6_spf_log_database (struct ospf6_area *oa) zlog_debug ("%s", buffer); } -int +static int ospf6_spf_calculation_thread (struct thread *t) { struct ospf6_area *oa; @@ -689,7 +689,7 @@ config_write_ospf6_debug_spf (struct vty *vty) } void -install_element_ospf6_debug_spf () +install_element_ospf6_debug_spf (void) { install_element (ENABLE_NODE, &debug_ospf6_spf_process_cmd); install_element (ENABLE_NODE, &debug_ospf6_spf_time_cmd); @@ -706,7 +706,7 @@ install_element_ospf6_debug_spf () } void -ospf6_spf_init () +ospf6_spf_init (void) { } diff --git a/ospf6d/ospf6_spf.h b/ospf6d/ospf6_spf.h index 728eec51..c7069c25 100644 --- a/ospf6d/ospf6_spf.h +++ b/ospf6d/ospf6_spf.h @@ -77,18 +77,18 @@ struct ospf6_vertex #define VERTEX_IS_TYPE(t, v) \ ((v)->type == OSPF6_VERTEX_TYPE_ ## t ? 1 : 0) -void ospf6_spf_table_finish (struct ospf6_route_table *result_table); -void ospf6_spf_calculation (u_int32_t router_id, - struct ospf6_route_table *result_table, - struct ospf6_area *oa); -void ospf6_spf_schedule (struct ospf6_area *oa); - -void ospf6_spf_display_subtree (struct vty *vty, const char *prefix, - int rest, struct ospf6_vertex *v); - -int config_write_ospf6_debug_spf (struct vty *vty); -void install_element_ospf6_debug_spf (); -void ospf6_spf_init (); +extern void ospf6_spf_table_finish (struct ospf6_route_table *result_table); +extern void ospf6_spf_calculation (u_int32_t router_id, + struct ospf6_route_table *result_table, + struct ospf6_area *oa); +extern void ospf6_spf_schedule (struct ospf6_area *oa); + +extern void ospf6_spf_display_subtree (struct vty *vty, const char *prefix, + int rest, struct ospf6_vertex *v); + +extern int config_write_ospf6_debug_spf (struct vty *vty); +extern void install_element_ospf6_debug_spf (void); +extern void ospf6_spf_init (void); #endif /* OSPF6_SPF_H */ diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index deaa7ff5..9592d555 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -51,7 +51,7 @@ /* global ospf6d variable */ struct ospf6 *ospf6; -void +static void ospf6_top_lsdb_hook_add (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -65,7 +65,7 @@ ospf6_top_lsdb_hook_add (struct ospf6_lsa *lsa) } } -void +static void ospf6_top_lsdb_hook_remove (struct ospf6_lsa *lsa) { switch (ntohs (lsa->header->type)) @@ -79,21 +79,21 @@ ospf6_top_lsdb_hook_remove (struct ospf6_lsa *lsa) } } -void +static void ospf6_top_route_hook_add (struct ospf6_route *route) { ospf6_abr_originate_summary (route); ospf6_zebra_route_update_add (route); } -void +static void ospf6_top_route_hook_remove (struct ospf6_route *route) { ospf6_abr_originate_summary (route); ospf6_zebra_route_update_remove (route); } -void +static void ospf6_top_brouter_hook_add (struct ospf6_route *route) { ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); @@ -101,7 +101,7 @@ ospf6_top_brouter_hook_add (struct ospf6_route *route) ospf6_abr_originate_summary (route); } -void +static void ospf6_top_brouter_hook_remove (struct ospf6_route *route) { ospf6_abr_examin_brouter (ADV_ROUTER_IN_PREFIX (&route->prefix)); @@ -109,8 +109,8 @@ ospf6_top_brouter_hook_remove (struct ospf6_route *route) ospf6_abr_originate_summary (route); } -struct ospf6 * -ospf6_create () +static struct ospf6 * +ospf6_create (void) { struct ospf6 *o; @@ -143,7 +143,7 @@ ospf6_create () return o; } -void +static void ospf6_delete (struct ospf6 *o) { struct listnode *node, *nnode; @@ -164,7 +164,7 @@ ospf6_delete (struct ospf6 *o) XFREE (MTYPE_OSPF6_TOP, o); } -void +static void ospf6_enable (struct ospf6 *o) { struct listnode *node, *nnode; @@ -178,7 +178,7 @@ ospf6_enable (struct ospf6 *o) } } -void +static void ospf6_disable (struct ospf6 *o) { struct listnode *node, *nnode; @@ -197,7 +197,7 @@ ospf6_disable (struct ospf6 *o) } } -int +static int ospf6_maxage_remover (struct thread *thread) { struct ospf6 *o = (struct ospf6 *) THREAD_ARG (thread); @@ -426,7 +426,7 @@ DEFUN (no_ospf6_interface_area, return CMD_SUCCESS; } -void +static void ospf6_show (struct vty *vty, struct ospf6 *o) { struct listnode *n; @@ -498,7 +498,7 @@ ALIAS (show_ipv6_ospf6_route, "Specify IPv6 prefix\n" "Detailed information\n" "Summary of route table\n" - ); + ) DEFUN (show_ipv6_ospf6_route_match, show_ipv6_ospf6_route_match_cmd, @@ -586,7 +586,7 @@ ALIAS (show_ipv6_ospf6_route, "Dispaly Inter-Area routes\n" "Dispaly Type-1 External routes\n" "Dispaly Type-2 External routes\n" - ); + ) DEFUN (show_ipv6_ospf6_route_type_detail, show_ipv6_ospf6_route_type_detail_cmd, @@ -617,7 +617,7 @@ DEFUN (show_ipv6_ospf6_route_type_detail, } /* OSPF configuration write function. */ -int +static int config_write_ospf6 (struct vty *vty) { char router_id[16]; @@ -659,7 +659,7 @@ static struct cmd_node ospf6_node = /* Install ospf related commands. */ void -ospf6_top_init () +ospf6_top_init (void) { /* Install ospf6 top node. */ install_node (&ospf6_node, config_write_ospf6); diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h index eae20e6e..ba485f9e 100644 --- a/ospf6d/ospf6_top.h +++ b/ospf6d/ospf6_top.h @@ -68,9 +68,9 @@ struct ospf6 extern struct ospf6 *ospf6; /* prototypes */ -void ospf6_top_init (); +extern void ospf6_top_init (void); -void ospf6_maxage_remove (struct ospf6 *o); +extern void ospf6_maxage_remove (struct ospf6 *o); #endif /* OSPF6_TOP_H */ diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 7b3d2438..a2a97d29 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -47,7 +47,7 @@ struct zclient *zclient = NULL; struct in_addr router_id_zebra; /* Router-id update message from zebra. */ -int +static int ospf6_router_id_update_zebra (int command, struct zclient *zclient, zebra_size_t length) { @@ -88,7 +88,7 @@ ospf6_zebra_no_redistribute (int type) } /* Inteface addition message from zebra. */ -int +static int ospf6_zebra_if_add (int command, struct zclient *zclient, zebra_size_t length) { struct interface *ifp; @@ -101,7 +101,7 @@ ospf6_zebra_if_add (int command, struct zclient *zclient, zebra_size_t length) return 0; } -int +static int ospf6_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length) { struct interface *ifp; @@ -125,7 +125,7 @@ ospf6_zebra_if_del (int command, struct zclient *zclient, zebra_size_t length) return 0; } -int +static int ospf6_zebra_if_state_update (int command, struct zclient *zclient, zebra_size_t length) { @@ -142,7 +142,7 @@ ospf6_zebra_if_state_update (int command, struct zclient *zclient, return 0; } -int +static int ospf6_zebra_if_address_update_add (int command, struct zclient *zclient, zebra_size_t length) { @@ -165,7 +165,7 @@ ospf6_zebra_if_address_update_add (int command, struct zclient *zclient, return 0; } -int +static int ospf6_zebra_if_address_update_delete (int command, struct zclient *zclient, zebra_size_t length) { @@ -188,7 +188,7 @@ ospf6_zebra_if_address_update_delete (int command, struct zclient *zclient, return 0; } -int +static int ospf6_zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length) { @@ -318,7 +318,7 @@ DEFUN (no_router_zebra, } /* Zebra configuration write function. */ -int +static int config_write_ospf6_zebra (struct vty *vty) { if (! zclient->enable) @@ -554,7 +554,7 @@ DEFUN (no_redistribute_ospf6, } void -ospf6_zebra_init () +ospf6_zebra_init (void) { /* Allocate zebra structure. */ zclient = zclient_new (); @@ -624,7 +624,7 @@ ALIAS (debug_ospf6_zebra_sendrecv, DEBUG_STR OSPF6_STR "Debug connection between zebra\n" - ); + ) DEFUN (no_debug_ospf6_zebra_sendrecv, @@ -661,7 +661,7 @@ ALIAS (no_debug_ospf6_zebra_sendrecv, DEBUG_STR OSPF6_STR "Debug connection between zebra\n" - ); + ) int config_write_ospf6_debug_zebra (struct vty *vty) @@ -679,7 +679,7 @@ config_write_ospf6_debug_zebra (struct vty *vty) } void -install_element_ospf6_debug_zebra () +install_element_ospf6_debug_zebra (void) { install_element (ENABLE_NODE, &debug_ospf6_zebra_cmd); install_element (ENABLE_NODE, &no_debug_ospf6_zebra_cmd); diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h index fb9877bf..24a4ae63 100644 --- a/ospf6d/ospf6_zebra.h +++ b/ospf6d/ospf6_zebra.h @@ -37,17 +37,15 @@ extern unsigned char conf_debug_ospf6_zebra; extern struct zclient *zclient; -void ospf6_zebra_route_update_add (struct ospf6_route *request); -void ospf6_zebra_route_update_remove (struct ospf6_route *request); +extern void ospf6_zebra_route_update_add (struct ospf6_route *request); +extern void ospf6_zebra_route_update_remove (struct ospf6_route *request); -void ospf6_zebra_redistribute (int); -void ospf6_zebra_no_redistribute (int); -#define ospf6_zebra_is_redistribute(type) \ - (zclient->redist[type]) -void ospf6_zebra_init (); +extern void ospf6_zebra_redistribute (int); +extern void ospf6_zebra_no_redistribute (int); +#define ospf6_zebra_is_redistribute(type) (zclient->redist[type]) +extern void ospf6_zebra_init (void); -int config_write_ospf6_debug_zebra (struct vty *vty); -void install_element_ospf6_debug_zebra (); +extern int config_write_ospf6_debug_zebra (struct vty *vty); +extern void install_element_ospf6_debug_zebra (void); #endif /*OSPF6_ZEBRA_H*/ - diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 86836fc5..7a766c8d 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -50,11 +50,6 @@ char ospf6_daemon_version[] = OSPF6_DAEMON_VERSION; -void -ospf6_debug () -{ -} - struct route_node * route_prev (struct route_node *node) { @@ -104,7 +99,7 @@ static struct cmd_node debug_node = 1 /* VTYSH */ }; -int +static int config_write_ospf6_debug (struct vty *vty) { config_write_ospf6_debug_message (vty); @@ -221,7 +216,7 @@ ALIAS (show_ipv6_ospf6_database, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_type, show_ipv6_ospf6_database_type_cmd, @@ -315,7 +310,7 @@ ALIAS (show_ipv6_ospf6_database_type, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_id, show_ipv6_ospf6_database_id_cmd, @@ -384,7 +379,7 @@ ALIAS (show_ipv6_ospf6_database_id, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) ALIAS (show_ipv6_ospf6_database_id, show_ipv6_ospf6_database_linkstate_id_cmd, @@ -395,7 +390,7 @@ ALIAS (show_ipv6_ospf6_database_id, "Display Link state database\n" "Search by Link state ID\n" "Specify Link state ID as IPv4 address notation\n" - ); + ) ALIAS (show_ipv6_ospf6_database_id, show_ipv6_ospf6_database_linkstate_id_detail_cmd, @@ -410,7 +405,7 @@ ALIAS (show_ipv6_ospf6_database_id, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_router, show_ipv6_ospf6_database_router_cmd, @@ -481,7 +476,7 @@ ALIAS (show_ipv6_ospf6_database_router, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) ALIAS (show_ipv6_ospf6_database_router, show_ipv6_ospf6_database_adv_router_cmd, @@ -492,7 +487,7 @@ ALIAS (show_ipv6_ospf6_database_router, "Display Link state database\n" "Search by Advertising Router\n" "Specify Advertising Router as IPv4 address notation\n" - ); + ) ALIAS (show_ipv6_ospf6_database_router, show_ipv6_ospf6_database_adv_router_detail_cmd, @@ -507,7 +502,7 @@ ALIAS (show_ipv6_ospf6_database_router, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_type_id, show_ipv6_ospf6_database_type_id_cmd, @@ -614,7 +609,7 @@ ALIAS (show_ipv6_ospf6_database_type_id, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) ALIAS (show_ipv6_ospf6_database_type_id, show_ipv6_ospf6_database_type_linkstate_id_cmd, @@ -636,7 +631,7 @@ ALIAS (show_ipv6_ospf6_database_type_id, "Display Intra-Area-Prefix LSAs\n" "Search by Link state ID\n" "Specify Link state ID as IPv4 address notation\n" - ); + ) ALIAS (show_ipv6_ospf6_database_type_id, show_ipv6_ospf6_database_type_linkstate_id_detail_cmd, @@ -662,7 +657,7 @@ ALIAS (show_ipv6_ospf6_database_type_id, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_type_router, show_ipv6_ospf6_database_type_router_cmd, @@ -771,7 +766,7 @@ ALIAS (show_ipv6_ospf6_database_type_router, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) ALIAS (show_ipv6_ospf6_database_type_router, show_ipv6_ospf6_database_type_adv_router_cmd, @@ -793,7 +788,7 @@ ALIAS (show_ipv6_ospf6_database_type_router, "Display Intra-Area-Prefix LSAs\n" "Search by Advertising Router\n" "Specify Advertising Router as IPv4 address notation\n" - ); + ) ALIAS (show_ipv6_ospf6_database_type_router, show_ipv6_ospf6_database_type_adv_router_detail_cmd, @@ -819,7 +814,7 @@ ALIAS (show_ipv6_ospf6_database_type_router, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_id_router, show_ipv6_ospf6_database_id_router_cmd, @@ -901,7 +896,7 @@ ALIAS (show_ipv6_ospf6_database_id_router, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, show_ipv6_ospf6_database_adv_router_linkstate_id_cmd, @@ -985,7 +980,7 @@ ALIAS (show_ipv6_ospf6_database_adv_router_linkstate_id, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_type_id_router, show_ipv6_ospf6_database_type_id_router_cmd, @@ -1104,7 +1099,7 @@ ALIAS (show_ipv6_ospf6_database_type_id_router, "Specify Advertising Router as IPv4 address notation\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, show_ipv6_ospf6_database_type_adv_router_linkstate_id_cmd, @@ -1229,7 +1224,7 @@ ALIAS (show_ipv6_ospf6_database_type_adv_router_linkstate_id, "Specify Link state ID as IPv4 address notation\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_self_originated, show_ipv6_ospf6_database_self_originated_cmd, @@ -1386,7 +1381,7 @@ ALIAS (show_ipv6_ospf6_database_type_self_originated, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd, @@ -1501,7 +1496,7 @@ ALIAS (show_ipv6_ospf6_database_type_self_originated_linkstate_id, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_database_type_id_self_originated, show_ipv6_ospf6_database_type_id_self_originated_cmd, @@ -1614,7 +1609,7 @@ ALIAS (show_ipv6_ospf6_database_type_id_self_originated, "Display details of LSAs\n" "Dump LSAs\n" "Display LSA's internal information\n" - ); + ) DEFUN (show_ipv6_ospf6_border_routers, @@ -1675,7 +1670,7 @@ ALIAS (show_ipv6_ospf6_border_routers, "Display routing table for ABR and ASBR\n" "Specify Router-ID\n" "Display Detail\n" - ); + ) DEFUN (show_ipv6_ospf6_linkstate, show_ipv6_ospf6_linkstate_cmd, @@ -1709,7 +1704,7 @@ ALIAS (show_ipv6_ospf6_linkstate, "Display linkstate routing table\n" "Display Router Entry\n" "Specify Router ID as IPv4 address notation\n" - ); + ) ALIAS (show_ipv6_ospf6_linkstate, show_ipv6_ospf6_linkstate_network_cmd, @@ -1721,7 +1716,7 @@ ALIAS (show_ipv6_ospf6_linkstate, "Display Network Entry\n" "Specify Router ID as IPv4 address notation\n" "Specify Link state ID as IPv4 address notation\n" - ); + ) DEFUN (show_ipv6_ospf6_linkstate_detail, show_ipv6_ospf6_linkstate_detail_cmd, @@ -1757,7 +1752,7 @@ DEFUN (show_ipv6_ospf6_linkstate_detail, /* Install ospf related commands. */ void -ospf6_init () +ospf6_init (void) { ospf6_top_init (); ospf6_area_init (); diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h index 2d1f725b..b6f1b737 100644 --- a/ospf6d/ospf6d.h +++ b/ospf6d/ospf6d.h @@ -112,10 +112,10 @@ extern struct thread_master *master; /* Function Prototypes */ -struct route_node *route_prev (struct route_node *node); +extern struct route_node *route_prev (struct route_node *node); -void ospf6_debug (); -void ospf6_init (); +extern void ospf6_debug (void); +extern void ospf6_init (void); #endif /* OSPF6D_H */ |