mirror_frr/ospf6d
Paul Jakma 1f9a9fffc1 Fix most compiler warnings in default GCC build.
Fix lots of warnings. Some const and type-pun breaks strict-aliasing
warnings left but much reduced.

* bgp_advertise.h: (struct bgp_advertise_fifo) is functionally identical to
  (struct fifo), so just use that.  Makes it clearer the beginning of
  (struct bgp_advertise) is compatible with with (struct fifo), which seems
  to be enough for gcc.
  Add a BGP_ADV_FIFO_HEAD macro to contain the right cast to try shut up
  type-punning breaks strict aliasing warnings.
* bgp_packet.c: Use BGP_ADV_FIFO_HEAD.
  (bgp_route_refresh_receive) fix an interesting logic error in
  (!ok || (ret != BLAH)) where ret is only well-defined if ok.
* bgp_vty.c: Peer commands should use bgp_vty_return to set their return.
* jhash.{c,h}: Can take const on * args without adding issues & fix warnings.
* libospf.h: LSA sequence numbers use the unsigned range of values, and
  constants need to be set to unsigned, or it causes warnings in ospf6d.
* md5.h: signedness of caddr_t is implementation specific, change to an
  explicit (uint_8 *), fix sign/unsigned comparison warnings.
* vty.c: (vty_log_fixed) const on level is well-intentioned, but not going
  to fly given iov_base.
* workqueue.c: ALL_LIST_ELEMENTS_RO tests for null pointer, which is always
  true for address of static variable.  Correct but pointless warning in
  this case, but use a 2nd pointer to shut it up.
* ospf6_route.h: Add a comment about the use of (struct prefix) to stuff 2
  different 32 bit IDs into in (struct ospf6_route), and the resulting
  type-pun strict-alias breakage warnings this causes.  Need to use 2
  different fields to fix that warning?

general:

* remove unused variables, other than a few cases where they serve a
  sufficiently useful documentary purpose (e.g.  for code that needs
  fixing), or they're required dummies.  In those cases, try mark them as
  unused.
* Remove dead code that can't be reached.
* Quite a few 'no ...' forms of vty commands take arguments, but do not
  check the argument matches the command being negated.  E.g., should
  'distance X <prefix>' succeed if previously 'distance Y <prefix>' was set?
  Or should it be required that the distance match the previously configured
  distance for the prefix?
  Ultimately, probably better to be strict about this.  However, changing
  from slack to strict might expose problems in command aliases and tools.
* Fix uninitialised use of variables.
* Fix sign/unsigned comparison warnings by making signedness of types consistent.
* Mark functions as static where their use is restricted to the same compilation
  unit.
* Add required headers
* Move constants defined in headers into code.
* remove dead, unused functions that have no debug purpose.

(cherry picked from commit 7aa9dcef80b2ce50ecaa77653d87c8b84e009c49)

Conflicts:
	bgpd/bgp_advertise.h
	bgpd/bgp_mplsvpn.c
	bgpd/bgp_nexthop.c
	bgpd/bgp_packet.c
	bgpd/bgp_route.c
	bgpd/bgp_routemap.c
	bgpd/bgp_vty.c
	lib/command.c
	lib/if.c
	lib/jhash.c
	lib/workqueue.c
	ospf6d/ospf6_lsa.c
	ospf6d/ospf6_neighbor.h
	ospf6d/ospf6_spf.c
	ospf6d/ospf6_top.c
	ospfd/ospf_api.c
	zebra/router-id.c
	zebra/rt_netlink.c
	zebra/rt_netlink.h
2016-05-26 18:57:39 +00:00
..
.gitignore [administrivia] Update gitignore files 2008-08-22 20:02:08 +01:00
Makefile.am build: Remove the old PIC/PIE patch, let libtool sort it out 2016-05-25 20:38:35 -04:00
ospf6_abr.c ospf6d: Fix for crash when non area 0 network entered first 2016-02-23 18:47:55 -05:00
ospf6_abr.h Fix most compiler warnings in default GCC build. 2016-05-26 18:57:39 +00:00
ospf6_area.c Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster 2015-11-27 08:58:52 -08:00
ospf6_area.h ospf6d: ospfv3-stub-area-support.patch 2015-05-19 18:03:40 -07:00
ospf6_asbr.c Quagga: prefix2str fixup 2015-11-23 13:31:11 -08:00
ospf6_asbr.h ospf6d: ospfv3-stub-area-support.patch 2015-05-19 18:03:40 -07:00
ospf6_bfd.c zebra - BFD client de-registration support 2016-05-08 20:11:18 -07:00
ospf6_bfd.h Fix for IPv6 OSPF BFD session staying down when ifdown/ifup on logical interfaces 2015-10-09 13:44:32 -07:00
ospf6_flood.c ospfd: ospfd-warnings.patch 2015-05-19 18:29:14 -07:00
ospf6_flood.h ospf6d: ospfv3-stub-area-support.patch 2015-05-19 18:03:40 -07:00
ospf6_interface.c ospf6d: Fix printf % code usage 2016-05-19 10:42:12 -04:00
ospf6_interface.h Support of BFD status in Quagga 2015-08-31 14:56:11 -07:00
ospf6_intra.c ospf6d: Fix double increment of Sequence Number 2016-01-18 16:27:45 -08:00
ospf6_intra.h *: nuke ^L (page feed) 2014-06-04 06:58:02 +02:00
ospf6_lsa.c Bug in ospf6_lsa_compare() 2016-05-26 01:14:44 +00:00
ospf6_lsa.h Quagga: prefix2str fixup 2015-11-23 13:31:11 -08:00
ospf6_lsdb.c ospf6_lsdb: trivial, make it clear that showfunc is set before deref. 2016-05-26 01:08:36 +00:00
ospf6_lsdb.h ospf6_lsdb: trivial, make it clear that showfunc is set before deref. 2016-05-26 01:08:36 +00:00
ospf6_main.c zebra - BFD client de-registration support 2016-05-08 20:11:18 -07:00
ospf6_message.c arm compilation failures. 2015-07-29 16:02:26 -07:00
ospf6_message.h ospf6d: decode message type with LOOKUP() 2011-12-13 19:27:34 +04:00
ospf6_neighbor.c Add "no debug ospf" and "no debug ospf6" commands to disable all ospf debugging 2015-11-03 10:37:25 -08:00
ospf6_neighbor.h Support of BFD status in Quagga 2015-08-31 14:56:11 -07:00
ospf6_network.c Fix most compiler warnings in default GCC build. 2016-05-26 18:57:39 +00:00
ospf6_network.h Fix most compiler warnings in default GCC build. 2016-05-26 18:57:39 +00:00
ospf6_proto.c ospf6d: fix out of bounds write in ospf6_prefix_apply_mask 2012-02-11 15:26:19 +01:00
ospf6_proto.h ospf6d/ospfd: refactor some common defines 2013-10-22 18:01:31 -07:00
ospf6_route.c Quagga: prefix2str fixup 2015-11-23 13:31:11 -08:00
ospf6_route.h Fix most compiler warnings in default GCC build. 2016-05-26 18:57:39 +00:00
ospf6_snmp.c ospf6d: fix uninitialized warning in SNMP 2016-05-26 15:33:32 +00:00
ospf6_snmp.h ospf6d: add SNMP notifications/traps support 2012-06-25 19:05:17 +02:00
ospf6_spf.c Fix most compiler warnings in default GCC build. 2016-05-26 18:57:39 +00:00
ospf6_spf.h ospf6d: ospfv3-abr-ecmp-support.patch 2015-05-19 18:03:39 -07:00
ospf6_top.c Enable OSPF "log-adjacency-changes" by default 2015-11-03 10:48:30 -08:00
ospf6_top.h Command to adjust min-arrival value in Milliseconds. 2015-05-19 18:04:07 -07:00
ospf6_zebra.c quagga: delete interface from default table when moved to vrf 2016-03-18 19:53:15 +00:00
ospf6_zebra.h *: add VRF ID in the API message header 2015-11-03 22:04:36 -08:00
ospf6d.c lib: zclient.c remove extern struct thread_master * 2015-09-23 13:26:56 -07:00
ospf6d.conf.sample Ospf6d merge from Zebra repository with added privs stuff and merged 2004-05-18 18:57:06 +00:00
ospf6d.h *: nuke ^L (page feed) 2014-06-04 06:58:02 +02:00
OSPFv3-MIB.txt snmp: fix OSPFV3-MIB implementation 2012-06-25 19:05:16 +02:00
README ospf6d: add "auto-cost reference-bandwidth" command 2014-03-21 06:28:48 +01:00

		  Zebra OSPF daemon for IPv6 network

			     2003/08/18

README for newer code is not yet. General usage should remain
the same. For further usage, see command helps by typing '?'
in vty, and then imagin ! ;p) Previous README contents follows.

		  Zebra OSPF daemon for IPv6 network

			     2001/12/20

Zebra OSPF6d is OSPF version 3 daemon which is specified by
"OSPF for IPv6" (RFC 2740).

*** NOTE ***
  Zebra ospf6d is in development yet. It may lack some functionalities,
  and may have some bugs. Use the latest version from the anoncvs
  repository (http://www.zebra.org/cvs.html) !

This file README is like memo yet, so please feel free to ask
<yasu@sfc.wide.ad.jp> by E-mail. Patches will be appriciated.

ospf6d's vty port was default to 2606/tcp.
Use commands below.

VIEW NODE:
  show ipv6 ospf6
    To see Router-ID, uptime of ospf6d, some statistics.

  show ipv6 ospf6 database ...
    This command shows LSA database. You can specify
    LS-type/LS-ID/Advertising-Router of LSAs. '*' is recognized.

  show ipv6 ospf6 interface ...
    To see the status of the OSPF interface, and the configuration
    like interface costs.

  show ipv6 ospf6 neighbor ...
    Shows state of neighbors and choosed (Backup) DR on the I/F.

  show ipv6 ospf6 route (X::X)
    This command shows internal routing table of the ospf6d.
    Routes not calculated by OSPFv3 (like connected routes)
    are not shown. If Address is specified (X::X), shows the route
    that the address matches.

  show ipv6 ospf6 route redistribute (X::X)
    Shows the routes advertised as AS-External routes by the router
    itself. If Address is specified (X::X), shows the route
    that the address matches.

CONFIG NODE:
  interface NAME
    To enter INTERFACE NODE

  router ospf6 ...
    To enter OSPF6 NODE

INTERFACE NODE:
  ipv6 ospf6 cost COST
    Sets the interface's output cost. Depends on interface bandwidth by default.

  ipv6 ospf6 hello-interval HELLOINTERVAL
    Sets the interface's Hello Interval. default 10

  ipv6 ospf6 dead-interval DEADINTERVAL
    Sets the interface's Router Dead Interval. default 40

  ipv6 ospf6 retransmit-interval RETRANSMITINTERVAL
    Sets the interface's Rxmt Interval. default 5

  ipv6 ospf6 priority PRIORITY
    Sets the interface's Router Priority. default 1

  ipv6 ospf6 transmit-delay TRANSMITDELAY
    Sets the interface's Inf-Trans-Delay. default 1

OSPF6 NODE:
  router-id A.B.C.D
    Sets the router's Router-ID

  interface NAME area AREA
    Binds interface to specified Area, and start
    sending OSPFv3 packets.

  auto-cost reference-bandwidth COST
    Sets the reference bandwidth for cost calculations, where this
    bandwidth is considered equivalent to an OSPF cost of 1, specified
    in Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth
    100Mbit/s or higher will have a cost of 1. Cost of lower bandwidth
    links will be scaled with reference to this cost).  This
    configuration setting MUST be consistent across all routers within
    the OSPF domain.

Sample configuration is in ospf6d.conf.sample.

--
Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
Kunihiro Ishiguro <kunihiro@zebra.org>