]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #1825 from chiragshah6/ospfv3_dev
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>
Tue, 20 Mar 2018 19:09:29 +0000 (13:09 -0600)
committerGitHub <noreply@github.com>
Tue, 20 Mar 2018 19:09:29 +0000 (13:09 -0600)
ospf6d: Intra-prefix LSA update after frr restart

425 files changed:
.gitignore
COMMUNITY.md
alpine/APKBUILD.in [new file with mode: 0644]
bgpd/.gitignore
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_debug.c
bgpd/bgp_debug.h
bgpd/bgp_evpn.c
bgpd/bgp_evpn.h
bgpd/bgp_evpn_private.h
bgpd/bgp_evpn_vty.c
bgpd/bgp_label.c
bgpd/bgp_main.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_mplsvpn.h
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_routemap.c
bgpd/bgp_rpki.c
bgpd/bgp_updgrp_adv.c
bgpd/bgp_vty.c
bgpd/bgp_vty.h
bgpd/bgp_zebra.c
bgpd/bgpd.c
bgpd/bgpd.h
bgpd/rfapi/bgp_rfapi_cfg.c
bgpd/rfapi/rfapi_import.c
bgpd/rfapi/rfapi_rib.c
bgpd/rfapi/vnc_export_bgp.c
configure.ac
debianpkg/README.deb_build.md
debianpkg/backports/ubuntu12.04/debian/rules
debianpkg/backports/ubuntu14.04/debian/frr.install
debianpkg/backports/ubuntu14.04/debian/rules
debianpkg/control
debianpkg/frr-doc.docs
debianpkg/frr-doc.info
debianpkg/frr-doc.install
debianpkg/frr.install
debianpkg/frr.manpages
debianpkg/rules
doc/.gitignore
doc/BGP-TypeCode [deleted file]
doc/Building_FRR_for_LEDE-OpenWRT.md [deleted file]
doc/Building_FRR_on_CentOS6.md [deleted file]
doc/Building_FRR_on_CentOS7.md [deleted file]
doc/Building_FRR_on_Debian8.md [deleted file]
doc/Building_FRR_on_Debian9.md [deleted file]
doc/Building_FRR_on_Fedora24.md [deleted file]
doc/Building_FRR_on_FreeBSD10.md [deleted file]
doc/Building_FRR_on_FreeBSD11.md [deleted file]
doc/Building_FRR_on_FreeBSD9.md [deleted file]
doc/Building_FRR_on_NetBSD6.md [deleted file]
doc/Building_FRR_on_NetBSD7.md [deleted file]
doc/Building_FRR_on_OmniOS.md [deleted file]
doc/Building_FRR_on_OpenBSD6.md [deleted file]
doc/Building_FRR_on_Ubuntu1204.md [deleted file]
doc/Building_FRR_on_Ubuntu1404.md [deleted file]
doc/Building_FRR_on_Ubuntu1604.md [deleted file]
doc/Makefile.am
doc/OSPF-API.md [deleted file]
doc/OSPF-SR.rst [deleted file]
doc/Useful_Sysctl_Settings.md [deleted file]
doc/appendix.texi [deleted file]
doc/babeld.texi [deleted file]
doc/basic.texi [deleted file]
doc/bgpd.8.in [deleted file]
doc/bgpd.texi [deleted file]
doc/cli.md [deleted file]
doc/code/.gitignore [deleted file]
doc/code/Makefile [deleted file]
doc/code/conf.py [deleted file]
doc/code/hooks.rst [deleted file]
doc/code/index.rst [deleted file]
doc/code/library.rst [deleted file]
doc/code/memtypes.rst [deleted file]
doc/defines.texi.in [deleted file]
doc/dev-modules.md [deleted file]
doc/developer/.gitignore [new file with mode: 0644]
doc/developer/BGP-TypeCode [new file with mode: 0644]
doc/developer/Building_FRR_on_Alpine.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_CentOS6.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_CentOS7.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_Debian8.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_Debian9.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_Fedora24.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_FreeBSD10.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_FreeBSD11.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_FreeBSD9.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_LEDE-OpenWRT.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_NetBSD6.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_NetBSD7.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_OmniOS.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_OpenBSD6.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_Ubuntu1204.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_Ubuntu1404.rst [new file with mode: 0644]
doc/developer/Building_FRR_on_Ubuntu1604.rst [new file with mode: 0644]
doc/developer/Makefile [new file with mode: 0644]
doc/developer/OSPF-API.md [new file with mode: 0644]
doc/developer/bgpd.rst [new file with mode: 0644]
doc/developer/building.rst [new file with mode: 0644]
doc/developer/cli.rst [new file with mode: 0644]
doc/developer/conf.py [new file with mode: 0644]
doc/developer/dev-modules.md [new file with mode: 0644]
doc/developer/draft-zebra-00.ms [new file with mode: 0644]
doc/developer/hooks.rst [new file with mode: 0644]
doc/developer/index.rst [new file with mode: 0644]
doc/developer/ldpd-basic-test-setup.md [new file with mode: 0644]
doc/developer/library.rst [new file with mode: 0644]
doc/developer/memtypes.rst [new file with mode: 0644]
doc/developer/modules.rst [new file with mode: 0644]
doc/developer/next-hop-tracking.rst [new file with mode: 0644]
doc/developer/ospf-api.rst [new file with mode: 0644]
doc/developer/ospf-sr.rst [new file with mode: 0644]
doc/developer/workflow.rst [new file with mode: 0644]
doc/draft-zebra-00.ms [deleted file]
doc/eigrpd.8.in [deleted file]
doc/eigrpd.texi [deleted file]
doc/fig-normal-processing.dia [deleted file]
doc/fig-normal-processing.png [deleted file]
doc/fig-normal-processing.txt [deleted file]
doc/fig-rs-processing.dia [deleted file]
doc/fig-rs-processing.png [deleted file]
doc/fig-rs-processing.txt [deleted file]
doc/fig-vnc-commercial-route-reflector.dia [deleted file]
doc/fig-vnc-commercial-route-reflector.png [deleted file]
doc/fig-vnc-commercial-route-reflector.txt [deleted file]
doc/fig-vnc-frr-route-reflector.dia [deleted file]
doc/fig-vnc-frr-route-reflector.png [deleted file]
doc/fig-vnc-frr-route-reflector.txt [deleted file]
doc/fig-vnc-gw-rr.dia [deleted file]
doc/fig-vnc-gw-rr.png [deleted file]
doc/fig-vnc-gw-rr.txt [deleted file]
doc/fig-vnc-gw.dia [deleted file]
doc/fig-vnc-gw.png [deleted file]
doc/fig-vnc-gw.txt [deleted file]
doc/fig-vnc-mesh.dia [deleted file]
doc/fig-vnc-mesh.png [deleted file]
doc/fig-vnc-mesh.txt [deleted file]
doc/fig-vnc-redundant-route-reflectors.dia [deleted file]
doc/fig-vnc-redundant-route-reflectors.png [deleted file]
doc/fig-vnc-redundant-route-reflectors.txt [deleted file]
doc/fig_topologies_full.dia [deleted file]
doc/fig_topologies_full.png [deleted file]
doc/fig_topologies_full.txt [deleted file]
doc/fig_topologies_rs.dia [deleted file]
doc/fig_topologies_rs.png [deleted file]
doc/fig_topologies_rs.txt [deleted file]
doc/figures/cligraph.svg [new file with mode: 0644]
doc/figures/fig-normal-processing.dia [new file with mode: 0644]
doc/figures/fig-normal-processing.png [new file with mode: 0644]
doc/figures/fig-normal-processing.txt [new file with mode: 0644]
doc/figures/fig-rs-processing.dia [new file with mode: 0644]
doc/figures/fig-rs-processing.png [new file with mode: 0644]
doc/figures/fig-rs-processing.txt [new file with mode: 0644]
doc/figures/fig-vnc-commercial-route-reflector.dia [new file with mode: 0644]
doc/figures/fig-vnc-commercial-route-reflector.png [new file with mode: 0644]
doc/figures/fig-vnc-commercial-route-reflector.txt [new file with mode: 0644]
doc/figures/fig-vnc-frr-route-reflector.dia [new file with mode: 0644]
doc/figures/fig-vnc-frr-route-reflector.png [new file with mode: 0644]
doc/figures/fig-vnc-frr-route-reflector.txt [new file with mode: 0644]
doc/figures/fig-vnc-gw-rr.dia [new file with mode: 0644]
doc/figures/fig-vnc-gw-rr.png [new file with mode: 0644]
doc/figures/fig-vnc-gw-rr.txt [new file with mode: 0644]
doc/figures/fig-vnc-gw.dia [new file with mode: 0644]
doc/figures/fig-vnc-gw.png [new file with mode: 0644]
doc/figures/fig-vnc-gw.txt [new file with mode: 0644]
doc/figures/fig-vnc-mesh.dia [new file with mode: 0644]
doc/figures/fig-vnc-mesh.png [new file with mode: 0644]
doc/figures/fig-vnc-mesh.txt [new file with mode: 0644]
doc/figures/fig-vnc-redundant-route-reflectors.dia [new file with mode: 0644]
doc/figures/fig-vnc-redundant-route-reflectors.png [new file with mode: 0644]
doc/figures/fig-vnc-redundant-route-reflectors.txt [new file with mode: 0644]
doc/figures/fig_topologies_full.dia [new file with mode: 0644]
doc/figures/fig_topologies_full.png [new file with mode: 0644]
doc/figures/fig_topologies_full.txt [new file with mode: 0644]
doc/figures/fig_topologies_rs.dia [new file with mode: 0644]
doc/figures/fig_topologies_rs.png [new file with mode: 0644]
doc/figures/fig_topologies_rs.txt [new file with mode: 0644]
doc/figures/frr-icon.svg [new file with mode: 0644]
doc/figures/frr-logo-icon.png [new file with mode: 0644]
doc/figures/frr-logo-medium.png [new file with mode: 0644]
doc/figures/frr-logo-small.png [new file with mode: 0644]
doc/figures/frr-logo.png [new file with mode: 0644]
doc/figures/git_branches.png [new file with mode: 0644]
doc/figures/git_branches.svg [new file with mode: 0644]
doc/figures/ospf_api_architecture.png [new file with mode: 0644]
doc/figures/ospf_api_msghdr.png [new file with mode: 0644]
doc/figures/ospf_api_msgs1.png [new file with mode: 0644]
doc/figures/ospf_api_msgs2.png [new file with mode: 0644]
doc/filter.texi [deleted file]
doc/frr-args.8.in [deleted file]
doc/frr-sphinx.mk [new file with mode: 0644]
doc/frr.1.in [deleted file]
doc/frr.texi [deleted file]
doc/git_branches.svg [deleted file]
doc/install.texi [deleted file]
doc/ipv6.texi [deleted file]
doc/isisd.8.in [deleted file]
doc/isisd.texi [deleted file]
doc/kernel.texi [deleted file]
doc/ldpd-basic-test-setup.md [deleted file]
doc/ldpd.8.in [deleted file]
doc/main.texi [deleted file]
doc/manpages/.gitignore [new file with mode: 0644]
doc/manpages/Makefile [new file with mode: 0644]
doc/manpages/bgpd.rst [new file with mode: 0644]
doc/manpages/common-options.rst [new file with mode: 0644]
doc/manpages/conf.py [new file with mode: 0644]
doc/manpages/defines.rst [new file with mode: 0644]
doc/manpages/eigrpd.rst [new file with mode: 0644]
doc/manpages/epilogue.rst [new file with mode: 0644]
doc/manpages/frr.rst [new file with mode: 0644]
doc/manpages/index.rst [new file with mode: 0644]
doc/manpages/isisd.rst [new file with mode: 0644]
doc/manpages/ldpd.rst [new file with mode: 0644]
doc/manpages/mtracebis.rst [new file with mode: 0644]
doc/manpages/nhrpd.rst [new file with mode: 0644]
doc/manpages/ospf6d.rst [new file with mode: 0644]
doc/manpages/ospfclient.rst [new file with mode: 0644]
doc/manpages/ospfd.rst [new file with mode: 0644]
doc/manpages/pimd.rst [new file with mode: 0644]
doc/manpages/ripd.rst [new file with mode: 0644]
doc/manpages/ripngd.rst [new file with mode: 0644]
doc/manpages/vtysh.rst [new file with mode: 0644]
doc/manpages/watchfrr.rst [new file with mode: 0644]
doc/manpages/zebra.rst [new file with mode: 0644]
doc/mtracebis.8.in [deleted file]
doc/next-hop-tracking.txt [deleted file]
doc/nhrpd.8.in [deleted file]
doc/nhrpd.texi [deleted file]
doc/ospf6d.8.in [deleted file]
doc/ospf6d.texi [deleted file]
doc/ospf_api_architecture.png [deleted file]
doc/ospf_api_msghdr.png [deleted file]
doc/ospf_api_msgs1.png [deleted file]
doc/ospf_api_msgs2.png [deleted file]
doc/ospf_fundamentals.texi [deleted file]
doc/ospfclient.8.in [deleted file]
doc/ospfd.8.in [deleted file]
doc/ospfd.texi [deleted file]
doc/overview.texi [deleted file]
doc/pimd.8.in [deleted file]
doc/pimd.texi [deleted file]
doc/protocol.texi [deleted file]
doc/ripd.8.in [deleted file]
doc/ripd.texi [deleted file]
doc/ripngd.8.in [deleted file]
doc/ripngd.texi [deleted file]
doc/routemap.texi [deleted file]
doc/routeserver.texi [deleted file]
doc/rpki.texi [deleted file]
doc/snmp.texi [deleted file]
doc/snmptrap.texi [deleted file]
doc/user/.gitignore [new file with mode: 0644]
doc/user/Makefile [new file with mode: 0644]
doc/user/Useful_Sysctl_Settings.md [new file with mode: 0644]
doc/user/appendix.rst [new file with mode: 0644]
doc/user/babeld.rst [new file with mode: 0644]
doc/user/basic.rst [new file with mode: 0644]
doc/user/bgp.rst [new file with mode: 0644]
doc/user/conf.py [new file with mode: 0644]
doc/user/eigrpd.rst [new file with mode: 0644]
doc/user/filter.rst [new file with mode: 0644]
doc/user/glossary.rst [new file with mode: 0644]
doc/user/index.rst [new file with mode: 0644]
doc/user/installation.rst [new file with mode: 0644]
doc/user/ipv6.rst [new file with mode: 0644]
doc/user/isisd.rst [new file with mode: 0644]
doc/user/kernel.rst [new file with mode: 0644]
doc/user/nhrpd.rst [new file with mode: 0644]
doc/user/ospf6d.rst [new file with mode: 0644]
doc/user/ospf_fundamentals.rst [new file with mode: 0644]
doc/user/ospfd.rst [new file with mode: 0644]
doc/user/overview.rst [new file with mode: 0644]
doc/user/pim.rst [new file with mode: 0644]
doc/user/protocol.rst [new file with mode: 0644]
doc/user/ripd.rst [new file with mode: 0644]
doc/user/ripngd.rst [new file with mode: 0644]
doc/user/routemap.rst [new file with mode: 0644]
doc/user/routeserver.rst [new file with mode: 0644]
doc/user/rpki.rst [new file with mode: 0644]
doc/user/snmp.rst [new file with mode: 0644]
doc/user/snmptrap.rst [new file with mode: 0644]
doc/user/vnc.rst [new file with mode: 0644]
doc/user/vtysh.rst [new file with mode: 0644]
doc/user/zebra.rst [new file with mode: 0644]
doc/vnc.texi [deleted file]
doc/vtysh.1.in [deleted file]
doc/vtysh.texi [deleted file]
doc/watchfrr.8.in [deleted file]
doc/zebra.8.in [deleted file]
docker/.gitignore [new file with mode: 0644]
docker/alpine/Dockerfile [new file with mode: 0644]
docker/alpine/alpine-build.sh [new file with mode: 0755]
docker/alpine/build.sh [new file with mode: 0755]
docker/alpine/builder [new file with mode: 0644]
include/linux/fib_rules.h [new file with mode: 0644]
include/subdir.am
isisd/isis_adjacency.c
isisd/isis_adjacency.h
isisd/isis_bpf.c
isisd/isis_circuit.c
isisd/isis_circuit.h
isisd/isis_csm.c
isisd/isis_lsp.c
isisd/isis_pdu.c
isisd/isis_pdu.h
isisd/isis_redist.c
isisd/isis_route.c
isisd/isis_spf.c
isisd/isis_te.c
isisd/isis_tlvs.c
isisd/isis_tlvs.h
isisd/isis_vty.c
isisd/isisd.h
ldpd/.gitignore
lib/.gitignore
lib/command.c
lib/command.h
lib/debug.c [new file with mode: 0644]
lib/debug.h [new file with mode: 0644]
lib/frr_pthread.c
lib/frr_pthread.h
lib/frratomic.h
lib/ipaddr.h
lib/log.c
lib/nexthop.c
lib/nexthop.h
lib/nexthop_group.c [new file with mode: 0644]
lib/nexthop_group.h [new file with mode: 0644]
lib/route_types.txt
lib/strlcat.c
lib/strlcpy.c
lib/subdir.am
lib/thread.c
lib/thread.h
lib/vrf.c
lib/vrf.h
lib/workqueue.c
lib/workqueue.h
lib/zclient.c
lib/zclient.h
lib/zebra.h
ospf6d/ospf6_main.c
ospf6d/ospf6_message.c
ospf6d/ospf6_top.c
ospf6d/ospf6_top.h
ospf6d/ospf6_zebra.c
ospfd/.gitignore
ospfd/ospf_zebra.c
ospfd/ospfd.c
pimd/mtracebis.c
pimd/pim_cmd.c
pimd/pim_iface.c
pimd/pim_igmp.c
pimd/pim_igmp.h
pimd/pim_igmp_mtrace.c
pimd/pim_igmpv2.c
pimd/pim_igmpv3.c
pimd/pim_instance.c
redhat/README.rpm_build.md
redhat/frr.spec.in
sharpd/.gitignore
sharpd/sharp_vty.c
sharpd/sharp_zebra.c
sharpd/sharp_zebra.h
tests/Makefile.am
tests/isisd/test_fuzz_isis_tlv_tests.h.gz
tests/lib/test_nexthop_iter.c
tests/lib/test_zlog.c [new file with mode: 0644]
tests/lib/test_zlog.py [new file with mode: 0644]
tools/checkpatch.pl
tools/checkpatch.sh
tools/frr-reload [new file with mode: 0755]
tools/frr-reload.py
tools/frr.service
tools/indent.py
tools/subdir.am
vtysh/vtysh.c
zebra/.gitignore
zebra/if_netlink.c
zebra/kernel_netlink.c
zebra/label_manager.c
zebra/main.c
zebra/redistribute.c
zebra/redistribute.h
zebra/rib.h
zebra/rt_netlink.c
zebra/rt_socket.c
zebra/rtadv.c
zebra/rtadv.h
zebra/rtread_getmsg.c
zebra/rtread_netlink.c
zebra/rtread_sysctl.c
zebra/rule_netlink.c [new file with mode: 0644]
zebra/rule_netlink.h [new file with mode: 0644]
zebra/rule_socket.c [new file with mode: 0644]
zebra/subdir.am
zebra/zebra_fpm_netlink.c
zebra/zebra_fpm_protobuf.c
zebra/zebra_mpls.c
zebra/zebra_mroute.c
zebra/zebra_mroute.h
zebra/zebra_netns_id.c
zebra/zebra_netns_notify.c
zebra/zebra_ns.c
zebra/zebra_ns.h
zebra/zebra_pbr.c [new file with mode: 0644]
zebra/zebra_pbr.h [new file with mode: 0644]
zebra/zebra_ptm.c
zebra/zebra_ptm.h
zebra/zebra_ptm_redistribute.c
zebra/zebra_pw.c
zebra/zebra_rib.c
zebra/zebra_rnh.c
zebra/zebra_snmp.c
zebra/zebra_static.c
zebra/zebra_vrf.c
zebra/zebra_vty.c
zebra/zebra_vxlan.c
zebra/zebra_vxlan.h
zebra/zserv.c
zebra/zserv.h

index f7c731b4bc38cefab41e3378fe8286b4573ef536..c5fd0ced9b34a10e1ccaac706ca5a8321ea383ef 100644 (file)
@@ -82,3 +82,6 @@ GPATH
 *.lo
 compile_commands.json
 .dirstamp
+
+# clippy generated source
+*_clippy.c
index 081f7ab3b832461f9c9a49d2642c15d657d86f53..fa003108513d6a3f9dcc3a223d6d1e6fa4453938 100644 (file)
@@ -1,528 +1 @@
-Developing for FRRouting
-=========================
-
-## Table of Contents
-
-[TOC]
-
-## General note on this document
-
-This document is "descriptive/post-factual" in that it documents pratices that
-are in use; it is not "definitive/pre-factual" in prescribing practices.
-
-This means that when a procedure changes, it is agreed upon, then put into
-practice, and then documented here.  If this document doesn't match reality,
-it's the document that needs to be updated, not reality.
-
-
-## Git Structure
-
-The master Git for FRRouting resides on Github at
-[https://github.com/frrouting/frr](https://github.com/FRRouting/frr)
-
-![git branches continually merging to the left from 3 lanes; float-right](doc/git_branches.svg
-"git branch mechanics")
-
-There is one main branch for development and a release branch for each major
-release.
-
-New contributions are done against the head of the master branch. The CI
-systems will pick up the Github Pull Requests or the new patch from Patchwork,
-run some basic build and functional tests.
-
-For each major release (1.0, 1.1 etc) a new release branch is created based on
-the master.
-
-There was an attempt to use a "develop" branch automatically maintained by the
-CI system.  This is not currently in active use, though the system is
-operational.  If the "develop" branch is in active use and this paragraph is
-still here, this document obviously wasn't updated.
-
-
-## Programming language, Tools and Libraries
-
-The core of FRRouting is written in C (gcc or clang supported) and makes use of
-GNU compiler extensions. A few non-essential scripts are implemented in Perl
-and Python. FRRouting requires the following tools to build distribution
-packages: automake, autoconf, texinfo, libtool and gawk and various libraries
-(i.e. libpam and libjson-c).
-
-If your contribution requires a new library or other tool, then please
-highlight this in your description of the change. Also make sure it’s supported
-by all FRRouting platform OSes or provide a way to build without the library
-(potentially without the new feature) on the other platforms.
-
-Documentation should be written in Tex (.texi) or Markdown (.md) format with a
-preference for Markdown.
-
-
-## Mailing lists
-
-Italicized lists are private.
-
-| Topic                          | List                         |
-|--------------------------------|------------------------------|
-| Development                    | dev@lists.frrouting.org      |
-| Users & Operators              | frog@lists.frrouting.org     |
-| Announcements                  | announce@lists.frrouting.org |
-| _Security_                     | security@lists.frrouting.org |
-| _Technical Steering Committee_ | tsc@lists.frrouting.org      |
-
-The Development list is used to discuss and document general issues
-related to project development and governance. The public Slack
-instance, frrouting.slack.com, and weekly technical meetings provide a
-higher bandwidth channel for discussions.  The results of such
-discussions must be reflected in updates, as appropriate, to code (i.e.,
-merges), [github](https://github.com/FRRouting/frr/issues) tracked
-issues, and for governance or process changes, updates to the
-Development list and either this file or information posted at
-[https://frrouting.org/](https://frrouting.org/).
-
-
-### Changelog
-
-The changelog will be the base for the release notes. A changelog entry for
-your changes is usually not required and will be added based on your commit
-messages by the maintainers. However, you are free to include an update to
-the changelog with some better description. The changelog will be the base
-for the release notes.
-
-
-## Submitting Patches and Enhancements
-
-### Pre-submission Checklist
-
-* Format code (see [Developer's Guidelines](#developers-guidelines))
-* Verify and acknowledge license (see [License for contributions](#license-for-contributions))
-* Ensure you have properly signed off (see [Signing Off](#signing-off))
-* Test building with various configurations:
-    * `buildtest.sh`
-* Verify building source distribution:
-    * `make dist` (and try rebuilding from the resulting tar file)
-* Run unit tests:
-    * `make test`
-* Document Regression Runs and plans for continued maintenance of the feature
-
-### License for contributions
-
-FRRouting is under a “GPLv2 or later” license. Any code submitted must be
-released under the same license (preferred) or any license which allows
-redistribution under this GPLv2 license (eg MIT License).
-
-### Signing Off
-
-Code submitted to FRRouting must be signed off. We have the same requirements
-for using the signed-off-by process as the Linux kernel. In short, you must
-include a signed-off-by tag in every patch.
-
-`Signed-off-by:` this is a developer's certification that he or she has the
-right to submit the patch for inclusion into the project. It is an agreement to
-the Developer's Certificate of Origin (below). Code without a proper signoff
-can not and will not be merged.
-
-If you are unfamiliar with this process, you should read the [official policy
-at kernel.org](https://www.kernel.org/doc/html/latest/process/submitting-patches.html) and
-you might find this article about [participating in the Linux community on the
-Linux Foundation
-website](http://www.linuxfoundation.org/content/how-participate-linux-community-0)
-to be a helpful resource.
-
-In short, when you sign off on a commit, you assert your agreement to all of
-the following:
-
-> Developer's Certificate of Origin 1.1
->
-> By making a contribution to this project, I certify that:
->
-> (a) The contribution was created in whole or in part by me and I
->     have the right to submit it under the open source license
->     indicated in the file; or
->
-> (b) The contribution is based upon previous work that, to the best
->     of my knowledge, is covered under an appropriate open source
->     license and I have the right under that license to submit that
->     work with modifications, whether created in whole or in part
->     by me, under the same open source license (unless I am
->     permitted to submit under a different license), as indicated
->     in the file; or
->
-> (c) The contribution was provided directly to me by some other
->     person who certified (a), (b) or (c) and I have not modified
->     it.
->
-> (d) I understand and agree that this project and the contribution
->     are public and that a record of the contribution (including all
->     personal information I submit with it, including my sign-off) is
->     maintained indefinitely and may be redistributed consistent with
->     this project or the open source license(s) involved.
-
-### What do I submit my changes against?
-
-We've documented where we would like to have the different fixes applied at
-https://github.com/FRRouting/frr/wiki/Where-Do-I-create-a-Pull-Request-against%3F
-If you are unsure where your submission goes, look at that document or ask a
-project maintainer.
-
-### Github pull requests
-
-The preferred method of submitting changes is a Github pull request. Code
-submitted by pull request will be automatically tested by one or more CI
-systems. Once the automated tests succeed, other developers will review your
-code for quality and correctness. After any concerns are resolved, your code
-will be merged into the branch it was submitted against.
-
-### Patch submission via mailing list
-
-As an alternative submission method, a patch can be mailed to the development
-mailing list. Patches received on the mailing list will be picked up by
-Patchwork and tested against the latest development branch.
-
-The recommended way to send the patch (or series of NN patches) to the list is
-by using `git send-email` as follows (assuming they are the N most recent
-commit(s) in your git history:
-
-```
-git send-email -NN --annotate --to=dev@lists.frrouting.org
-```
-
-If your commits do not already contain a `Signed-off-by` line, then use the
-following command to add it (after making sure you agree to the Developer
-Certificate of Origin as outlined above):
-
-```
-git send-email -NN --annotate --signoff --to=dev@lists.frrouting.org
-```
-
-Submitting multi-commit patches as a Github pull request is **strongly
-encouraged** and increases the probability of your patch getting reviewed and
-merged in a timely manner.
-
-
-## After submitting your changes
-
-* Watch for Continuous Integration (CI) Test results
-    * You should automatically receive an email with the test results within
-      less than 2 hrs of the submission. If you don’t get the email, then check
-      status on the github pull request (if submitted by pull request) or on
-      Patchwork at
-      [https://patchwork.frrouting.org](https://patchwork.frrouting.org) (if
-      submitted as patch to mailing list).
-    * Please notify the development mailing list if you think something doesn’t
-      work.
-* If the tests failed:
-    * In general, expect the community to ignore the submission until the tests
-      pass.
-    * It is up to you to fix and resubmit.
-        * This includes fixing existing unit (“make test”) tests if your
-          changes broke or changed them.
-        * It also includes fixing distribution packages for the failing
-          platforms (ie if new libraries are required).
-        * Feel free to ask for help on the development list.
-    * Go back to the submission process and repeat until the tests pass.
-* If the tests pass:
-    * Wait for reviewers. Someone will review your code or be assigned to
-      review your code.
-    * Respond to any comments or concerns the reviewer has.
-    * After all comments and concerns are addressed, expect your patch to be
-      merged.
-* Watch out for questions on the mailing list. At this time there will be a
-  manual code review and further (longer) tests by various community members.
-* Your submission is done once it is merged to the master branch.
-
-
-## Developer's Guidelines
-
-### Commit messages
-
-Commit messages should be formatted in the same way as Linux kernel commit
-messages. The format is roughly
-
-```
-dir: short summary
-
-extended summary
-```
-
-`dir` should be the top level source directory under which the change was made.
-For example, a change in bgpd/rfapi would be formatted as:
-
-`bgpd: short summary`
-
-The first line should be no longer than 50 characters. Subsequent lines should
-be wrapped to 72 characters.
-
-### Source file header
-
-New files need to have a Copyright header (see [License for
-contributions](#license-for-contributions) above) added to the file. Preferred
-form of the header is as follows:
-
-```
-/*
- * Title/Function of file
- * Copyright (C) YEAR  Author’s Name
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <zebra.h>
-```
-
-### Adding copyright claims to existing files
-
-When adding copyright claims for modifications to an existing file, please
-preface the claim with "Portions: " on a line before it and indent the
-"Copyright ..." string. If such a case already exists, add your indented claim
-immediately after. E.g.:
-
-```
-Portions:
-  Copyright (C) 2010 Entity A ....
-  Copyright (C) 2016 Your name [optional brief change description]
-```
-
-### Code formatting
-
-FRR uses Linux kernel style except where noted below. Code which does not
-comply with these style guidelines will not be accepted.
-
-To assist with compliance, in the project root there is a .clang-format
-configuration file which can be used with the `clang-format` tool from the LLVM
-project. In the `tools/` directory there is a Python script named `indent.py`
-that wraps clang-format and handles some edge cases specific to FRR. If you are
-submitting a new file, it is recommended to run that script over the new file
-after ensuring that the latest stable release of `clang-format` is in your
-PATH.
-
-**Whitespace changes in untouched parts of the code are not acceptable in
-patches that change actual code.**  To change/fix formatting issues, please
-create a separate patch that only does formatting changes and nothing else.
-
-#### Style documentation
-Kernel and BSD styles are documented externally:
-
-* [https://www.kernel.org/doc/html/latest/process/coding-style.html](https://www.kernel.org/doc/html/latest/process/coding-style.html)
-* [http://man.openbsd.org/style](http://man.openbsd.org/style)
-
-For GNU coding style, use `indent` with the following invocation:
-
-```
-indent -nut -nfc1 file_for_submission.c
-```
-
-#### Exceptions
-
-FRR project code comes from a variety of sources, so there are some stylistic
-exceptions in place. They are organized here by branch.
-
-**For `master`:**
-
-BSD coding style applies to:
-
-* `ldpd/`
-
-`babeld` uses, approximately, the following style:
-
-* K&R style braces
-* Indents are 4 spaces
-* Function return types are on their own line
-
-
-**For `stable/3.0` and `stable/2.0`:**
-
-GNU coding style apply to the following parts:
-
-* `lib/`
-* `zebra/`
-* `bgpd/`
-* `ospfd/`
-* `ospf6d/`
-* `isisd/`
-* `ripd/`
-* `ripngd/`
-* `vtysh/`
-
-BSD coding style applies to:
-
-* `ldpd/`
-
-
-### Documentation
-
-FRRouting is a large and complex software project developed by many different
-people over a long period of time. Without adequate documentation, it can be
-exceedingly difficult to understand code segments, APIs and other interfaces.
-In the interest of keeping the project healthy and maintainable, you should
-make every effort to document your code so that other people can understand
-what it does without needing to closely read the code itself.
-
-Some specific guidelines that contributors should follow are:
-
-* Functions exposed in header files should have descriptive comments above
-  their signatures in the header file. At a minimum, a function comment should
-  contain information about the return value, parameters, and a general summary
-  of the function's purpose. Documentation on parameter values can be omitted
-  if it is (very) obvious what they are used for.
-
-  Function comments must follow the style for multiline comments laid out in
-  the kernel style guide.
-
-Example:
-
-```
-/*
- * Determines whether or not a string is cool.
- *
- * @param text - the string to check for coolness
- * @param is_clccfc - whether capslock is cruise control for cool
- * @return 7 if the text is cool, 0 otherwise
- */
-int check_coolness(const char *text, bool is_clccfc);
-```
-
-The Javadoc-style annotations are not required, but you should still strive to
-make it equally clear what parameters and return values are used for.
-
-* Static functions should have descriptive comments in the same form as above
-  if what they do is not immediately obvious. Use good engineering judgement
-  when deciding whether a comment is necessary. If you are unsure, document
-  your code.
-
-* Global variables, static or not, should have a comment describing their use.
-
-* **For new code in `lib/`, these guidelines are hard requirements.**
-
-
-If you are contributing code that adds significant user-visible functionality
-or introduces a new API, please document it in `doc/`.  Markdown and LaTeX are
-acceptable formats, although Markdown is currently preferred for new
-documentation. This may change in the near future.
-
-Finally, if you come across some code that is undocumented and feel like going
-above and beyond, document it! We absolutely appreciate and accept patches that
-document previously undocumented code.
-
-### Compile-time conditional code
-
-Many users access FRR via binary packages from 3rd party sources; compile-time
-code puts inclusion/exclusion in the hands of the package maintainer.  Please
-think very carefully before making code conditional at compile time, as it
-increases regression testing, maintenance burdens, and user confusion. In
-particular, please avoid gratuitous `--enable-…` switches to the configure
-script - in general, code should be of high quality and in working condition,
-or it shouldn’t be in FRR at all.
-
-When code must be compile-time conditional, try have the compiler make it
-conditional rather than the C pre-processor so that it will still be checked by
-the compiler, even if disabled. For example,
-
-```
-if (SOME_SYMBOL)
-      frobnicate();
-```
-
-is preferred to
-
-```
-#ifdef SOME_SYMBOL
-frobnicate ();
-#endif /* SOME_SYMBOL */
-```
-
-Note that the former approach requires ensuring that `SOME_SYMBOL` will be
-defined (watch your `AC_DEFINE`s).
-
-### Debug-guards in code
-
-Debugging statements are an important methodology to allow developers to fix
-issues found in the code after it has been released.  The caveat here is that
-the developer must remember that people will be using the code at scale and in
-ways that can be unexpected for the original implementor.  As such debugs
-**MUST** be guarded in such a way that they can be turned off.  FRR has the
-ability to turn on/off debugs from the CLI and it is expected that the
-developer will use this convention to allow control of their debugs.
-
-### CLI changes
-
-CLI's are a complicated ugly beast.  Additions or changes to the CLI should use
-a DEFUN to encapsulate one setting as much as is possible.  Additionally as new
-DEFUN's are added to the system, documentation should be provided for the new
-commands.
-
-### Backwards Compatibility
-
-As a general principle, changes to CLI and code in the lib/ directory should be
-made in a backwards compatible fashion. This means that changes that are purely
-stylistic in nature should be avoided, e.g., renaming an existing macro or
-library function name without any functional change. When adding new parameters
-to common functions, it is also good to consider if this too should be done in
-a backward compatible fashion, e.g., by preserving the old form in addition to
-adding the new form.
-
-This is not to say that minor or even major functional changes to CLI and
-common code should be avoided, but rather that the benefit gained from a change
-should be weighed against the added cost/complexity to existing code.  Also,
-that when making such changes, it is good to preserve compatibility when
-possible to do so without introducing maintenance overhead/cost.  It is also
-important to keep in mind, existing code includes code that may reside in
-private repositories (and is yet to be submitted) or code that has yet to be
-migrated from Quagga to FRR.
-
-That said, compatibility measures can (and should) be removed when either:
-
-* they become a significant burden, e.g. when data structures change and the
-  compatibility measure would need a complex adaptation layer or becomes
-  flat-out impossible
-* some measure of time (dependent on the specific case) has passed, so that the
-  compatibility grace period is considered expired.
-
-In all cases, compatibility pieces should be marked with compiler/preprocessor
-annotations to print warnings at compile time, pointing to the appropriate
-update path.  A `-Werror` build should fail if compatibility bits are used.
-
-### Release Process/Schedule
-
-FRR employs a <MAJOR>.<MINOR>.<BUGFIX> versioning scheme.
-
-* MAJOR - Significant new features or multiple minor features
-  A example of a MAJOR feature is a New Routing Protocol
-* MINOR - Smaller Features
-  A example of a MINOR feature is the addition of the BGP Shutdown feature.
-* BUGFIX - Fixes for actual bugs and/or security issues.
-
-We will pull a new development branch for the next release every 4 months.
-The current schedule is Feb/June/October 1.  The decision for a MAJOR/MINOR
-release is made at the time of branch pull based on what has been received
-the previous 4 months.  The branch name will be dev/MAJOR.MINOR.  At
-this point in time the master branch configure.ac and packaging systems
-will be updated to reflect the next possible release name to allow
-for easy distinguishing.  Additionally the new dev branch will have
-these files updated too.
-
-After one month the development branch will be renamed to
-stable/MAJOR.MINOR.  This process is not held up unless a crash or
-security issue has been found and needs to be addressed.  Issues
-being fixed will not cause a delay.
-
-Bug fix releases are at 1 month intervals until next MAJOR.MINOR is
-pulled.  Then at that time as needed for issues filed.
-
-Security issues are fixed for 1 year minimum on old releases and
-normal bug fixes for the current and previous release
-
-### Miscellaneous
-
-When in doubt, follow the guidelines in the Linux kernel style guide, or ask on
-the development mailing list / public Slack instance.
+Moved to doc/developer/workflow.rst
diff --git a/alpine/APKBUILD.in b/alpine/APKBUILD.in
new file mode 100644 (file)
index 0000000..2b211cc
--- /dev/null
@@ -0,0 +1,37 @@
+# Maintainer: Arthur Jones <arthur.jones@riverbed.com>
+pkgname=frr
+pkgver=@VERSION@
+pkgrel=0
+pkgdesc="Free Range Routing is a fork of quagga"
+url="https://frrouting.org/"
+arch="all"
+license="GPL-2.0"
+depends="iproute2 json-c c-ares ipsec-tools iproute2"
+makedepends="ncurses-dev net-snmp-dev gawk texinfo perl
+    acct autoconf automake bash
+    binutils binutils-libs bison bsd-compat-headers build-base
+    c-ares c-ares-dev ca-certificates cryptsetup-libs curl
+    device-mapper-libs expat fakeroot flex fortify-headers gdbm
+    git gmp isl json-c-dev kmod lddtree libacl libatomic libattr
+    libblkid libburn libbz2 libc-dev libcap libcurl libedit libffi libgcc
+    libgomp libisoburn libisofs libltdl libressl libssh2
+    libstdc++ libtool libuuid linux-headers lzip lzo m4 make mkinitfs mpc1
+    mpfr3 mtools musl-dev ncurses-libs ncurses-terminfo ncurses-terminfo-base
+    patch pax-utils pcre perl pkgconf python2 python2-dev readline
+    readline-dev sqlite-libs squashfs-tools sudo tar texinfo xorriso xz-libs
+    py-sphinx"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg"
+source="$pkgname-$pkgver.tar.gz"
+
+builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+       cd "$builddir"
+       ./configure --prefix=/usr || return 1
+       make || return 1
+}
+
+package() {
+       cd "$builddir"
+       make DESTDIR="$pkgdir" install || return 1
+}
index a97bdb83d3555182609f5910882675bb25fa5f76..105be2299503e9b435b7ada521e2c4f733c9ce1d 100644 (file)
@@ -16,4 +16,3 @@ TAGS
 .arch-ids
 *~
 *.loT
-*clippy.c
index c23950799f3aaeceae0c613186d9251b310e4cef..c3a110599594baa9d1535f4281057085911924ed 100644 (file)
@@ -2107,6 +2107,51 @@ bgp_attr_prefix_sid(struct bgp_attr_parser_args *args,
        return BGP_ATTR_PARSE_PROCEED;
 }
 
+/* PMSI tunnel attribute (RFC 6514)
+ * Basic validation checks done here.
+ */
+static bgp_attr_parse_ret_t
+bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
+{
+       struct peer *const peer = args->peer;
+       struct attr *const attr = args->attr;
+       const bgp_size_t length = args->length;
+       u_int8_t tnl_type;
+
+       /* Verify that the receiver is expecting "ingress replication" as we
+        * can only support that.
+        */
+       if (length < 2) {
+               zlog_err("Bad PMSI tunnel attribute length %d", length);
+               return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
+                                         args->total);
+       }
+       stream_getc(peer->curr); /* Flags */
+       tnl_type = stream_getc(peer->curr);
+       if (tnl_type > PMSI_TNLTYPE_MAX) {
+               zlog_err("Invalid PMSI tunnel attribute type %d", tnl_type);
+               return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
+                                         args->total);
+       }
+       if (tnl_type == PMSI_TNLTYPE_INGR_REPL) {
+               if (length != 9) {
+                       zlog_err("Bad PMSI tunnel attribute length %d for IR",
+                                length);
+                       return bgp_attr_malformed(
+                               args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
+                               args->total);
+               }
+       }
+
+       attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL);
+       attr->pmsi_tnl_type = tnl_type;
+
+       /* Forward read pointer of input stream. */
+       stream_forward_getp(peer->curr, length - 2);
+
+       return BGP_ATTR_PARSE_PROCEED;
+}
+
 /* BGP unknown attribute treatment. */
 static bgp_attr_parse_ret_t bgp_attr_unknown(struct bgp_attr_parser_args *args)
 {
@@ -2440,6 +2485,9 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
                case BGP_ATTR_PREFIX_SID:
                        ret = bgp_attr_prefix_sid(&attr_args, mp_update);
                        break;
+               case BGP_ATTR_PMSI_TUNNEL:
+                       ret = bgp_attr_pmsi_tunnel(&attr_args);
+                       break;
                default:
                        ret = bgp_attr_unknown(&attr_args);
                        break;
@@ -3263,7 +3311,7 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
                stream_putc(s, BGP_ATTR_PMSI_TUNNEL);
                stream_putc(s, 9); // Length
                stream_putc(s, 0); // Flags
-               stream_putc(s, 6); // Tunnel type: Ingress Replication (6)
+               stream_putc(s, PMSI_TNLTYPE_INGR_REPL); // IR (6)
                stream_put(s, &(attr->label),
                           BGP_LABEL_BYTES); // MPLS Label / VXLAN VNI
                stream_put_ipv4(s, attr->nexthop.s_addr);
index 1a49e4ecf26ec510f4fdb359a02fb64d9b702d6b..5403f325431ef4d5d3f1d0e81bae530b227c3ada 100644 (file)
@@ -66,6 +66,8 @@
 #define BGP_PREFIX_SID_IPV6_LENGTH            19
 #define BGP_PREFIX_SID_ORIGINATOR_SRGB_LENGTH  6
 
+/* PMSI tunnel types (RFC 6514) */
+
 struct bgp_attr_encap_subtlv {
        struct bgp_attr_encap_subtlv *next; /* for chaining */
        /* Reference count of this attribute. */
@@ -96,6 +98,18 @@ struct overlay_index {
        union gw_addr gw_ip;
 };
 
+enum pta_type {
+       PMSI_TNLTYPE_NO_INFO = 0,
+       PMSI_TNLTYPE_RSVP_TE_P2MP,
+       PMSI_TNLTYPE_MLDP_P2MP,
+       PMSI_TNLTYPE_PIM_SSM,
+       PMSI_TNLTYPE_PIM_SM,
+       PMSI_TNLTYPE_PIM_BIDIR,
+       PMSI_TNLTYPE_INGR_REPL,
+       PMSI_TNLTYPE_MLDP_MP2MP,
+       PMSI_TNLTYPE_MAX = PMSI_TNLTYPE_MLDP_MP2MP
+};
+
 /* BGP core attribute structure. */
 struct attr {
        /* AS Path structure */
@@ -119,6 +133,9 @@ struct attr {
        /* Path origin attribute */
        u_char origin;
 
+       /* PMSI tunnel type (RFC 6514). */
+       enum pta_type pmsi_tnl_type;
+
        /* has the route-map changed any attribute?
           Used on the peer outbound side. */
        u_int32_t rmap_change_flags;
index e89f399e418d0e424564f89c48fb6296ace4f428..f8672669569d8301a1899a45357690c0ea7bc919 100644 (file)
@@ -55,6 +55,7 @@ unsigned long conf_bgp_debug_zebra;
 unsigned long conf_bgp_debug_allow_martians;
 unsigned long conf_bgp_debug_nht;
 unsigned long conf_bgp_debug_update_groups;
+unsigned long conf_bgp_debug_vpn;
 
 unsigned long term_bgp_debug_as4;
 unsigned long term_bgp_debug_neighbor_events;
@@ -68,6 +69,7 @@ unsigned long term_bgp_debug_zebra;
 unsigned long term_bgp_debug_allow_martians;
 unsigned long term_bgp_debug_nht;
 unsigned long term_bgp_debug_update_groups;
+unsigned long term_bgp_debug_vpn;
 
 struct list *bgp_debug_neighbor_events_peers = NULL;
 struct list *bgp_debug_keepalive_peers = NULL;
@@ -160,7 +162,6 @@ static const struct message bgp_notify_capability_msg[] = {
 const char *bgp_origin_str[] = {"i", "e", "?"};
 const char *bgp_origin_long_str[] = {"IGP", "EGP", "incomplete"};
 
-
 /* Given a string return a pointer the corresponding peer structure */
 static struct peer *bgp_find_peer(struct vty *vty, const char *peer_str)
 {
@@ -415,6 +416,10 @@ int bgp_dump_attr(struct attr *attr, char *buf, size_t size)
                                 inet_ntoa(attr->cluster->list[i]));
        }
 
+       if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL)))
+               snprintf(buf + strlen(buf), size - strlen(buf),
+                        ", pmsi tnltype %u", attr->pmsi_tnl_type);
+
        if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_AS_PATH)))
                snprintf(buf + strlen(buf), size - strlen(buf), ", path %s",
                         aspath_print(attr->aspath));
@@ -1557,6 +1562,96 @@ DEFUN (no_debug_bgp_update_groups,
        return CMD_SUCCESS;
 }
 
+DEFUN (debug_bgp_vpn,
+       debug_bgp_vpn_cmd,
+       "debug bgp vpn <leak-from-vrf|leak-to-vrf|rmap-event|label>",
+       DEBUG_STR
+       BGP_STR
+       "VPN routes\n"
+       "leaked from vrf to vpn\n"
+       "leaked to vrf from vpn\n"
+       "route-map updates\n"
+       "labels\n")
+{
+       int idx = 3;
+
+       if (argv_find(argv, argc, "leak-from-vrf", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_ON(vpn, VPN_LEAK_FROM_VRF);
+               else
+                       TERM_DEBUG_ON(vpn, VPN_LEAK_FROM_VRF);
+       } else if (argv_find(argv, argc, "leak-to-vrf", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_ON(vpn, VPN_LEAK_TO_VRF);
+               else
+                       TERM_DEBUG_ON(vpn, VPN_LEAK_TO_VRF);
+       } else if (argv_find(argv, argc, "rmap-event", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_ON(vpn, VPN_LEAK_RMAP_EVENT);
+               else
+                       TERM_DEBUG_ON(vpn, VPN_LEAK_RMAP_EVENT);
+       } else if (argv_find(argv, argc, "label", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_ON(vpn, VPN_LEAK_LABEL);
+               else
+                       TERM_DEBUG_ON(vpn, VPN_LEAK_LABEL);
+       } else {
+               vty_out(vty, "%% unknown debug bgp vpn keyword\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       if (vty->node != CONFIG_NODE)
+               vty_out(vty, "enabled debug bgp vpn %s\n", argv[idx]->text);
+
+       return CMD_SUCCESS;
+}
+
+DEFUN (no_debug_bgp_vpn,
+       no_debug_bgp_vpn_cmd,
+       "no debug bgp vpn <leak-from-vrf|leak-to-vrf|rmap-event|label>",
+       NO_STR
+       DEBUG_STR
+       BGP_STR
+       "VPN routes\n"
+       "leaked from vrf to vpn\n"
+       "leaked to vrf from vpn\n"
+       "route-map updates\n"
+       "labels\n")
+{
+       int idx = 4;
+
+       if (argv_find(argv, argc, "leak-from-vrf", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_OFF(vpn, VPN_LEAK_FROM_VRF);
+               else
+                       TERM_DEBUG_OFF(vpn, VPN_LEAK_FROM_VRF);
+
+       } else if (argv_find(argv, argc, "leak-to-vrf", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_OFF(vpn, VPN_LEAK_TO_VRF);
+               else
+                       TERM_DEBUG_OFF(vpn, VPN_LEAK_TO_VRF);
+       } else if (argv_find(argv, argc, "rmap-event", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_OFF(vpn, VPN_LEAK_RMAP_EVENT);
+               else
+                       TERM_DEBUG_OFF(vpn, VPN_LEAK_RMAP_EVENT);
+       } else if (argv_find(argv, argc, "label", &idx)) {
+               if (vty->node == CONFIG_NODE)
+                       DEBUG_OFF(vpn, VPN_LEAK_LABEL);
+               else
+                       TERM_DEBUG_OFF(vpn, VPN_LEAK_LABEL);
+       } else {
+               vty_out(vty, "%% unknown debug bgp vpn keyword\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       if (vty->node != CONFIG_NODE)
+               vty_out(vty, "disabled debug bgp vpn %s\n", argv[idx]->text);
+
+       return CMD_SUCCESS;
+}
+
 DEFUN (no_debug_bgp,
        no_debug_bgp_cmd,
        "no debug bgp",
@@ -1589,6 +1684,10 @@ DEFUN (no_debug_bgp,
        TERM_DEBUG_OFF(zebra, ZEBRA);
        TERM_DEBUG_OFF(allow_martians, ALLOW_MARTIANS);
        TERM_DEBUG_OFF(nht, NHT);
+       TERM_DEBUG_OFF(vpn, VPN_LEAK_FROM_VRF);
+       TERM_DEBUG_OFF(vpn, VPN_LEAK_TO_VRF);
+       TERM_DEBUG_OFF(vpn, VPN_LEAK_RMAP_EVENT);
+       TERM_DEBUG_OFF(vpn, VPN_LEAK_LABEL);
        vty_out(vty, "All possible debugging has been turned off\n");
 
        return CMD_SUCCESS;
@@ -1648,6 +1747,18 @@ DEFUN_NOSH (show_debugging_bgp,
 
        if (BGP_DEBUG(allow_martians, ALLOW_MARTIANS))
                vty_out(vty, "  BGP allow martian next hop debugging is on\n");
+
+       if (BGP_DEBUG(vpn, VPN_LEAK_FROM_VRF))
+               vty_out(vty,
+                       "  BGP route leak from vrf to vpn debugging is on\n");
+       if (BGP_DEBUG(vpn, VPN_LEAK_TO_VRF))
+               vty_out(vty,
+                       "  BGP route leak to vrf from vpn debugging is on\n");
+       if (BGP_DEBUG(vpn, VPN_LEAK_RMAP_EVENT))
+               vty_out(vty, "  BGP vpn route-map event debugging is on\n");
+       if (BGP_DEBUG(vpn, VPN_LEAK_LABEL))
+               vty_out(vty, "  BGP vpn label event debugging is on\n");
+
        vty_out(vty, "\n");
        return CMD_SUCCESS;
 }
@@ -1692,6 +1803,15 @@ int bgp_debug_count(void)
        if (BGP_DEBUG(allow_martians, ALLOW_MARTIANS))
                ret++;
 
+       if (BGP_DEBUG(vpn, VPN_LEAK_FROM_VRF))
+               ret++;
+       if (BGP_DEBUG(vpn, VPN_LEAK_TO_VRF))
+               ret++;
+       if (BGP_DEBUG(vpn, VPN_LEAK_RMAP_EVENT))
+               ret++;
+       if (BGP_DEBUG(vpn, VPN_LEAK_LABEL))
+               ret++;
+
        return ret;
 }
 
@@ -1768,6 +1888,23 @@ static int bgp_config_write_debug(struct vty *vty)
                write++;
        }
 
+       if (CONF_BGP_DEBUG(vpn, VPN_LEAK_FROM_VRF)) {
+               vty_out(vty, "debug bgp vpn leak-from-vrf\n");
+               write++;
+       }
+       if (CONF_BGP_DEBUG(vpn, VPN_LEAK_TO_VRF)) {
+               vty_out(vty, "debug bgp vpn leak-to-vrf\n");
+               write++;
+       }
+       if (CONF_BGP_DEBUG(vpn, VPN_LEAK_RMAP_EVENT)) {
+               vty_out(vty, "debug bgp vpn rmap-event\n");
+               write++;
+       }
+       if (CONF_BGP_DEBUG(vpn, VPN_LEAK_LABEL)) {
+               vty_out(vty, "debug bgp vpn label\n");
+               write++;
+       }
+
        return write;
 }
 
@@ -1861,6 +1998,11 @@ void bgp_debug_init(void)
        install_element(CONFIG_NODE, &no_debug_bgp_bestpath_cmd);
        install_element(ENABLE_NODE, &no_debug_bgp_bestpath_prefix_cmd);
        install_element(CONFIG_NODE, &no_debug_bgp_bestpath_prefix_cmd);
+
+       install_element(ENABLE_NODE, &debug_bgp_vpn_cmd);
+       install_element(CONFIG_NODE, &debug_bgp_vpn_cmd);
+       install_element(ENABLE_NODE, &no_debug_bgp_vpn_cmd);
+       install_element(CONFIG_NODE, &no_debug_bgp_vpn_cmd);
 }
 
 /* Return true if this prefix is on the per_prefix_list of prefixes to debug
index 765e43f5b4330b4a87a3525129df7ecd6d5d39ea..fe7ca8c46a853a84beb0594f3c3bddc14bdd9f65 100644 (file)
@@ -72,6 +72,7 @@ extern unsigned long conf_bgp_debug_zebra;
 extern unsigned long conf_bgp_debug_allow_martians;
 extern unsigned long conf_bgp_debug_nht;
 extern unsigned long conf_bgp_debug_update_groups;
+extern unsigned long conf_bgp_debug_vpn;
 
 extern unsigned long term_bgp_debug_as4;
 extern unsigned long term_bgp_debug_neighbor_events;
@@ -83,6 +84,7 @@ extern unsigned long term_bgp_debug_zebra;
 extern unsigned long term_bgp_debug_allow_martians;
 extern unsigned long term_bgp_debug_nht;
 extern unsigned long term_bgp_debug_update_groups;
+extern unsigned long term_bgp_debug_vpn;
 
 extern struct list *bgp_debug_neighbor_events_peers;
 extern struct list *bgp_debug_keepalive_peers;
@@ -111,6 +113,10 @@ struct bgp_debug_filter {
 #define BGP_DEBUG_ALLOW_MARTIANS      0x01
 #define BGP_DEBUG_NHT                 0x01
 #define BGP_DEBUG_UPDATE_GROUPS       0x01
+#define BGP_DEBUG_VPN_LEAK_FROM_VRF   0x01
+#define BGP_DEBUG_VPN_LEAK_TO_VRF     0x02
+#define BGP_DEBUG_VPN_LEAK_RMAP_EVENT 0x04
+#define BGP_DEBUG_VPN_LEAK_LABEL      0x08
 
 #define BGP_DEBUG_PACKET_SEND         0x01
 #define BGP_DEBUG_PACKET_SEND_DETAIL  0x02
@@ -136,6 +142,7 @@ struct bgp_debug_filter {
 #define CONF_BGP_DEBUG(a, b)    (conf_bgp_debug_ ## a & BGP_DEBUG_ ## b)
 
 extern const char *bgp_type_str[];
+extern const char *pmsi_tnltype_str[];
 
 extern int bgp_dump_attr(struct attr *, char *, size_t);
 extern int bgp_debug_peer_updout_enabled(char *host);
index fc7549671e0f35fa7aa10711745cac6358c1245b..b3d6f388b9f92933f39ff935451bd6e4083fb8cb 100644 (file)
@@ -474,6 +474,17 @@ static void derive_rd_rt_for_vni(struct bgp *bgp, struct bgpevpn *vpn)
        bgp_evpn_derive_auto_rt_export(bgp, vpn);
 }
 
+/*
+ * Convert nexthop (remote VTEP IP) into an IPv6 address.
+ */
+static void evpn_convert_nexthop_to_ipv6(struct attr *attr)
+{
+       if (BGP_ATTR_NEXTHOP_AFI_IP6(attr))
+               return;
+       ipv4_to_ipv4_mapped_ipv6(&attr->mp_nexthop_global, attr->nexthop);
+       attr->mp_nexthop_len = IPV6_MAX_BYTELEN;
+}
+
 /*
  * Add (update) or delete MACIP from zebra.
  */
@@ -622,17 +633,17 @@ static void build_evpn_type5_route_extcomm(struct bgp *bgp_vrf,
 }
 
 /*
- * Build extended communities for EVPN route. RT and ENCAP are
- * applicable to all routes.
- * TODO: currently kernel doesnt support ipv6 routes with ipv4 nexthops.
- * This means that we can't do symmetric routing for ipv6 hosts routes
- * in the same way as ipv4 host routes.
- * We wont attach l3-vni related RTs for ipv6 routes.
- * For now, We will only adevrtise ipv4 host routes
- * with L3-VNI related ext-comm.
+ * Build extended communities for EVPN route.
+ * This function is applicable for type-2 and type-3 routes. The layer-2 RT
+ * and ENCAP extended communities are applicable for all routes.
+ * The default gateway extended community and MAC mobility (sticky) extended
+ * community are added as needed based on passed settings - only for type-2
+ * routes. Likewise, the layer-3 RT and Router MAC extended communities are
+ * added, if present, based on passed settings - only for non-link-local
+ * type-2 routes.
  */
 static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,
-                                    afi_t afi)
+                                    int add_l3_ecomm)
 {
        struct ecommunity ecom_encap;
        struct ecommunity ecom_sticky;
@@ -662,11 +673,10 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,
        for (ALL_LIST_ELEMENTS(vpn->export_rtl, node, nnode, ecom))
                attr->ecommunity = ecommunity_merge(attr->ecommunity, ecom);
 
-       /*
-        * only attach l3-vni export rts for ipv4 address family and if we are
-        * advertising both the labels in type-2 routes
+       /* Add the export RTs for L3VNI if told to - caller determines
+        * when this should be done.
         */
-       if (afi == AFI_IP && CHECK_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS)) {
+       if (add_l3_ecomm) {
                vrf_export_rtl = bgpevpn_get_vrf_export_rtl(vpn);
                if (vrf_export_rtl && !list_isempty(vrf_export_rtl)) {
                        for (ALL_LIST_ELEMENTS(vrf_export_rtl, node, nnode,
@@ -676,6 +686,7 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,
                }
        }
 
+       /* Add MAC mobility (sticky) if needed. */
        if (attr->sticky) {
                seqnum = 0;
                memset(&ecom_sticky, 0, sizeof(ecom_sticky));
@@ -686,12 +697,8 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,
                        ecommunity_merge(attr->ecommunity, &ecom_sticky);
        }
 
-       /*
-        * only attach l3-vni rmac for ipv4 address family and if we are
-        * advertising both the labels in type-2 routes
-        */
-       if (afi == AFI_IP && !is_zero_mac(&attr->rmac)
-           && CHECK_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS)) {
+       /* Add RMAC, if told to. */
+       if (add_l3_ecomm) {
                memset(&ecom_rmac, 0, sizeof(ecom_rmac));
                encode_rmac_extcomm(&eval_rmac, &attr->rmac);
                ecom_rmac.size = 1;
@@ -700,6 +707,7 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,
                        ecommunity_merge(attr->ecommunity, &ecom_rmac);
        }
 
+       /* Add default gateway, if needed. */
        if (attr->default_gw) {
                memset(&ecom_default_gw, 0, sizeof(ecom_default_gw));
                encode_default_gw_extcomm(&eval_default_gw);
@@ -1260,6 +1268,7 @@ static int update_evpn_route(struct bgp *bgp, struct bgpevpn *vpn,
        struct bgp_node *rn;
        struct attr attr;
        struct attr *attr_new;
+       int add_l3_ecomm = 0;
        struct bgp_info *ri;
        afi_t afi = AFI_L2VPN;
        safi_t safi = SAFI_EVPN;
@@ -1279,14 +1288,23 @@ static int update_evpn_route(struct bgp *bgp, struct bgpevpn *vpn,
        if (p->prefix.route_type == BGP_EVPN_IMET_ROUTE)
                attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL);
 
-       /* router mac is only needed for type-2 and type-5  routes */
+       /* router mac is only needed for type-2 routes here. */
        if (p->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE)
                bgpevpn_get_rmac(vpn, &attr.rmac);
        vni2label(vpn->vni, &(attr.label));
 
-       /* Set up RT and ENCAP extended community. */
-       build_evpn_route_extcomm(
-               vpn, &attr, IS_EVPN_PREFIX_IPADDR_V4(p) ? AFI_IP : AFI_IP6);
+       /* Include L3 VNI related RTs and RMAC for type-2 routes, if they're
+        * IPv4 or IPv6 global addresses and we're advertising L3VNI with
+        * these routes.
+        */
+       if (p->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE &&
+           (IS_EVPN_PREFIX_IPADDR_V4(p) ||
+            !IN6_IS_ADDR_LINKLOCAL(&p->prefix.ip.ipaddr_v6)) &&
+           CHECK_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS))
+               add_l3_ecomm = 1;
+
+       /* Set up extended community. */
+       build_evpn_route_extcomm(vpn, &attr, add_l3_ecomm);
 
        /* First, create (or fetch) route node within the VNI. */
        /* NOTE: There is no RD here. */
@@ -1466,22 +1484,20 @@ static int update_all_type2_routes(struct bgp *bgp, struct bgpevpn *vpn)
        struct attr attr;
        struct attr attr_sticky;
        struct attr attr_def_gw;
-       struct attr attr_ip6;
-       struct attr attr_sticky_ip6;
-       struct attr attr_def_gw_ip6;
+       struct attr attr_ip6_ll;
        struct attr *attr_new;
+       int add_l3_ecomm = 0;
 
        afi = AFI_L2VPN;
        safi = SAFI_EVPN;
        memset(&attr, 0, sizeof(struct attr));
        memset(&attr_sticky, 0, sizeof(struct attr));
        memset(&attr_def_gw, 0, sizeof(struct attr));
-       memset(&attr_ip6, 0, sizeof(struct attr));
-       memset(&attr_sticky_ip6, 0, sizeof(struct attr));
-       memset(&attr_def_gw_ip6, 0, sizeof(struct attr));
+       memset(&attr_ip6_ll, 0, sizeof(struct attr));
 
-       /* Build path-attribute - all type-2 routes for this VNI will share the
-        * same path attribute.
+       /* Build path-attribute - multiple type-2 routes for this VNI will share
+        * the same path attribute, but we need separate structures for sticky
+        * MACs, default gateway and IPv6 link-local addresses (no L3 RT/RMAC).
         */
        bgp_attr_default_set(&attr, BGP_ORIGIN_IGP);
        bgp_attr_default_set(&attr_sticky, BGP_ORIGIN_IGP);
@@ -1500,31 +1516,21 @@ static int update_all_type2_routes(struct bgp *bgp, struct bgpevpn *vpn)
        attr_def_gw.mp_nexthop_len = BGP_ATTR_NHLEN_IPV4;
        attr_def_gw.default_gw = 1;
        bgpevpn_get_rmac(vpn, &attr_def_gw.rmac);
-       bgp_attr_default_set(&attr_ip6, BGP_ORIGIN_IGP);
-       bgp_attr_default_set(&attr_sticky_ip6, BGP_ORIGIN_IGP);
-       bgp_attr_default_set(&attr_def_gw_ip6, BGP_ORIGIN_IGP);
-       attr_ip6.nexthop = vpn->originator_ip;
-       attr_ip6.mp_nexthop_global_in = vpn->originator_ip;
-       attr_ip6.mp_nexthop_len = BGP_ATTR_NHLEN_IPV4;
-       bgpevpn_get_rmac(vpn, &attr_ip6.rmac);
-       attr_sticky_ip6.nexthop = vpn->originator_ip;
-       attr_sticky_ip6.mp_nexthop_global_in = vpn->originator_ip;
-       attr_sticky_ip6.mp_nexthop_len = BGP_ATTR_NHLEN_IPV4;
-       attr_sticky_ip6.sticky = 1;
-       bgpevpn_get_rmac(vpn, &attr_sticky_ip6.rmac);
-       attr_def_gw_ip6.nexthop = vpn->originator_ip;
-       attr_def_gw_ip6.mp_nexthop_global_in = vpn->originator_ip;
-       attr_def_gw_ip6.mp_nexthop_len = BGP_ATTR_NHLEN_IPV4;
-       attr_def_gw_ip6.default_gw = 1;
-       bgpevpn_get_rmac(vpn, &attr_def_gw_ip6.rmac);
-
-       /* Set up RT, ENCAP and sticky MAC extended community. */
-       build_evpn_route_extcomm(vpn, &attr, AFI_IP);
-       build_evpn_route_extcomm(vpn, &attr_sticky, AFI_IP);
-       build_evpn_route_extcomm(vpn, &attr_def_gw, AFI_IP);
-       build_evpn_route_extcomm(vpn, &attr_ip6, AFI_IP6);
-       build_evpn_route_extcomm(vpn, &attr_sticky_ip6, AFI_IP6);
-       build_evpn_route_extcomm(vpn, &attr_def_gw_ip6, AFI_IP);
+       bgp_attr_default_set(&attr_ip6_ll, BGP_ORIGIN_IGP);
+       attr_ip6_ll.nexthop = vpn->originator_ip;
+       attr_ip6_ll.mp_nexthop_global_in = vpn->originator_ip;
+       attr_ip6_ll.mp_nexthop_len = BGP_ATTR_NHLEN_IPV4;
+
+       /* Add L3 VNI RTs and RMAC for non IPv6 link-local attributes if
+        * using L3 VNI for type-2 routes also.
+        */
+       if (CHECK_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS))
+               add_l3_ecomm = 1;
+
+       build_evpn_route_extcomm(vpn, &attr, add_l3_ecomm);
+       build_evpn_route_extcomm(vpn, &attr_sticky, add_l3_ecomm);
+       build_evpn_route_extcomm(vpn, &attr_def_gw, add_l3_ecomm);
+       build_evpn_route_extcomm(vpn, &attr_ip6_ll, 0);
 
        /* Walk this VNI's route table and update local type-2 routes. For any
         * routes updated, update corresponding entry in the global table too.
@@ -1538,7 +1544,11 @@ static int update_all_type2_routes(struct bgp *bgp, struct bgpevpn *vpn)
                if (evp->prefix.route_type != BGP_EVPN_MAC_IP_ROUTE)
                        continue;
 
-               if (IS_EVPN_PREFIX_IPADDR_V4(evp)) {
+               if (IS_EVPN_PREFIX_IPADDR_V6(evp) &&
+                   IN6_IS_ADDR_LINKLOCAL(&evp->prefix.ip.ipaddr_v6))
+                       update_evpn_route_entry(bgp, vpn, afi, safi, rn,
+                                               &attr_ip6_ll, 0, 1, &ri, 0);
+               else {
                        if (evpn_route_is_sticky(bgp, rn))
                                update_evpn_route_entry(bgp, vpn, afi, safi, rn,
                                                        &attr_sticky, 0, 1, &ri,
@@ -1550,19 +1560,6 @@ static int update_all_type2_routes(struct bgp *bgp, struct bgpevpn *vpn)
                        else
                                update_evpn_route_entry(bgp, vpn, afi, safi, rn,
                                                        &attr, 0, 1, &ri, 0);
-               } else {
-                       if (evpn_route_is_sticky(bgp, rn))
-                               update_evpn_route_entry(bgp, vpn, afi, safi, rn,
-                                                       &attr_sticky_ip6, 0, 1,
-                                                       &ri, 0);
-                       else if (evpn_route_is_def_gw(bgp, rn))
-                               update_evpn_route_entry(bgp, vpn, afi, safi, rn,
-                                                       &attr_def_gw_ip6, 0, 1,
-                                                       &ri, 0);
-                       else
-                               update_evpn_route_entry(bgp, vpn, afi, safi, rn,
-                                                       &attr_ip6, 0, 1, &ri,
-                                                       0);
                }
 
                /* If a local route exists for this prefix, we need to update
@@ -1593,11 +1590,9 @@ static int update_all_type2_routes(struct bgp *bgp, struct bgpevpn *vpn)
 
        /* Unintern temporary. */
        aspath_unintern(&attr.aspath);
-       aspath_unintern(&attr_ip6.aspath);
        aspath_unintern(&attr_sticky.aspath);
-       aspath_unintern(&attr_sticky_ip6.aspath);
        aspath_unintern(&attr_def_gw.aspath);
-       aspath_unintern(&attr_def_gw_ip6.aspath);
+       aspath_unintern(&attr_ip6_ll.aspath);
 
        return 0;
 }
@@ -1791,6 +1786,7 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
 {
        struct bgp_node *rn;
        struct bgp_info *ri;
+       struct attr attr;
        struct attr *attr_new;
        int ret = 0;
        struct prefix p;
@@ -1827,6 +1823,15 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
        } else
                return 0;
 
+       /* EVPN routes currently only support a IPv4 next hop which corresponds
+        * to the remote VTEP. When importing into a VRF, if it is IPv6 host
+        * route, we have to convert the next hop to an IPv4-mapped address
+        * for the rest of the code to flow through.
+        */
+       bgp_attr_dup(&attr, parent_ri->attr);
+       if (afi == AFI_IP6)
+               evpn_convert_nexthop_to_ipv6(&attr);
+
        /* Check if route entry is already present. */
        for (ri = rn->info; ri; ri = ri->next)
                if (ri->extra
@@ -1835,7 +1840,7 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
 
        if (!ri) {
                /* Add (or update) attribute to hash. */
-               attr_new = bgp_attr_intern(parent_ri->attr);
+               attr_new = bgp_attr_intern(&attr);
 
                /* Create new route with its attribute. */
                ri = info_make(parent_ri->type, parent_ri->sub_type, 0,
@@ -1850,21 +1855,25 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
                }
                bgp_info_add(rn, ri);
        } else {
-               if (attrhash_cmp(ri->attr, parent_ri->attr)
+               if (attrhash_cmp(ri->attr, &attr)
                    && !CHECK_FLAG(ri->flags, BGP_INFO_REMOVED)) {
                        bgp_unlock_node(rn);
                        return 0;
                }
                /* The attribute has changed. */
                /* Add (or update) attribute to hash. */
-               attr_new = bgp_attr_intern(parent_ri->attr);
+               attr_new = bgp_attr_intern(&attr);
 
                /* Restore route, if needed. */
                if (CHECK_FLAG(ri->flags, BGP_INFO_REMOVED))
                        bgp_info_restore(rn, ri);
 
                /* Mark if nexthop has changed. */
-               if (!IPV4_ADDR_SAME(&ri->attr->nexthop, &attr_new->nexthop))
+               if ((afi == AFI_IP &&
+                   !IPV4_ADDR_SAME(&ri->attr->nexthop, &attr_new->nexthop)) ||
+                   (afi == AFI_IP6 &&
+                   !IPV6_ADDR_SAME(&ri->attr->mp_nexthop_global,
+                                   &attr_new->mp_nexthop_global)))
                        SET_FLAG(ri->flags, BGP_INFO_IGP_CHANGED);
 
                /* Unintern existing, set to new. */
@@ -2577,10 +2586,12 @@ static int install_uninstall_evpn_route(struct bgp *bgp, afi_t afi, safi_t safi,
 static void delete_withdraw_vrf_routes(struct bgp *bgp_vrf)
 {
        /* delete all ipv4 routes and withdraw from peers */
-       bgp_evpn_withdraw_type5_routes(bgp_vrf, AFI_IP, SAFI_UNICAST);
+       if (advertise_type5_routes(bgp_vrf, AFI_IP))
+               bgp_evpn_withdraw_type5_routes(bgp_vrf, AFI_IP, SAFI_UNICAST);
 
        /* delete all ipv6 routes and withdraw from peers */
-       bgp_evpn_withdraw_type5_routes(bgp_vrf, AFI_IP6, SAFI_UNICAST);
+       if (advertise_type5_routes(bgp_vrf, AFI_IP6))
+               bgp_evpn_withdraw_type5_routes(bgp_vrf, AFI_IP6, SAFI_UNICAST);
 }
 
 /* update and advertise all ipv4 and ipv6 routes in thr vrf table as type-5
@@ -2588,10 +2599,12 @@ static void delete_withdraw_vrf_routes(struct bgp *bgp_vrf)
 static void update_advertise_vrf_routes(struct bgp *bgp_vrf)
 {
        /* update all ipv4 routes */
-       bgp_evpn_advertise_type5_routes(bgp_vrf, AFI_IP, SAFI_UNICAST);
+       if (advertise_type5_routes(bgp_vrf, AFI_IP))
+               bgp_evpn_advertise_type5_routes(bgp_vrf, AFI_IP, SAFI_UNICAST);
 
        /* update all ipv6 routes */
-       bgp_evpn_advertise_type5_routes(bgp_vrf, AFI_IP6, SAFI_UNICAST);
+       if (advertise_type5_routes(bgp_vrf, AFI_IP6))
+               bgp_evpn_advertise_type5_routes(bgp_vrf, AFI_IP6, SAFI_UNICAST);
 }
 
 /*
@@ -2922,6 +2935,19 @@ static int process_type3_route(struct peer *peer, afi_t afi, safi_t safi,
                return -1;
        }
 
+       /* If PMSI is present, log if it is anything other than IR.
+        * Note: We just simply ignore the values as it is not clear if
+        * doing anything else is better.
+        */
+       if (attr &&
+           (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL))) {
+               if (attr->pmsi_tnl_type != PMSI_TNLTYPE_INGR_REPL) {
+                       zlog_warn("%u:%s - Rx EVPN Type-3 NLRI with unsupported PTA %d",
+                                 peer->bgp->vrf_id, peer->host,
+                                 attr->pmsi_tnl_type);
+               }
+       }
+
        /* Make prefix_rd */
        prd.family = AF_UNSPEC;
        prd.prefixlen = 64;
@@ -3214,10 +3240,6 @@ void bgp_evpn_withdraw_type5_route(struct bgp *bgp_vrf, struct prefix *p,
        struct prefix_evpn evp;
        char buf[PREFIX_STRLEN];
 
-       /* NOTE: Check needed as this is called per-route also. */
-       if (!advertise_type5_routes(bgp_vrf, afi))
-               return;
-
        build_type5_prefix_from_ip_prefix(&evp, p);
        ret = delete_evpn_type5_route(bgp_vrf, &evp);
        if (ret) {
@@ -3235,10 +3257,6 @@ void bgp_evpn_withdraw_type5_routes(struct bgp *bgp_vrf, afi_t afi, safi_t safi)
        struct bgp_node *rn = NULL;
        struct bgp_info *ri;
 
-       /* Bail out early if we don't have to advertise type-5 routes. */
-       if (!advertise_type5_routes(bgp_vrf, afi))
-               return;
-
        table = bgp_vrf->rib[afi][safi];
        for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) {
                /* Only care about "selected" routes - non-imported. */
@@ -3267,11 +3285,7 @@ void bgp_evpn_advertise_type5_route(struct bgp *bgp_vrf, struct prefix *p,
        int ret = 0;
        struct prefix_evpn evp;
        char buf[PREFIX_STRLEN];
-
-       /* NOTE: Check needed as this is called per-route also. */
-       if (!advertise_type5_routes(bgp_vrf, afi))
-               return;
-
+  
        build_type5_prefix_from_ip_prefix(&evp, p);
        ret = update_evpn_type5_route(bgp_vrf, &evp, src_attr);
        if (ret)
@@ -3290,10 +3304,6 @@ void bgp_evpn_advertise_type5_routes(struct bgp *bgp_vrf, afi_t afi,
        struct bgp_node *rn = NULL;
        struct bgp_info *ri;
 
-       /* Bail out early if we don't have to advertise type-5 routes. */
-       if (!advertise_type5_routes(bgp_vrf, afi))
-               return;
-
        table = bgp_vrf->rib[afi][safi];
        for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) {
                /* Need to identify the "selected" route entry to use its
@@ -3744,13 +3754,6 @@ int bgp_nlri_parse_evpn(struct peer *peer, struct attr *attr,
        u_char rlen;
        struct prefix p;
 
-       /* Check peer status. */
-       if (peer->status != Established) {
-               zlog_err("%u:%s - EVPN update received in state %d",
-                        peer->bgp->vrf_id, peer->host, peer->status);
-               return -1;
-       }
-
        /* Start processing the NLRI - there may be multiple in the MP_REACH */
        pnt = packet->nlri;
        lim = pnt + packet->length;
index bf6150e6480154503bed691fa592368839830898..7c0d638327b546f0ee828059d640e029722239d4 100644 (file)
@@ -55,6 +55,25 @@ static inline vni_t label2vni(mpls_label_t *label)
        return vni;
 }
 
+static inline int advertise_type5_routes(struct bgp *bgp_vrf,
+                                        afi_t afi)
+{
+       if (!bgp_vrf->l3vni)
+               return 0;
+
+       if (afi == AFI_IP &&
+           CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                      BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST))
+               return 1;
+
+       if (afi == AFI_IP6 &&
+           CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                      BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST))
+               return 1;
+
+       return 0;
+}
+
 extern void bgp_evpn_advertise_type5_route(struct bgp *bgp_vrf,
                                           struct prefix *p,
                                           struct attr *src_attr, afi_t afi,
index 63dd5818454608ed67e5abe890cfa8a531fbb1a9..ce279005dc6dffa25b8b2e49d912ddd8b73a97e3 100644 (file)
@@ -285,6 +285,14 @@ static inline void ip_prefix_from_type5_prefix(struct prefix_evpn *evp,
        }
 }
 
+static inline int is_evpn_prefix_default(struct prefix *evp)
+{
+       if (evp->family != AF_EVPN)
+               return 0;
+
+       return ((evp->u.prefix_evpn.ip_prefix_length  == 0) ? 1 : 0);
+}
+
 static inline void ip_prefix_from_type2_prefix(struct prefix_evpn *evp,
                                               struct prefix *ip)
 {
@@ -352,19 +360,17 @@ static inline void build_evpn_type3_prefix(struct prefix_evpn *p,
        p->prefix.ip.ipaddr_v4 = originator_ip;
 }
 
-static inline int advertise_type5_routes(struct bgp *bgp_vrf, afi_t afi)
+static inline int evpn_default_originate_set(struct bgp *bgp, afi_t afi,
+                                            safi_t safi)
 {
-       if (!bgp_vrf->l3vni)
-               return 0;
-
-       if (afi == AFI_IP
-           && CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV4_IN_EVPN))
+       if (afi == AFI_IP &&
+           CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                      BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV4))
                return 1;
-
-       if (afi == AFI_IP6
-           && CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV6_IN_EVPN))
+       else if (afi == AFI_IP6 &&
+                CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                           BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV6))
                return 1;
-
        return 0;
 }
 
index d42da23f527c1fc6c7400e6a3e82ac94982694c4..58487a682cebce4d6731803a2a6e658aca82b4ec 100644 (file)
@@ -2419,7 +2419,50 @@ static void evpn_unset_advertise_default_gw(struct bgp *bgp,
 /*
  * evpn - enable advertisement of default g/w
  */
-static void evpn_set_advertise_subnet(struct bgp *bgp, struct bgpevpn *vpn)
+static void evpn_process_default_originate_cmd(struct bgp *bgp_vrf,
+                                              afi_t afi, int add)
+{
+       struct prefix ip_prefix;
+       safi_t safi = SAFI_UNICAST; /* ipv4/ipv6 unicast */
+
+       /* form the default prefix 0.0.0.0/0 */
+       memset(&ip_prefix, 0, sizeof(struct prefix));
+       ip_prefix.family = afi2family(afi);
+       ip_prefix.prefixlen = 0;
+
+       if (add) {
+               /* bail if we are already advertising default route */
+               if (evpn_default_originate_set(bgp_vrf, afi, safi))
+                       return;
+
+               if (afi == AFI_IP)
+                       SET_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV4);
+               else if (afi == AFI_IP6)
+                       SET_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV6);
+               bgp_evpn_advertise_type5_route(bgp_vrf, &ip_prefix,
+                                              NULL, afi, safi);
+       } else {
+               /* bail out if we havent advertised the default route */
+               if (!evpn_default_originate_set(bgp_vrf, afi, safi))
+                       return;
+               if (afi == AFI_IP)
+                       UNSET_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                  BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV4);
+               else if (afi == AFI_IP6)
+                       UNSET_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                  BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV6);
+               bgp_evpn_withdraw_type5_route(bgp_vrf, &ip_prefix,
+                                             afi, safi);
+       }
+}
+
+/*
+ * evpn - enable advertisement of default g/w
+ */
+static void evpn_set_advertise_subnet(struct bgp *bgp,
+                                     struct bgpevpn *vpn)
 {
        if (vpn->advertise_subnet)
                return;
@@ -2612,6 +2655,43 @@ DEFUN (no_bgp_evpn_advertise_all_vni,
        return CMD_SUCCESS;
 }
 
+DEFUN (bgp_evpn_default_originate,
+       bgp_evpn_default_originate_cmd,
+       "default-originate <ipv4 | ipv6>",
+       "originate a default route\n"
+       "ipv4 address family\n"
+       "ipv6 address family\n")
+{
+       afi_t afi = 0;
+       int idx_afi = 0;
+       struct bgp *bgp_vrf = VTY_GET_CONTEXT(bgp);
+
+       if (!bgp_vrf)
+               return CMD_WARNING;
+       argv_find_and_parse_afi(argv, argc, &idx_afi, &afi);
+       evpn_process_default_originate_cmd(bgp_vrf, afi, 1);
+       return CMD_SUCCESS;
+}
+
+DEFUN (no_bgp_evpn_default_originate,
+       no_bgp_evpn_default_originate_cmd,
+       "no default-originate <ipv4 | ipv6>",
+       NO_STR
+       "withdraw a default route\n"
+       "ipv4 address family\n"
+       "ipv6 address family\n")
+{
+       afi_t afi = 0;
+       int idx_afi = 0;
+       struct bgp *bgp_vrf = VTY_GET_CONTEXT(bgp);
+
+       if (!bgp_vrf)
+               return CMD_WARNING;
+       argv_find_and_parse_afi(argv, argc, &idx_afi, &afi);
+       evpn_process_default_originate_cmd(bgp_vrf, afi, 0);
+       return CMD_SUCCESS;
+}
+
 DEFUN (bgp_evpn_advertise_vni_subnet,
        bgp_evpn_advertise_vni_subnet_cmd,
        "advertise-subnet",
@@ -2631,14 +2711,6 @@ DEFUN (bgp_evpn_advertise_vni_subnet,
        if (!bgp_vrf)
                return CMD_WARNING;
 
-       if (!(advertise_type5_routes(bgp_vrf, AFI_IP)
-             || advertise_type5_routes(bgp_vrf, AFI_IP6))) {
-               vty_out(vty,
-                       "%%Please enable ip prefix advertisement under l2vpn evpn in %s",
-                       vrf_id_to_name(bgp_vrf->vrf_id));
-               return CMD_WARNING;
-       }
-
        evpn_set_advertise_subnet(bgp, vpn);
        return CMD_SUCCESS;
 }
@@ -2711,19 +2783,23 @@ DEFUN (bgp_evpn_advertise_type5,
                /* if we are already advertising ipv4 prefix as type-5
                 * nothing to do
                 */
-               if (!rmap_changed && CHECK_FLAG(bgp_vrf->vrf_flags,
-                                               BGP_VRF_ADVERTISE_IPV4_IN_EVPN))
+               if (!rmap_changed &&
+                   CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                              BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST))
                        return CMD_WARNING;
-               SET_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV4_IN_EVPN);
+               SET_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                        BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST);
        } else {
 
                /* if we are already advertising ipv6 prefix as type-5
                 * nothing to do
                 */
-               if (!rmap_changed && CHECK_FLAG(bgp_vrf->vrf_flags,
-                                               BGP_VRF_ADVERTISE_IPV6_IN_EVPN))
+               if (!rmap_changed &&
+                   CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                              BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST))
                        return CMD_WARNING;
-               SET_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV6_IN_EVPN);
+               SET_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                        BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST);
        }
 
        if (rmap_changed) {
@@ -2766,7 +2842,7 @@ DEFUN (no_bgp_evpn_advertise_type5,
        argv_find_and_parse_afi(argv, argc, &idx_afi, &afi);
        argv_find_and_parse_safi(argv, argc, &idx_safi, &safi);
 
-       if (!(afi == AFI_IP) || (afi == AFI_IP6)) {
+       if (!(afi == AFI_IP || afi == AFI_IP6)) {
                vty_out(vty,
                        "%%only ipv4 or ipv6 address families are supported");
                return CMD_WARNING;
@@ -2780,25 +2856,25 @@ DEFUN (no_bgp_evpn_advertise_type5,
 
        if (afi == AFI_IP) {
 
-               /* if we are already advertising ipv4 prefix as type-5
+               /* if we are not advertising ipv4 prefix as type-5
                 * nothing to do
                 */
-               if (CHECK_FLAG(bgp_vrf->vrf_flags,
-                              BGP_VRF_ADVERTISE_IPV4_IN_EVPN)) {
+               if (CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                              BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST)) {
                        bgp_evpn_withdraw_type5_routes(bgp_vrf, afi, safi);
-                       UNSET_FLAG(bgp_vrf->vrf_flags,
-                                  BGP_VRF_ADVERTISE_IPV4_IN_EVPN);
+                       UNSET_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                  BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST);
                }
        } else {
 
-               /* if we are already advertising ipv6 prefix as type-5
+               /* if we are not advertising ipv6 prefix as type-5
                 * nothing to do
                 */
-               if (CHECK_FLAG(bgp_vrf->vrf_flags,
-                              BGP_VRF_ADVERTISE_IPV6_IN_EVPN)) {
+               if (CHECK_FLAG(bgp_vrf->af_flags[AFI_L2VPN][SAFI_EVPN],
+                              BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST)) {
                        bgp_evpn_withdraw_type5_routes(bgp_vrf, afi, safi);
                        UNSET_FLAG(bgp_vrf->vrf_flags,
-                                  BGP_VRF_ADVERTISE_IPV6_IN_EVPN);
+                                  BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST);
                }
        }
 
@@ -4305,12 +4381,22 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi,
        if (bgp->advertise_gw_macip)
                vty_out(vty, "  advertise-default-gw\n");
 
-       if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_ADVERTISE_IPV4_IN_EVPN))
+       if (CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                      BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST))
                vty_out(vty, "  advertise ipv4 unicast\n");
 
-       if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_ADVERTISE_IPV6_IN_EVPN))
+       if (CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                      BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST))
                vty_out(vty, "  advertise ipv6 unicast\n");
 
+       if (CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                      BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV4))
+               vty_out(vty, "  default-originate ipv4\n");
+
+       if (CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                      BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV6))
+               vty_out(vty, "  default-originate ipv6\n");
+
        if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_RD_CFGD))
                vty_out(vty, "   rd %s\n",
                        prefix_rd2str(&bgp->vrf_prd, buf1, sizeof(buf1)));
@@ -4373,6 +4459,8 @@ void bgp_ethernetvpn_init(void)
        install_element(BGP_EVPN_NODE, &no_bgp_evpn_advertise_default_gw_cmd);
        install_element(BGP_EVPN_NODE, &bgp_evpn_advertise_type5_cmd);
        install_element(BGP_EVPN_NODE, &no_bgp_evpn_advertise_type5_cmd);
+       install_element(BGP_EVPN_NODE, &bgp_evpn_default_originate_cmd);
+       install_element(BGP_EVPN_NODE, &no_bgp_evpn_default_originate_cmd);
 
        /* "show bgp l2vpn evpn" commands. */
        install_element(VIEW_NODE, &show_bgp_l2vpn_evpn_vni_cmd);
index 38b39075be376b51aecdc46d1f61050b0274175e..546ed0ed6829818b5f3f55e6f8cadc1ac14b7b99 100644 (file)
@@ -212,10 +212,6 @@ int bgp_nlri_parse_label(struct peer *peer, struct attr *attr,
        mpls_label_t label = MPLS_INVALID_LABEL;
        u_char llen;
 
-       /* Check peer status. */
-       if (peer->status != Established)
-               return 0;
-
        pnt = packet->nlri;
        lim = pnt + packet->length;
        afi = packet->afi;
index 703978601438b36603912fbeda9428b771a39e1e..bf60f9c11826f3584d13c642bc9fbbcf5770ec85 100644 (file)
@@ -265,6 +265,8 @@ static int bgp_vrf_enable(struct vrf *vrf)
                if (old_vrf_id != bgp->vrf_id)
                        bgp_update_redist_vrf_bitmaps(bgp, old_vrf_id);
                bgp_instance_up(bgp);
+               vpn_leak_zebra_vrf_label_update(bgp, AFI_IP);
+               vpn_leak_zebra_vrf_label_update(bgp, AFI_IP6);
        }
 
        return 0;
@@ -283,6 +285,10 @@ static int bgp_vrf_disable(struct vrf *vrf)
 
        bgp = bgp_lookup_by_name(vrf->name);
        if (bgp) {
+
+               vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP);
+               vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP6);
+
                old_vrf_id = bgp->vrf_id;
                bgp_handle_socket(bgp, vrf, VRF_UNKNOWN, false);
                /* We have instance configured, unlink from VRF and make it
index ec4989de8fc5d87d108d124c2198217574659488..5ed43e4bd97e9870d541ad8fb0366e8fd21a483e 100644 (file)
 #include "stream.h"
 #include "queue.h"
 #include "filter.h"
-#include "lib/json.h"
+#include "mpls.h"
+#include "json.h"
+#include "zclient.h"
 
 #include "bgpd/bgpd.h"
+#include "bgpd/bgp_debug.h"
 #include "bgpd/bgp_table.h"
 #include "bgpd/bgp_route.h"
 #include "bgpd/bgp_attr.h"
 #include "bgpd/bgp_packet.h"
 #include "bgpd/bgp_vty.h"
 #include "bgpd/bgp_vpn.h"
+#include "bgpd/bgp_ecommunity.h"
+#include "bgpd/bgp_zebra.h"
+#include "bgpd/bgp_nexthop.h"
 
 #if ENABLE_BGP_VNC
 #include "bgpd/rfapi/rfapi_backend.h"
 #endif
 
+/*
+ * Definitions and external declarations.
+ */
+extern struct zclient *zclient;
+
 extern int argv_find_and_parse_vpnvx(struct cmd_token **argv, int argc,
                                     int *index, afi_t *afi)
 {
@@ -92,16 +103,12 @@ int bgp_nlri_parse_vpn(struct peer *peer, struct attr *attr,
        struct rd_as rd_as;
        struct rd_ip rd_ip;
        struct prefix_rd prd;
-       mpls_label_t label;
+       mpls_label_t label = {0};
        afi_t afi;
        safi_t safi;
        int addpath_encoded;
        u_int32_t addpath_id;
 
-       /* Check peer status. */
-       if (peer->status != Established)
-               return 0;
-
        /* Make prefix_rd */
        prd.family = AF_UNSPEC;
        prd.prefixlen = 64;
@@ -233,6 +240,944 @@ int bgp_nlri_parse_vpn(struct peer *peer, struct attr *attr,
 #undef VPN_PREFIXLEN_MIN_BYTES
 }
 
+/*
+ * This function informs zebra of the label this vrf sets on routes
+ * leaked to VPN. Zebra should install this label in the kernel with
+ * an action of "pop label and then use this vrf's IP FIB to route the PDU."
+ *
+ * Sending this vrf-label association is qualified by a) whether vrf->vpn
+ * exporting is active ("export vpn" is enabled, vpn-policy RD and RT list
+ * are set) and b) whether vpn-policy label is set.
+ *
+ * If any of these conditions do not hold, then we send MPLS_LABEL_NONE
+ * for this vrf, which zebra interprets to mean "delete this vrf-label
+ * association."
+ */
+void vpn_leak_zebra_vrf_label_update(struct bgp *bgp, afi_t afi)
+{
+       mpls_label_t label = MPLS_LABEL_NONE;
+       const char *name = "default";
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_LABEL);
+
+       if (debug && (bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT)) {
+               name = bgp->name;
+       }
+
+       if (bgp->vrf_id == VRF_UNKNOWN) {
+               if (debug) {
+                       zlog_debug(
+                               "%s: vrf %s: afi %s: vrf_id not set, "
+                               "can't set zebra vrf label",
+                               __func__, name, afi2str(afi));
+               }
+               return;
+       }
+
+       if (vpn_leak_to_vpn_active(bgp, afi, NULL)) {
+               label = bgp->vpn_policy[afi].tovpn_label;
+       }
+
+       if (debug) {
+               zlog_debug("%s: vrf %s: afi %s: setting label %d for vrf id %d",
+                          __func__, name, afi2str(afi), label, bgp->vrf_id);
+       }
+
+       zclient_send_vrf_label(zclient, bgp->vrf_id, afi, label, ZEBRA_LSP_BGP);
+       bgp->vpn_policy[afi].tovpn_zebra_vrf_label_last_sent = label;
+}
+
+/*
+ * If zebra tells us vrf has become unconfigured, tell zebra not to
+ * use this label to forward to the vrf anymore
+ */
+void vpn_leak_zebra_vrf_label_withdraw(struct bgp *bgp, afi_t afi)
+{
+       mpls_label_t label = MPLS_LABEL_NONE;
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_LABEL);
+
+       if (bgp->vrf_id == VRF_UNKNOWN) {
+               if (debug) {
+                       zlog_debug(
+                               "%s: vrf_id not set, can't delete zebra vrf label",
+                               __func__);
+               }
+               return;
+       }
+
+       if (debug) {
+               zlog_debug("%s: deleting label for vrf %s (id=%d)", __func__,
+                          (bgp->name ? bgp->name : "default"), bgp->vrf_id);
+       }
+
+       zclient_send_vrf_label(zclient, bgp->vrf_id, afi, label, ZEBRA_LSP_BGP);
+       bgp->vpn_policy[afi].tovpn_zebra_vrf_label_last_sent = label;
+}
+
+static int ecom_intersect(struct ecommunity *e1, struct ecommunity *e2)
+{
+       int i;
+       int j;
+
+       if (!e1 || !e2)
+               return 0;
+
+       for (i = 0; i < e1->size; ++i) {
+               for (j = 0; j < e2->size; ++j) {
+                       if (!memcmp(e1->val + (i * ECOMMUNITY_SIZE),
+                                   e2->val + (j * ECOMMUNITY_SIZE),
+                                   ECOMMUNITY_SIZE)) {
+
+                               return 1;
+                       }
+               }
+       }
+       return 0;
+}
+
+/*
+ * returns pointer to new bgp_info upon success
+ */
+static struct bgp_info *
+leak_update(struct bgp *bgp, /* destination bgp instance */
+           struct bgp_node *bn, struct attr *new_attr, /* already interned */
+           afi_t afi, safi_t safi, struct bgp_info *source_bi, u_char type,
+           u_char sub_type, mpls_label_t *label, int num_labels, void *parent,
+           struct bgp *bgp_orig, struct prefix *nexthop_orig, int debug)
+{
+       struct prefix *p = &bn->p;
+       struct bgp_info *bi;
+       struct bgp_info *new;
+       char buf_prefix[PREFIX_STRLEN];
+       const char *pDestInstanceName = "default";
+
+       if (debug) {
+               prefix2str(&bn->p, buf_prefix, sizeof(buf_prefix));
+               if (bgp->name)
+                       pDestInstanceName = bgp->name;
+       }
+
+       /*
+        * match parent
+        */
+       for (bi = bn->info; bi; bi = bi->next) {
+               if (bi->extra && bi->extra->parent == parent)
+                       break;
+       }
+
+       if (bi) {
+               if (attrhash_cmp(bi->attr, new_attr)
+                   && !CHECK_FLAG(bi->flags, BGP_INFO_REMOVED)) {
+
+                       bgp_attr_unintern(&new_attr);
+                       if (debug)
+                               zlog_debug(
+                                       "%s: ->%s: %s: Found route, no change",
+                                       __func__, pDestInstanceName,
+                                       buf_prefix);
+                       return NULL;
+               }
+
+               /* attr is changed */
+               bgp_info_set_flag(bn, bi, BGP_INFO_ATTR_CHANGED);
+
+               /* Rewrite BGP route information. */
+               if (CHECK_FLAG(bi->flags, BGP_INFO_REMOVED))
+                       bgp_info_restore(bn, bi);
+               else
+                       bgp_aggregate_decrement(bgp, p, bi, afi, safi);
+               bgp_attr_unintern(&bi->attr);
+               bi->attr = new_attr;
+               bi->uptime = bgp_clock();
+
+               /* Process change. */
+               bgp_aggregate_increment(bgp, p, bi, afi, safi);
+               bgp_process(bgp, bn, afi, safi);
+               bgp_unlock_node(bn);
+
+               if (debug)
+                       zlog_debug("%s: ->%s: %s Found route, changed attr",
+                                  __func__, pDestInstanceName, buf_prefix);
+
+               return NULL;
+       }
+
+       new = info_make(type, sub_type, 0, bgp->peer_self, new_attr, bn);
+       SET_FLAG(new->flags, BGP_INFO_VALID);
+
+       bgp_info_extra_get(new);
+       if (label) {
+               int i;
+
+               for (i = 0; i < num_labels; ++i) {
+                       new->extra->label[i] = label[i];
+                       if (!bgp_is_valid_label(&label[i])) {
+                               if (debug) {
+                                       zlog_debug(
+                                               "%s: %s: marking label %d valid",
+                                               __func__, buf_prefix, i);
+                               }
+                               bgp_set_valid_label(&new->extra->label[i]);
+                       }
+               }
+               new->extra->num_labels = num_labels;
+       }
+       new->extra->parent = parent;
+
+       if (bgp_orig)
+               new->extra->bgp_orig = bgp_orig;
+       if (nexthop_orig)
+               new->extra->nexthop_orig = *nexthop_orig;
+
+       bgp_aggregate_increment(bgp, p, new, afi, safi);
+       bgp_info_add(bn, new);
+
+       bgp_unlock_node(bn);
+       bgp_process(bgp, bn, afi, safi);
+
+       if (debug)
+               zlog_debug("%s: ->%s: %s: Added new route", __func__,
+                          pDestInstanceName, buf_prefix);
+
+       return new;
+}
+
+/* cf vnc_import_bgp_add_route_mode_nvegroup() and add_vnc_route() */
+void vpn_leak_from_vrf_update(struct bgp *bgp_vpn,       /* to */
+                             struct bgp *bgp_vrf,       /* from */
+                             struct bgp_info *info_vrf) /* route */
+{
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_FROM_VRF);
+       struct prefix *p = &info_vrf->net->p;
+       afi_t afi = family2afi(p->family);
+       struct attr static_attr = {0};
+       struct attr *new_attr = NULL;
+       safi_t safi = SAFI_MPLS_VPN;
+       mpls_label_t label_val;
+       mpls_label_t label;
+       struct bgp_node *bn;
+       const char *debugmsg;
+
+       if (debug) {
+               const char *s = "";
+
+               if (info_vrf->attr && info_vrf->attr->ecommunity) {
+                       s = ecommunity_ecom2str(info_vrf->attr->ecommunity,
+                                               ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+               }
+
+               zlog_debug("%s: info_vrf->type=%d, EC{%s}", __func__,
+                          info_vrf->type, s);
+       }
+
+       if (!bgp_vpn)
+               return;
+
+       if (!afi) {
+               if (debug)
+                       zlog_debug("%s: can't get afi of prefix", __func__);
+               return;
+       }
+
+       /* loop check */
+       if (info_vrf->extra && info_vrf->extra->bgp_orig == bgp_vpn)
+               return;
+
+
+       if (!vpn_leak_to_vpn_active(bgp_vrf, afi, &debugmsg)) {
+               if (debug)
+                       zlog_debug("%s: skipping: %s", __func__, debugmsg);
+               return;
+       }
+
+       bgp_attr_dup(&static_attr, info_vrf->attr); /* shallow copy */
+
+       /*
+        * route map handling
+        */
+       if (bgp_vrf->vpn_policy[afi].rmap[BGP_VPN_POLICY_DIR_TOVPN]) {
+               struct bgp_info info;
+               route_map_result_t ret;
+
+               memset(&info, 0, sizeof(info));
+               info.peer = bgp_vpn->peer_self;
+               info.attr = &static_attr;
+               ret = route_map_apply(
+                       bgp_vrf->vpn_policy[afi].rmap[BGP_VPN_POLICY_DIR_TOVPN],
+                       p, RMAP_BGP, &info);
+               if (RMAP_DENYMATCH == ret) {
+                       bgp_attr_flush(&static_attr); /* free any added parts */
+                       if (debug)
+                               zlog_debug(
+                                       "%s: vrf %s route map \"%s\" says DENY, returning",
+                                       __func__, bgp_vrf->name,
+                                       bgp_vrf->vpn_policy[afi]
+                                               .rmap[BGP_VPN_POLICY_DIR_TOVPN]
+                                               ->name);
+                       return;
+               }
+       }
+
+       if (debug) {
+               const char *s = "";
+
+               if (static_attr.ecommunity) {
+                       s = ecommunity_ecom2str(static_attr.ecommunity,
+                                               ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+               }
+               zlog_debug("%s: post route map static_attr.ecommunity{%s}",
+                          __func__, s);
+       }
+
+       /*
+        * Add the vpn-policy rt-list
+        */
+       struct ecommunity *old_ecom;
+       struct ecommunity *new_ecom;
+
+       old_ecom = static_attr.ecommunity;
+       if (old_ecom) {
+               new_ecom = ecommunity_merge(
+                       ecommunity_dup(old_ecom),
+                       bgp_vrf->vpn_policy[afi]
+                               .rtlist[BGP_VPN_POLICY_DIR_TOVPN]);
+               if (!old_ecom->refcnt)
+                       ecommunity_free(&old_ecom);
+       } else {
+               new_ecom = ecommunity_dup(
+                       bgp_vrf->vpn_policy[afi]
+                               .rtlist[BGP_VPN_POLICY_DIR_TOVPN]);
+       }
+       static_attr.ecommunity = new_ecom;
+       SET_FLAG(static_attr.flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
+
+       if (debug) {
+               const char *s = "";
+
+               if (static_attr.ecommunity) {
+                       s = ecommunity_ecom2str(static_attr.ecommunity,
+                                               ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+               }
+               zlog_debug("%s: post merge static_attr.ecommunity{%s}",
+                          __func__, s);
+       }
+
+       /* Nexthop */
+       /* if policy nexthop not set, use 0 */
+       if (CHECK_FLAG(bgp_vrf->vpn_policy[afi].flags,
+                      BGP_VPN_POLICY_TOVPN_NEXTHOP_SET)) {
+
+               struct prefix *nexthop =
+                       &bgp_vrf->vpn_policy[afi].tovpn_nexthop;
+               switch (nexthop->family) {
+               case AF_INET:
+                       /* prevent mp_nexthop_global_in <- self in bgp_route.c
+                        */
+                       static_attr.nexthop.s_addr = nexthop->u.prefix4.s_addr;
+
+                       static_attr.mp_nexthop_global_in = nexthop->u.prefix4;
+                       static_attr.mp_nexthop_len = 4;
+                       break;
+
+               case AF_INET6:
+                       static_attr.mp_nexthop_global = nexthop->u.prefix6;
+                       static_attr.mp_nexthop_len = 16;
+                       break;
+
+               default:
+                       assert(0);
+               }
+       } else {
+               switch (afi) {
+               case AFI_IP:
+               default:
+                       /* Clear ipv4 */
+                       static_attr.mp_nexthop_global_in.s_addr = 0;
+                       static_attr.mp_nexthop_len = 4;
+                       static_attr.nexthop.s_addr = 0; /* self */
+                       static_attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP);
+                       break;
+
+               case AFI_IP6:
+                       /* Clear ipv6 */
+                       memset(&static_attr.mp_nexthop_global, 0,
+                              sizeof(static_attr.mp_nexthop_global));
+                       static_attr.mp_nexthop_len = 16; /* bytes */
+                       break;
+               }
+       }
+
+       label_val = bgp_vrf->vpn_policy[afi].tovpn_label;
+       if (label_val == MPLS_LABEL_NONE) {
+               /* TBD get from label manager */
+               label = MPLS_LABEL_IMPLICIT_NULL;
+       } else {
+               encode_label(label_val, &label);
+       }
+
+       /* Set originator ID to "me" */
+       SET_FLAG(static_attr.flag, ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID));
+       static_attr.originator_id = bgp_vpn->router_id;
+
+
+       new_attr = bgp_attr_intern(
+               &static_attr);  /* hashed refcounted everything */
+       bgp_attr_flush(&static_attr); /* free locally-allocated parts */
+
+       if (debug && new_attr->ecommunity) {
+               char *s = ecommunity_ecom2str(new_attr->ecommunity,
+                                             ECOMMUNITY_FORMAT_ROUTE_MAP, 0);
+
+               zlog_debug("%s: new_attr->ecommunity{%s}", __func__, s);
+               XFREE(MTYPE_ECOMMUNITY_STR, s);
+       }
+
+       /* Now new_attr is an allocated interned attr */
+
+       bn = bgp_afi_node_get(bgp_vpn->rib[afi][safi], afi, safi, p,
+                             &(bgp_vrf->vpn_policy[afi].tovpn_rd));
+
+       struct bgp_info *new_info;
+
+       new_info = leak_update(bgp_vpn, bn, new_attr, afi, safi, info_vrf,
+                              ZEBRA_ROUTE_BGP, BGP_ROUTE_IMPORTED, &label, 1,
+                              info_vrf, bgp_vrf, NULL, debug);
+
+       /*
+        * Routes actually installed in the vpn RIB must also be
+        * offered to all vrfs (because now they originate from
+        * the vpn RIB).
+        *
+        * Acceptance into other vrfs depends on rt-lists.
+        * Originating vrf will not accept the looped back route
+        * because of loop checking.
+        */
+       if (new_info)
+               vpn_leak_to_vrf_update(bgp_vrf, new_info);
+}
+
+void vpn_leak_from_vrf_withdraw(struct bgp *bgp_vpn,       /* to */
+                               struct bgp *bgp_vrf,       /* from */
+                               struct bgp_info *info_vrf) /* route */
+{
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_FROM_VRF);
+       struct prefix *p = &info_vrf->net->p;
+       afi_t afi = family2afi(p->family);
+       safi_t safi = SAFI_MPLS_VPN;
+       struct bgp_info *bi;
+       struct bgp_node *bn;
+       const char *debugmsg;
+
+       if (info_vrf->type != ZEBRA_ROUTE_BGP) {
+               if (debug)
+                       zlog_debug("%s: wrong type %d", __func__,
+                                  info_vrf->type);
+               return;
+       }
+       if (info_vrf->sub_type != BGP_ROUTE_NORMAL
+           && info_vrf->sub_type != BGP_ROUTE_STATIC) {
+
+               if (debug)
+                       zlog_debug("%s: wrong sub_type %d", __func__,
+                                  info_vrf->sub_type);
+               return;
+       }
+       if (!bgp_vpn)
+               return;
+
+       if (!afi) {
+               if (debug)
+                       zlog_debug("%s: can't get afi of prefix", __func__);
+               return;
+       }
+
+       if (!vpn_leak_to_vpn_active(bgp_vrf, afi, &debugmsg)) {
+               if (debug)
+                       zlog_debug("%s: skipping: %s", __func__, debugmsg);
+               return;
+       }
+
+       if (debug)
+               zlog_debug("%s: withdrawing (info_vrf=%p)", __func__, info_vrf);
+
+       bn = bgp_afi_node_get(bgp_vpn->rib[afi][safi], afi, safi, p,
+                             &(bgp_vrf->vpn_policy[afi].tovpn_rd));
+
+       /*
+        * vrf -> vpn
+        * match original bi imported from
+        */
+       for (bi = (bn ? bn->info : NULL); bi; bi = bi->next) {
+               if (bi->extra && bi->extra->parent == info_vrf) {
+                       break;
+               }
+       }
+
+       if (bi) {
+               /* withdraw from looped vrfs as well */
+               vpn_leak_to_vrf_withdraw(bgp_vpn, bi);
+
+               bgp_aggregate_decrement(bgp_vpn, p, bi, afi, safi);
+               bgp_info_delete(bn, bi);
+               bgp_process(bgp_vpn, bn, afi, safi);
+       }
+       bgp_unlock_node(bn);
+}
+
+void vpn_leak_from_vrf_withdraw_all(struct bgp *bgp_vpn, /* to */
+                                   struct bgp *bgp_vrf, /* from */
+                                   afi_t afi)
+{
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_FROM_VRF);
+       struct bgp_node *prn;
+       safi_t safi = SAFI_MPLS_VPN;
+
+       /*
+        * Walk vpn table, delete bi with bgp_orig == bgp_vrf
+        */
+       for (prn = bgp_table_top(bgp_vpn->rib[afi][safi]); prn;
+            prn = bgp_route_next(prn)) {
+
+               struct bgp_table *table;
+               struct bgp_node *bn;
+               struct bgp_info *bi;
+
+               /* This is the per-RD table of prefixes */
+               table = prn->info;
+
+               if (!table)
+                       continue;
+
+               for (bn = bgp_table_top(table); bn; bn = bgp_route_next(bn)) {
+
+                       char buf[PREFIX2STR_BUFFER];
+
+                       if (debug && bn->info) {
+                               zlog_debug(
+                                       "%s: looking at prefix %s", __func__,
+                                       prefix2str(&bn->p, buf, sizeof(buf)));
+                       }
+
+                       for (bi = bn->info; bi; bi = bi->next) {
+                               if (debug)
+                                       zlog_debug("%s: type %d, sub_type %d",
+                                                  __func__, bi->type,
+                                                  bi->sub_type);
+                               if (bi->sub_type != BGP_ROUTE_IMPORTED)
+                                       continue;
+                               if (!bi->extra)
+                                       continue;
+                               if ((struct bgp *)bi->extra->bgp_orig
+                                   == bgp_vrf) {
+                                       /* delete route */
+                                       if (debug)
+                                               zlog_debug("%s: deleting it\n",
+                                                          __func__);
+                                       bgp_aggregate_decrement(bgp_vpn, &bn->p,
+                                                               bi, afi, safi);
+                                       bgp_info_delete(bn, bi);
+                                       bgp_process(bgp_vpn, bn, afi, safi);
+                               }
+                       }
+               }
+       }
+}
+
+void vpn_leak_from_vrf_update_all(struct bgp *bgp_vpn, /* to */
+                                 struct bgp *bgp_vrf, /* from */
+                                 afi_t afi)
+{
+       struct bgp_node *bn;
+       struct bgp_info *bi;
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_FROM_VRF);
+
+       if (debug)
+               zlog_debug("%s: entry, afi=%d, vrf=%s", __func__, afi,
+                          bgp_vrf->name);
+
+       for (bn = bgp_table_top(bgp_vrf->rib[afi][SAFI_UNICAST]); bn;
+            bn = bgp_route_next(bn)) {
+
+               if (debug)
+                       zlog_debug("%s: node=%p", __func__, bn);
+
+               for (bi = bn->info; bi; bi = bi->next) {
+                       if (debug)
+                               zlog_debug(
+                                       "%s: calling vpn_leak_from_vrf_update",
+                                       __func__);
+                       vpn_leak_from_vrf_update(bgp_vpn, bgp_vrf, bi);
+               }
+       }
+}
+
+static void vpn_leak_to_vrf_update_onevrf(struct bgp *bgp_vrf,       /* to */
+                                         struct bgp *bgp_vpn,       /* from */
+                                         struct bgp_info *info_vpn) /* route */
+{
+       struct prefix *p = &info_vpn->net->p;
+       afi_t afi = family2afi(p->family);
+
+       struct attr static_attr = {0};
+       struct attr *new_attr = NULL;
+       struct bgp_node *bn;
+       safi_t safi = SAFI_UNICAST;
+       const char *debugmsg;
+       struct prefix nexthop_orig;
+       mpls_label_t *pLabels = NULL;
+       int num_labels = 0;
+
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_TO_VRF);
+
+       if (!vpn_leak_from_vpn_active(bgp_vrf, afi, &debugmsg)) {
+               if (debug)
+                       zlog_debug("%s: skipping: %s", __func__, debugmsg);
+               return;
+       }
+
+       /* Check for intersection of route targets */
+       if (!ecom_intersect(
+                   bgp_vrf->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_FROMVPN],
+                   info_vpn->attr->ecommunity)) {
+
+               return;
+       }
+
+       if (debug)
+               zlog_debug("%s: updating to vrf %s", __func__, bgp_vrf->name);
+
+       bgp_attr_dup(&static_attr, info_vpn->attr); /* shallow copy */
+
+       /*
+        * Nexthop: stash and clear
+        *
+        * Nexthop is valid in context of VPN core, but not in destination vrf.
+        * Stash it for later label resolution by vrf ingress path and then
+        * overwrite with 0, i.e., "me", for the sake of vrf advertisement.
+        */
+       uint8_t nhfamily = NEXTHOP_FAMILY(info_vpn->attr->mp_nexthop_len);
+
+       memset(&nexthop_orig, 0, sizeof(nexthop_orig));
+       nexthop_orig.family = nhfamily;
+
+       switch (nhfamily) {
+
+       case AF_INET:
+               /* save */
+               nexthop_orig.u.prefix4 = info_vpn->attr->mp_nexthop_global_in;
+               nexthop_orig.prefixlen = 32;
+
+               static_attr.nexthop.s_addr = 0; /* self */
+               static_attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP);
+
+               break;
+
+       case AF_INET6:
+               /* save */
+               nexthop_orig.u.prefix6 = info_vpn->attr->mp_nexthop_global;
+               nexthop_orig.prefixlen = 128;
+
+               memset(&static_attr.mp_nexthop_global, 0,
+                      sizeof(static_attr.mp_nexthop_global)); /* clear */
+               static_attr.mp_nexthop_len = 16;               /* bytes */
+               break;
+       }
+
+
+       /*
+        * route map handling
+        */
+       if (bgp_vrf->vpn_policy[afi].rmap[BGP_VPN_POLICY_DIR_FROMVPN]) {
+               struct bgp_info info;
+               route_map_result_t ret;
+
+               memset(&info, 0, sizeof(info));
+               info.peer = bgp_vrf->peer_self;
+               info.attr = &static_attr;
+               ret = route_map_apply(bgp_vrf->vpn_policy[afi]
+                                             .rmap[BGP_VPN_POLICY_DIR_FROMVPN],
+                                     p, RMAP_BGP, &info);
+               if (RMAP_DENYMATCH == ret) {
+                       bgp_attr_flush(&static_attr); /* free any added parts */
+                       if (debug)
+                               zlog_debug(
+                                       "%s: vrf %s vpn-policy route map \"%s\" says DENY, returning",
+                                       __func__, bgp_vrf->name,
+                                       bgp_vrf->vpn_policy[afi]
+                                               .rmap[BGP_VPN_POLICY_DIR_FROMVPN]
+                                               ->name);
+                       return;
+               }
+       }
+
+       new_attr = bgp_attr_intern(&static_attr);
+       bgp_attr_flush(&static_attr);
+
+       bn = bgp_afi_node_get(bgp_vrf->rib[afi][safi], afi, safi, p, NULL);
+
+       /*
+        * ensure labels are copied
+        */
+       if (info_vpn->extra && info_vpn->extra->num_labels) {
+               num_labels = info_vpn->extra->num_labels;
+               if (num_labels > BGP_MAX_LABELS)
+                       num_labels = BGP_MAX_LABELS;
+               pLabels = info_vpn->extra->label;
+       }
+       if (debug) {
+               char buf_prefix[PREFIX_STRLEN];
+               prefix2str(p, buf_prefix, sizeof(buf_prefix));
+               zlog_debug("%s: pfx %s: num_labels %d", __func__, buf_prefix,
+                          num_labels);
+       }
+
+       leak_update(bgp_vrf, bn, new_attr, afi, safi, info_vpn, ZEBRA_ROUTE_BGP,
+                   BGP_ROUTE_IMPORTED, pLabels, num_labels,
+                   info_vpn, /* parent */
+                   bgp_vpn, &nexthop_orig, debug);
+}
+
+void vpn_leak_to_vrf_update(struct bgp *bgp_vpn,       /* from */
+                           struct bgp_info *info_vpn) /* route */
+{
+       struct listnode *mnode, *mnnode;
+       struct bgp *bgp;
+
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_TO_VRF);
+
+       if (debug)
+               zlog_debug("%s: start (info_vpn=%p)", __func__, info_vpn);
+
+       /* Loop over VRFs */
+       for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp)) {
+
+               if (!info_vpn->extra
+                   || info_vpn->extra->bgp_orig != bgp) { /* no loop */
+                       vpn_leak_to_vrf_update_onevrf(bgp, bgp_vpn, info_vpn);
+               }
+       }
+}
+
+void vpn_leak_to_vrf_withdraw(struct bgp *bgp_vpn,       /* from */
+                             struct bgp_info *info_vpn) /* route */
+{
+       struct prefix *p = &info_vpn->net->p;
+       afi_t afi = family2afi(p->family);
+       safi_t safi = SAFI_UNICAST;
+       struct bgp *bgp;
+       struct listnode *mnode, *mnnode;
+       struct bgp_node *bn;
+       struct bgp_info *bi;
+       const char *debugmsg;
+
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_TO_VRF);
+
+       if (debug)
+               zlog_debug("%s: start (info_vpn=%p)", __func__, info_vpn);
+
+
+       /* Loop over VRFs */
+       for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp)) {
+               if (!vpn_leak_from_vpn_active(bgp, afi, &debugmsg)) {
+                       if (debug)
+                               zlog_debug("%s: skipping: %s", __func__,
+                                          debugmsg);
+                       continue;
+               }
+
+               /* Check for intersection of route targets */
+               if (!ecom_intersect(bgp->vpn_policy[afi]
+                                           .rtlist[BGP_VPN_POLICY_DIR_FROMVPN],
+                                   info_vpn->attr->ecommunity)) {
+
+                       continue;
+               }
+
+               if (debug)
+                       zlog_debug("%s: withdrawing from vrf %s", __func__,
+                                  bgp->name);
+
+               bn = bgp_afi_node_get(bgp->rib[afi][safi], afi, safi, p, NULL);
+               for (bi = (bn ? bn->info : NULL); bi; bi = bi->next) {
+                       if (bi->extra
+                           && (struct bgp_info *)bi->extra->parent
+                                      == info_vpn) {
+                               break;
+                       }
+               }
+
+               if (bi) {
+                       if (debug)
+                               zlog_debug("%s: deleting bi %p", __func__, bi);
+                       bgp_aggregate_decrement(bgp, p, bi, afi, safi);
+                       bgp_info_delete(bn, bi);
+                       bgp_process(bgp, bn, afi, safi);
+               }
+               bgp_unlock_node(bn);
+       }
+}
+
+void vpn_leak_to_vrf_withdraw_all(struct bgp *bgp_vrf, /* to */
+                                 afi_t afi)
+{
+       struct bgp_node *bn;
+       struct bgp_info *bi;
+       safi_t safi = SAFI_UNICAST;
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_TO_VRF);
+       struct bgp *bgp_vpn = bgp_get_default();
+
+       if (debug)
+               zlog_debug("%s: entry", __func__);
+       /*
+        * Walk vrf table, delete bi with bgp_orig == bgp_vpn
+        */
+       for (bn = bgp_table_top(bgp_vrf->rib[afi][safi]); bn;
+            bn = bgp_route_next(bn)) {
+
+               for (bi = bn->info; bi; bi = bi->next) {
+                       if (bi->extra && bi->extra->bgp_orig == bgp_vpn) {
+
+                               /* delete route */
+                               bgp_aggregate_decrement(bgp_vrf, &bn->p, bi,
+                                                       afi, safi);
+                               bgp_info_delete(bn, bi);
+                               bgp_process(bgp_vrf, bn, afi, safi);
+                       }
+               }
+       }
+}
+
+void vpn_leak_to_vrf_update_all(struct bgp *bgp_vrf, /* to */
+                               struct bgp *bgp_vpn, /* from */
+                               afi_t afi)
+{
+       struct prefix_rd prd;
+       struct bgp_node *prn;
+       safi_t safi = SAFI_MPLS_VPN;
+
+       /*
+        * Walk vpn table
+        */
+       for (prn = bgp_table_top(bgp_vpn->rib[afi][safi]); prn;
+            prn = bgp_route_next(prn)) {
+
+               struct bgp_table *table;
+               struct bgp_node *bn;
+               struct bgp_info *bi;
+
+               memset(&prd, 0, sizeof(prd));
+               prd.family = AF_UNSPEC;
+               prd.prefixlen = 64;
+               memcpy(prd.val, prn->p.u.val, 8);
+
+               /* This is the per-RD table of prefixes */
+               table = prn->info;
+
+               if (!table)
+                       continue;
+
+               for (bn = bgp_table_top(table); bn; bn = bgp_route_next(bn)) {
+
+                       for (bi = bn->info; bi; bi = bi->next) {
+
+                               if (bi->extra && bi->extra->bgp_orig == bgp_vrf)
+                                       continue;
+
+                               vpn_leak_to_vrf_update_onevrf(bgp_vrf, bgp_vpn,
+                                                             bi);
+                       }
+               }
+       }
+}
+
+static void vpn_policy_routemap_update(struct bgp *bgp, const char *rmap_name)
+{
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_RMAP_EVENT);
+       afi_t afi;
+       struct route_map *rmap;
+
+       if (bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT
+           && bgp->inst_type != BGP_INSTANCE_TYPE_VRF) {
+
+               return;
+       }
+
+       rmap = route_map_lookup_by_name(rmap_name); /* NULL if deleted */
+
+       for (afi = 0; afi < AFI_MAX; ++afi) {
+
+               if (vpn_leak_to_vpn_active(bgp, afi, NULL)
+                   && bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_TOVPN]
+                   && !strcmp(rmap_name,
+                              bgp->vpn_policy[afi]
+                                      .rmap_name[BGP_VPN_POLICY_DIR_TOVPN])) {
+
+                       if (debug)
+                               zlog_debug(
+                                       "%s: rmap \"%s\" matches vrf-policy tovpn for as %d afi %s",
+                                       __func__, rmap_name, bgp->as,
+                                       afi2str(afi));
+
+                       vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                          bgp_get_default(), bgp);
+                       if (debug)
+                               zlog_debug("%s: after vpn_leak_prechange",
+                                          __func__);
+
+                       if (!rmap)
+                               bgp->vpn_policy[afi]
+                                       .rmap[BGP_VPN_POLICY_DIR_TOVPN] = NULL;
+
+                       vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                           bgp_get_default(), bgp);
+                       if (debug)
+                               zlog_debug("%s: after vpn_leak_postchange",
+                                          __func__);
+               }
+
+               char *mapname = bgp->vpn_policy[afi]
+                       .rmap_name[BGP_VPN_POLICY_DIR_FROMVPN];
+
+               if (vpn_leak_from_vpn_active(bgp, afi, NULL) &&
+                       mapname &&
+                       !strcmp(rmap_name, mapname))  {
+
+                       if (debug) {
+                               zlog_debug("%s: rmap \"%s\" matches vrf-policy fromvpn for as %d afi %s",
+                                       __func__, rmap_name, bgp->as,
+                                       afi2str(afi));
+                       }
+
+                       vpn_leak_prechange(BGP_VPN_POLICY_DIR_FROMVPN, afi,
+                                          bgp_get_default(), bgp);
+
+                       if (!rmap) {
+                               bgp->vpn_policy[afi]
+                                       .rmap[BGP_VPN_POLICY_DIR_FROMVPN] =
+                                       NULL;
+                       }
+
+                       vpn_leak_postchange(BGP_VPN_POLICY_DIR_FROMVPN, afi,
+                                           bgp_get_default(), bgp);
+               }
+       }
+}
+
+void vpn_policy_routemap_event(const char *rmap_name)
+{
+       int debug = BGP_DEBUG(vpn, VPN_LEAK_RMAP_EVENT);
+       struct listnode *mnode, *mnnode;
+       struct bgp *bgp;
+
+       if (debug)
+               zlog_debug("%s: entry", __func__);
+
+       if (bm->bgp == NULL) /* may be called during cleanup */
+               return;
+
+       for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp))
+               vpn_policy_routemap_update(bgp, rmap_name);
+}
+
 /* For testing purpose, static route of MPLS-VPN. */
 DEFUN (vpnv4_network,
        vpnv4_network_cmd,
index 5c11f7526cea7db720ed6bbe7abdf4a6c81dc794..d35568b8385729179bc79c179ada30deea2d4935 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "bgpd/bgp_route.h"
 #include "bgpd/bgp_rd.h"
+#include "bgpd/bgp_zebra.h"
 
 #define MPLS_LABEL_IS_SPECIAL(label) ((label) <= MPLS_LABEL_EXTENSION)
 #define MPLS_LABEL_IS_NULL(label)                                              \
@@ -51,4 +52,128 @@ extern int bgp_show_mpls_vpn(struct vty *vty, afi_t afi, struct prefix_rd *prd,
                             enum bgp_show_type type, void *output_arg,
                             int tags, u_char use_json);
 
+extern void vpn_leak_from_vrf_update(struct bgp *bgp_vpn, struct bgp *bgp_vrf,
+                                    struct bgp_info *info_vrf);
+
+extern void vpn_leak_from_vrf_withdraw(struct bgp *bgp_vpn, struct bgp *bgp_vrf,
+                                      struct bgp_info *info_vrf);
+
+extern void vpn_leak_from_vrf_withdraw_all(struct bgp *bgp_vpn,
+                                          struct bgp *bgp_vrf, afi_t afi);
+
+extern void vpn_leak_from_vrf_update_all(struct bgp *bgp_vpn,
+                                        struct bgp *bgp_vrf, afi_t afi);
+
+extern void vpn_leak_to_vrf_withdraw_all(struct bgp *bgp_vrf, afi_t afi);
+
+extern void vpn_leak_to_vrf_update_all(struct bgp *bgp_vrf, struct bgp *bgp_vpn,
+                                      afi_t afi);
+
+extern void vpn_leak_to_vrf_update(struct bgp *bgp_vpn,
+                                  struct bgp_info *info_vpn);
+
+extern void vpn_leak_to_vrf_withdraw(struct bgp *bgp_vpn,
+                                    struct bgp_info *info_vpn);
+
+extern void vpn_leak_zebra_vrf_label_update(struct bgp *bgp, afi_t afi);
+extern void vpn_leak_zebra_vrf_label_withdraw(struct bgp *bgp, afi_t afi);
+
+static inline int vpn_leak_to_vpn_active(struct bgp *bgp_vrf, afi_t afi,
+                                        const char **pmsg)
+{
+       if (bgp_vrf->inst_type != BGP_INSTANCE_TYPE_VRF
+               && bgp_vrf->inst_type != BGP_INSTANCE_TYPE_DEFAULT) {
+
+               if (pmsg)
+                       *pmsg = "source bgp instance neither vrf nor default";
+               return 0;
+       }
+
+       /* Is vrf configured to export to vpn? */
+       if (!CHECK_FLAG(bgp_vrf->af_flags[afi][SAFI_UNICAST],
+                       BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT)) {
+               if (pmsg)
+                       *pmsg = "export not set";
+               return 0;
+       }
+
+       /* Is there an RT list set? */
+       if (!bgp_vrf->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_TOVPN]) {
+               if (pmsg)
+                       *pmsg = "rtlist tovpn not defined";
+               return 0;
+       }
+
+       /* Is there an RD set? */
+       if (!CHECK_FLAG(bgp_vrf->vpn_policy[afi].flags,
+                       BGP_VPN_POLICY_TOVPN_RD_SET)) {
+               if (pmsg)
+                       *pmsg = "rd not defined";
+               return 0;
+       }
+       return 1;
+}
+
+static inline int vpn_leak_from_vpn_active(struct bgp *bgp_vrf, afi_t afi,
+                                          const char **pmsg)
+{
+       if (bgp_vrf->inst_type != BGP_INSTANCE_TYPE_VRF
+               && bgp_vrf->inst_type != BGP_INSTANCE_TYPE_DEFAULT) {
+
+               if (pmsg)
+                       *pmsg = "destination bgp instance neither vrf nor default";
+               return 0;
+       }
+
+       /* Is vrf configured to import from vpn? */
+       if (!CHECK_FLAG(bgp_vrf->af_flags[afi][SAFI_UNICAST],
+                       BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT)) {
+               if (pmsg)
+                       *pmsg = "import not set";
+               return 0;
+       }
+       if (!bgp_vrf->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_FROMVPN]) {
+               if (pmsg)
+                       *pmsg = "rtlist fromvpn not defined";
+               return 0;
+       }
+       return 1;
+}
+
+static inline void vpn_leak_prechange(vpn_policy_direction_t direction,
+                                     afi_t afi, struct bgp *bgp_vpn,
+                                     struct bgp *bgp_vrf)
+{
+       if ((direction == BGP_VPN_POLICY_DIR_FROMVPN) &&
+               vpn_leak_from_vpn_active(bgp_vrf, afi, NULL)) {
+
+               vpn_leak_to_vrf_withdraw_all(bgp_vrf, afi);
+       }
+       if ((direction == BGP_VPN_POLICY_DIR_TOVPN) &&
+               vpn_leak_to_vpn_active(bgp_vrf, afi, NULL)) {
+
+               vpn_leak_from_vrf_withdraw_all(bgp_vpn, bgp_vrf, afi);
+       }
+}
+
+static inline void vpn_leak_postchange(vpn_policy_direction_t direction,
+                                      afi_t afi, struct bgp *bgp_vpn,
+                                      struct bgp *bgp_vrf)
+{
+       if (direction == BGP_VPN_POLICY_DIR_FROMVPN)
+               vpn_leak_to_vrf_update_all(bgp_vrf, bgp_vpn, afi);
+       if (direction == BGP_VPN_POLICY_DIR_TOVPN) {
+
+               if (bgp_vrf->vpn_policy[afi].tovpn_label !=
+                       bgp_vrf->vpn_policy[afi]
+                              .tovpn_zebra_vrf_label_last_sent) {
+                       vpn_leak_zebra_vrf_label_update(bgp_vrf, afi);
+               }
+
+               vpn_leak_from_vrf_update_all(bgp_vpn, bgp_vrf, afi);
+       }
+}
+
+extern void vpn_policy_routemap_event(const char *rmap_name);
+
 #endif /* _QUAGGA_BGP_MPLSVPN_H */
index 2dab3ce6a96124940c304a1d53cf0255adca2ccb..35732d1bf5bc842642008dd6ec192b0a3cf5b342 100644 (file)
 extern const char *bgp_origin_str[];
 extern const char *bgp_origin_long_str[];
 
+/* PMSI strings. */
+#define PMSI_TNLTYPE_STR_NO_INFO "No info"
+#define PMSI_TNLTYPE_STR_DEFAULT PMSI_TNLTYPE_STR_NO_INFO
+static const struct message bgp_pmsi_tnltype_str[] = {
+       {PMSI_TNLTYPE_NO_INFO, PMSI_TNLTYPE_STR_NO_INFO},
+       {PMSI_TNLTYPE_RSVP_TE_P2MP, "RSVP-TE P2MP"},
+       {PMSI_TNLTYPE_MLDP_P2MP, "mLDP P2MP"},
+       {PMSI_TNLTYPE_PIM_SSM, "PIM-SSM"},
+       {PMSI_TNLTYPE_PIM_SM, "PIM-SM"},
+       {PMSI_TNLTYPE_PIM_BIDIR, "PIM-BIDIR"},
+       {PMSI_TNLTYPE_INGR_REPL, "Ingress Replication"},
+       {PMSI_TNLTYPE_MLDP_MP2MP, "mLDP MP2MP"},
+       {0}
+};
+
 struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
                                  safi_t safi, struct prefix *p,
                                  struct prefix_rd *prd)
@@ -1364,6 +1379,16 @@ int subgroup_announce_check(struct bgp_node *rn, struct bgp_info *ri,
        }
 #endif
 
+       if (((afi == AFI_IP) || (afi == AFI_IP6))
+           && ((safi == SAFI_MPLS_VPN) || (safi == SAFI_UNICAST))
+           && (ri->type == ZEBRA_ROUTE_BGP)
+           && (ri->sub_type == BGP_ROUTE_IMPORTED)) {
+
+               /* Applies to routes leaked vpn->vrf and vrf->vpn */
+
+               samepeer_safe = 1;
+       }
+
        /* With addpath we may be asked to TX all kinds of paths so make sure
         * ri is valid */
        if (!CHECK_FLAG(ri->flags, BGP_INFO_VALID)
@@ -1852,17 +1877,30 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_node *rn,
                            && (ri != old_select))
                                bgp_info_reap(rn, ri);
 
+                       if (debug)
+                               zlog_debug("%s: ri %p in holddown", __func__,
+                                          ri);
+
                        continue;
                }
 
                if (ri->peer && ri->peer != bgp->peer_self
                    && !CHECK_FLAG(ri->peer->sflags, PEER_STATUS_NSF_WAIT))
-                       if (ri->peer->status != Established)
+                       if (ri->peer->status != Established) {
+
+                               if (debug)
+                                       zlog_debug(
+                                               "%s: ri %p non self peer %s not estab state",
+                                               __func__, ri, ri->peer->host);
+
                                continue;
+                       }
 
                if (bgp_flag_check(bgp, BGP_FLAG_DETERMINISTIC_MED)
                    && (!CHECK_FLAG(ri->flags, BGP_INFO_DMED_SELECTED))) {
                        bgp_info_unset_flag(rn, ri, BGP_INFO_DMED_CHECK);
+                       if (debug)
+                               zlog_debug("%s: ri %p dmed", __func__, ri);
                        continue;
                }
 
@@ -1966,6 +2004,13 @@ int subgroup_process_announce_selected(struct update_subgroup *subgrp,
        onlypeer = ((SUBGRP_PCOUNT(subgrp) == 1) ? (SUBGRP_PFIRST(subgrp))->peer
                                                 : NULL);
 
+       if (BGP_DEBUG(update, UPDATE_OUT)) {
+               char buf_prefix[PREFIX_STRLEN];
+               prefix2str(p, buf_prefix, sizeof(buf_prefix));
+               zlog_debug("%s: p=%s, selected=%p", __func__, buf_prefix,
+                          selected);
+       }
+
        /* First update is deferred until ORF or ROUTE-REFRESH is received */
        if (onlypeer && CHECK_FLAG(onlypeer->af_sflags[afi][safi],
                                   PEER_STATUS_ORF_WAIT_REFRESH))
@@ -2057,6 +2102,8 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
        struct bgp_info *new_select;
        struct bgp_info *old_select;
        struct bgp_info_pair old_and_new;
+       char pfx_buf[PREFIX2STR_BUFFER];
+       int debug = 0;
 
        /* Is it end of initial update? (after startup) */
        if (!rn) {
@@ -2074,6 +2121,13 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
                return;
        }
 
+       debug = bgp_debug_bestpath(&rn->p);
+       if (debug) {
+               prefix2str(&rn->p, pfx_buf, sizeof(pfx_buf));
+               zlog_debug("%s: p=%s afi=%s, safi=%s start", __func__, pfx_buf,
+                          afi2str(afi), safi2str(safi));
+       }
+
        /* Best path selection. */
        bgp_best_selection(bgp, rn, &bgp->maxpaths[afi][safi], &old_and_new,
                           afi, safi);
@@ -2114,6 +2168,14 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
                bgp_unregister_for_label(rn);
        }
 
+       if (debug) {
+               prefix2str(&rn->p, pfx_buf, sizeof(pfx_buf));
+               zlog_debug(
+                       "%s: p=%s afi=%s, safi=%s, old_select=%p, new_select=%p",
+                       __func__, pfx_buf, afi2str(afi), safi2str(safi),
+                       old_select, new_select);
+       }
+
        /* If best route remains the same and this is not due to user-initiated
         * clear, see exactly what needs to be done.
         */
@@ -2128,11 +2190,16 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
                        vnc_import_bgp_exterior_add_route(bgp, p, old_select);
 #endif
                        if (bgp_fibupd_safi(safi)
-                           && !bgp_option_check(BGP_OPT_NO_FIB)
-                           && new_select->type == ZEBRA_ROUTE_BGP
-                           && new_select->sub_type == BGP_ROUTE_NORMAL)
-                               bgp_zebra_announce(rn, p, old_select, bgp, afi,
-                                                  safi);
+                           && !bgp_option_check(BGP_OPT_NO_FIB)) {
+
+                               if (new_select->type == ZEBRA_ROUTE_BGP
+                                   && (new_select->sub_type == BGP_ROUTE_NORMAL
+                                       || new_select->sub_type
+                                                  == BGP_ROUTE_IMPORTED))
+
+                                       bgp_zebra_announce(rn, p, old_select,
+                                                          bgp, afi, safi);
+                       }
                }
                UNSET_FLAG(old_select->flags, BGP_INFO_MULTIPATH_CHG);
                bgp_zebra_clear_route_change_flags(rn);
@@ -2179,6 +2246,8 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
        if (old_select)
                bgp_info_unset_flag(rn, old_select, BGP_INFO_SELECTED);
        if (new_select) {
+               if (debug)
+                       zlog_debug("%s: setting SELECTED flag", __func__);
                bgp_info_set_flag(rn, new_select, BGP_INFO_SELECTED);
                bgp_info_unset_flag(rn, new_select, BGP_INFO_ATTR_CHANGED);
                UNSET_FLAG(new_select->flags, BGP_INFO_MULTIPATH_CHG);
@@ -2214,25 +2283,30 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
            && !bgp_option_check(BGP_OPT_NO_FIB)) {
                if (new_select && new_select->type == ZEBRA_ROUTE_BGP
                    && (new_select->sub_type == BGP_ROUTE_NORMAL
-                       || new_select->sub_type == BGP_ROUTE_AGGREGATE))
+                       || new_select->sub_type == BGP_ROUTE_AGGREGATE
+                       || new_select->sub_type == BGP_ROUTE_IMPORTED))
+
                        bgp_zebra_announce(rn, p, new_select, bgp, afi, safi);
                else {
                        /* Withdraw the route from the kernel. */
                        if (old_select && old_select->type == ZEBRA_ROUTE_BGP
                            && (old_select->sub_type == BGP_ROUTE_NORMAL
-                               || old_select->sub_type == BGP_ROUTE_AGGREGATE))
+                               || old_select->sub_type == BGP_ROUTE_AGGREGATE
+                               || old_select->sub_type == BGP_ROUTE_IMPORTED))
+
                                bgp_zebra_withdraw(p, old_select, safi);
                }
        }
 
        /* advertise/withdraw type-5 routes */
        if ((afi == AFI_IP || afi == AFI_IP6) && (safi == SAFI_UNICAST)) {
-               if (new_select
-                   && (!new_select->extra || !new_select->extra->parent))
-                       bgp_evpn_advertise_type5_route(
-                               bgp, &rn->p, new_select->attr, afi, safi);
-               else if (old_select
-                        && (!old_select->extra || !old_select->extra->parent))
+               if (advertise_type5_routes(bgp, afi) && new_select &&
+                   (!new_select->extra || !new_select->extra->parent))
+                       bgp_evpn_advertise_type5_route(bgp, &rn->p,
+                                                      new_select->attr,
+                                                      afi, safi);
+               else if (advertise_type5_routes(bgp, afi) && old_select &&
+                        (!old_select->extra || !old_select->extra->parent))
                        bgp_evpn_withdraw_type5_route(bgp, &rn->p, afi, safi);
        }
 
@@ -3121,6 +3195,18 @@ int bgp_update(struct peer *peer, struct prefix *p, u_int32_t addpath_id,
                bgp_process(bgp, rn, afi, safi);
                bgp_unlock_node(rn);
 
+               if (SAFI_UNICAST == safi
+                   && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF
+                       || bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                       vpn_leak_from_vrf_update(bgp_get_default(), bgp, ri);
+               }
+               if ((SAFI_MPLS_VPN == safi)
+                   && (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                       vpn_leak_to_vrf_update(bgp, ri);
+               }
+
 #if ENABLE_BGP_VNC
                if (SAFI_MPLS_VPN == safi) {
                        mpls_label_t label_decoded = decode_label(label);
@@ -3237,6 +3323,16 @@ int bgp_update(struct peer *peer, struct prefix *p, u_int32_t addpath_id,
        /* Process change. */
        bgp_process(bgp, rn, afi, safi);
 
+       if (SAFI_UNICAST == safi
+           && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF
+               || bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+               vpn_leak_from_vrf_update(bgp_get_default(), bgp, new);
+       }
+       if ((SAFI_MPLS_VPN == safi)
+           && (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+               vpn_leak_to_vrf_update(bgp, new);
+       }
 #if ENABLE_BGP_VNC
        if (SAFI_MPLS_VPN == safi) {
                mpls_label_t label_decoded = decode_label(label);
@@ -3275,6 +3371,18 @@ filtered:
                if (safi == SAFI_EVPN)
                        bgp_evpn_unimport_route(bgp, afi, safi, p, ri);
 
+               if (SAFI_UNICAST == safi
+                   && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF
+                       || bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                       vpn_leak_from_vrf_withdraw(bgp_get_default(), bgp, ri);
+               }
+               if ((SAFI_MPLS_VPN == safi)
+                   && (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                       vpn_leak_to_vrf_withdraw(bgp, ri);
+               }
+
                bgp_rib_remove(rn, ri, peer, afi, safi);
        }
 
@@ -3361,9 +3469,19 @@ int bgp_withdraw(struct peer *peer, struct prefix *p, u_int32_t addpath_id,
        }
 
        /* Withdraw specified route from routing table. */
-       if (ri && !CHECK_FLAG(ri->flags, BGP_INFO_HISTORY))
+       if (ri && !CHECK_FLAG(ri->flags, BGP_INFO_HISTORY)) {
                bgp_rib_withdraw(rn, ri, peer, afi, safi, prd);
-       else if (bgp_debug_update(peer, p, NULL, 1)) {
+               if (SAFI_UNICAST == safi
+                   && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF
+                       || bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+                       vpn_leak_from_vrf_withdraw(bgp_get_default(), bgp, ri);
+               }
+               if ((SAFI_MPLS_VPN == safi)
+                   && (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                       vpn_leak_to_vrf_withdraw(bgp, ri);
+               }
+       } else if (bgp_debug_update(peer, p, NULL, 1)) {
                bgp_debug_rdpfxpath2str(afi, safi, prd, p, label, num_labels,
                                        addpath_id ? 1 : 0, addpath_id, pfx_buf,
                                        sizeof(pfx_buf));
@@ -3847,7 +3965,9 @@ static void bgp_cleanup_table(struct bgp_table *table, safi_t safi)
                        if (CHECK_FLAG(ri->flags, BGP_INFO_SELECTED)
                            && ri->type == ZEBRA_ROUTE_BGP
                            && (ri->sub_type == BGP_ROUTE_NORMAL
-                               || ri->sub_type == BGP_ROUTE_AGGREGATE)) {
+                               || ri->sub_type == BGP_ROUTE_AGGREGATE
+                               || ri->sub_type == BGP_ROUTE_IMPORTED)) {
+
                                if (bgp_fibupd_safi(safi))
                                        bgp_zebra_withdraw(&rn->p, ri, safi);
                                bgp_info_reap(rn, ri);
@@ -3940,10 +4060,6 @@ int bgp_nlri_parse_ip(struct peer *peer, struct attr *attr,
        int addpath_encoded;
        u_int32_t addpath_id;
 
-       /* Check peer status. */
-       if (peer->status != Established)
-               return 0;
-
        pnt = packet->nlri;
        lim = pnt + packet->length;
        afi = packet->afi;
@@ -4248,6 +4364,15 @@ void bgp_static_update(struct bgp *bgp, struct prefix *p,
                        /* Process change. */
                        bgp_aggregate_increment(bgp, p, ri, afi, safi);
                        bgp_process(bgp, rn, afi, safi);
+
+                       if (SAFI_UNICAST == safi
+                           && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF
+                               || bgp->inst_type
+                                          == BGP_INSTANCE_TYPE_DEFAULT)) {
+                               vpn_leak_from_vrf_update(bgp_get_default(), bgp,
+                                                        ri);
+                       }
+
                        bgp_unlock_node(rn);
                        aspath_unintern(&attr.aspath);
                        return;
@@ -4295,6 +4420,12 @@ void bgp_static_update(struct bgp *bgp, struct prefix *p,
        /* Process change. */
        bgp_process(bgp, rn, afi, safi);
 
+       if (SAFI_UNICAST == safi
+           && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF
+               || bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+               vpn_leak_from_vrf_update(bgp_get_default(), bgp, new);
+       }
+
        /* Unintern original. */
        aspath_unintern(&attr.aspath);
 }
@@ -4315,6 +4446,11 @@ void bgp_static_withdraw(struct bgp *bgp, struct prefix *p, afi_t afi,
 
        /* Withdraw static BGP route from routing table. */
        if (ri) {
+               if (SAFI_UNICAST == safi
+                   && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF
+                       || bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+                       vpn_leak_from_vrf_withdraw(bgp_get_default(), bgp, ri);
+               }
                bgp_aggregate_decrement(bgp, p, ri, afi, safi);
                bgp_unlink_nexthop(ri);
                bgp_info_delete(rn, ri);
@@ -4350,6 +4486,10 @@ static void bgp_static_withdraw_safi(struct bgp *bgp, struct prefix *p,
                        ri->peer, NULL, p, prd, ri->attr, afi, safi, ri->type,
                        1); /* Kill, since it is an administrative change */
 #endif
+               if (SAFI_MPLS_VPN == safi
+                   && bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
+                       vpn_leak_to_vrf_withdraw(bgp, ri);
+               }
                bgp_aggregate_decrement(bgp, p, ri, afi, safi);
                bgp_info_delete(rn, ri);
                bgp_process(bgp, rn, afi, safi);
@@ -4478,6 +4618,11 @@ static void bgp_static_update_safi(struct bgp *bgp, struct prefix *p,
                        /* Process change. */
                        bgp_aggregate_increment(bgp, p, ri, afi, safi);
                        bgp_process(bgp, rn, afi, safi);
+
+                       if (SAFI_MPLS_VPN == safi
+                           && bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
+                               vpn_leak_to_vrf_update(bgp, ri);
+                       }
 #if ENABLE_BGP_VNC
                        rfapiProcessUpdate(ri->peer, NULL, p, &bgp_static->prd,
                                           ri->attr, afi, safi, ri->type,
@@ -4514,6 +4659,10 @@ static void bgp_static_update_safi(struct bgp *bgp, struct prefix *p,
        /* Process change. */
        bgp_process(bgp, rn, afi, safi);
 
+       if (SAFI_MPLS_VPN == safi
+           && bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
+               vpn_leak_to_vrf_update(bgp, new);
+       }
 #if ENABLE_BGP_VNC
        rfapiProcessUpdate(new->peer, NULL, p, &bgp_static->prd, new->attr, afi,
                           safi, new->type, new->sub_type, &label);
@@ -5978,6 +6127,14 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
                                bgp_process(bgp, bn, afi, SAFI_UNICAST);
                                bgp_unlock_node(bn);
                                aspath_unintern(&attr.aspath);
+
+                               if ((bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
+                                   || (bgp->inst_type
+                                       == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                                       vpn_leak_from_vrf_update(
+                                               bgp_get_default(), bgp, bi);
+                               }
                                return;
                        }
                }
@@ -5990,6 +6147,12 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
                bgp_info_add(bn, new);
                bgp_unlock_node(bn);
                bgp_process(bgp, bn, afi, SAFI_UNICAST);
+
+               if ((bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
+                   || (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                       vpn_leak_from_vrf_update(bgp_get_default(), bgp, new);
+               }
        }
 
        /* Unintern original. */
@@ -6016,6 +6179,12 @@ void bgp_redistribute_delete(struct bgp *bgp, struct prefix *p, u_char type,
                                break;
 
                if (ri) {
+                       if ((bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
+                           || (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                               vpn_leak_from_vrf_withdraw(bgp_get_default(),
+                                                          bgp, ri);
+                       }
                        bgp_aggregate_decrement(bgp, p, ri, afi, SAFI_UNICAST);
                        bgp_info_delete(rn, ri);
                        bgp_process(bgp, rn, afi, SAFI_UNICAST);
@@ -6041,6 +6210,12 @@ void bgp_redistribute_withdraw(struct bgp *bgp, afi_t afi, int type,
                                break;
 
                if (ri) {
+                       if ((bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
+                           || (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
+
+                               vpn_leak_from_vrf_withdraw(bgp_get_default(),
+                                                          bgp, ri);
+                       }
                        bgp_aggregate_decrement(bgp, &rn->p, ri, afi,
                                                SAFI_UNICAST);
                        bgp_info_delete(rn, ri);
@@ -7034,6 +7209,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p,
        json_object *json_ext_community = NULL;
        json_object *json_lcommunity = NULL;
        json_object *json_last_update = NULL;
+       json_object *json_pmsi = NULL;
        json_object *json_nexthop_global = NULL;
        json_object *json_nexthop_ll = NULL;
        json_object *json_nexthops = NULL;
@@ -7786,6 +7962,24 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p,
                                               json_last_update);
                } else
                        vty_out(vty, "      Last update: %s", ctime(&tbuf));
+
+               /* Line 10 display PMSI tunnel attribute, if present */
+               if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL)) {
+                       const char *str = lookup_msg(bgp_pmsi_tnltype_str,
+                                                    attr->pmsi_tnl_type,
+                                                    PMSI_TNLTYPE_STR_DEFAULT);
+
+                       if (json_paths) {
+                               json_pmsi = json_object_new_object();
+                               json_object_string_add(json_pmsi,
+                                                      "tunnelType", str);
+                               json_object_object_add(json_path, "pmsi",
+                                                      json_pmsi);
+                       } else
+                               vty_out(vty, "      PMSI Tunnel Type: %s\n",
+                                       str);
+               }
+
        }
 
        /* We've constructed the json object for this path, add it to the json
index dffe2b8ddcfe91197487e7223bc6b0239608aa70..748c4f911092718b5f4abcac11190aafe81a812f 100644 (file)
@@ -114,6 +114,30 @@ struct bgp_info_extra {
        /* For imported routes into a VNI (or VRF), this points to the parent.
         */
        void *parent;
+
+       /*
+        * Some tunnelish parameters follow. Maybe consolidate into an
+        * internal tunnel structure?
+        */
+
+       /*
+        * Original bgp instance for imported routes. Needed for:
+        * 1. Find all routes from a specific vrf for deletion
+        * 2. vrf context of original nexthop
+        *
+        * Store pointer to bgp instance rather than bgp->vrf_id because
+        * bgp->vrf_id is not always valid (or may change?).
+        *
+        * Set to NULL if route is not imported from another bgp instance.
+        */
+       struct bgp *bgp_orig;
+
+       /*
+        * Nexthop in context of original bgp instance. Needed
+        * for label resolution of core mpls routes exported to a vrf.
+        * Set nexthop_orig.family to 0 if not valid.
+        */
+       struct prefix nexthop_orig;
 };
 
 struct bgp_info {
@@ -179,6 +203,7 @@ struct bgp_info {
 #ifdef ENABLE_BGP_VNC
 # define BGP_ROUTE_RFP          4 
 #endif
+#define BGP_ROUTE_IMPORTED     5        /* from another bgp instance/safi */
 
        u_short instance;
 
index 5371b372398187e55b9d870e5750ccdd0456dce7..5a265b6c9c43cf0327378967e7de509e6d2cd6b1 100644 (file)
@@ -57,6 +57,7 @@
 #include "bgpd/bgp_evpn.h"
 #include "bgpd/bgp_evpn_private.h"
 #include "bgpd/bgp_evpn_vty.h"
+#include "bgpd/bgp_mplsvpn.h"
 
 #if ENABLE_BGP_VNC
 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
@@ -594,6 +595,24 @@ struct route_map_rule_cmd route_match_ip_route_source_prefix_list_cmd = {
        route_match_ip_route_source_prefix_list_compile,
        route_match_ip_route_source_prefix_list_free};
 
+/* `match evpn default-route' */
+
+/* Match function should return 1 if match is success else 0 */
+static route_map_result_t route_match_evpn_default_route(void *rule,
+                                                        struct prefix *p,
+                                                        route_map_object_t
+                                                        type, void *object)
+{
+       if (type == RMAP_BGP && is_evpn_prefix_default(p))
+               return RMAP_MATCH;
+
+       return RMAP_NOMATCH;
+}
+
+/* Route map commands for default-route matching. */
+struct route_map_rule_cmd route_match_evpn_default_route_cmd = {
+       "evpn default-route", route_match_evpn_default_route, NULL, NULL};
+
 /* `match mac address MAC_ACCESS_LIST' */
 
 /* Match function should return 1 if match is success else return
@@ -3096,13 +3115,17 @@ static int bgp_route_map_process_update_cb(char *rmap_name)
        struct listnode *node, *nnode;
        struct bgp *bgp;
 
-       for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
+       for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
                bgp_route_map_process_update(bgp, rmap_name, 1);
 
 #if ENABLE_BGP_VNC
-       zlog_debug("%s: calling vnc_routemap_update", __func__);
-       vnc_routemap_update(bgp, __func__);
+               /* zlog_debug("%s: calling vnc_routemap_update", __func__); */
+               vnc_routemap_update(bgp, __func__);
 #endif
+       }
+
+       vpn_policy_routemap_event(rmap_name);
+
        return 0;
 }
 
@@ -3249,6 +3272,29 @@ DEFUN (no_match_evpn_vni,
                                      RMAP_EVENT_MATCH_DELETED);
 }
 
+DEFUN (match_evpn_default_route,
+       match_evpn_default_route_cmd,
+       "match evpn default-route",
+       MATCH_STR
+       EVPN_HELP_STR
+       "default EVPN type-5 route\n")
+{
+       return bgp_route_match_add(vty, "evpn default-route", NULL,
+                                  RMAP_EVENT_MATCH_ADDED);
+}
+
+DEFUN (no_match_evpn_default_route,
+       no_match_evpn_default_route_cmd,
+       "no match evpn default-route",
+       NO_STR
+       MATCH_STR
+       EVPN_HELP_STR
+       "default EVPN type-5 route\n")
+{
+       return bgp_route_match_delete(vty, "evpn default-route", NULL,
+                                     RMAP_EVENT_MATCH_DELETED);
+}
+
 DEFUN (match_peer,
        match_peer_cmd,
        "match peer <A.B.C.D|X:X::X:X|WORD>",
@@ -4628,6 +4674,7 @@ void bgp_route_map_init(void)
        route_map_install_match(&route_match_mac_address_cmd);
        route_map_install_match(&route_match_evpn_vni_cmd);
        route_map_install_match(&route_match_evpn_route_type_cmd);
+       route_map_install_match(&route_match_evpn_default_route_cmd);
 
        route_map_install_set(&route_set_ip_nexthop_cmd);
        route_map_install_set(&route_set_local_pref_cmd);
@@ -4664,6 +4711,8 @@ void bgp_route_map_init(void)
        install_element(RMAP_NODE, &no_match_evpn_vni_cmd);
        install_element(RMAP_NODE, &match_evpn_route_type_cmd);
        install_element(RMAP_NODE, &no_match_evpn_route_type_cmd);
+       install_element(RMAP_NODE, &match_evpn_default_route_cmd);
+       install_element(RMAP_NODE, &no_match_evpn_default_route_cmd);
 
        install_element(RMAP_NODE, &match_aspath_cmd);
        install_element(RMAP_NODE, &no_match_aspath_cmd);
index 1fb5bf19f1846eda45e136c5090395da418a772b..7c9a134b0f5af3dc6739870617628f025cf28ff5 100644 (file)
@@ -730,7 +730,7 @@ DEFPY (rpki_expire_interval,
        "Set expire interval\n"
        "Expire interval value\n")
 {
-       if (tmp >= polling_period) {
+       if ((unsigned int)tmp >= polling_period) {
                expire_interval = tmp;
                return CMD_SUCCESS;
        }
index 705cb152f0c12a48d896b644b6ea076ea625fe46..e66e5a540b1eeb7e4c27bbe35d79c5900a18c49e 100644 (file)
@@ -113,6 +113,14 @@ static int group_announce_route_walkcb(struct update_group *updgrp, void *arg)
        peer = UPDGRP_PEER(updgrp);
        addpath_capable = bgp_addpath_encode_tx(peer, afi, safi);
 
+       if (BGP_DEBUG(update, UPDATE_OUT)) {
+               char buf_prefix[PREFIX_STRLEN];
+               prefix2str(&ctx->rn->p, buf_prefix, sizeof(buf_prefix));
+               zlog_debug("%s: afi=%s, safi=%s, p=%s", __func__, afi2str(afi),
+                          safi2str(safi), buf_prefix);
+       }
+
+
        UPDGRP_FOREACH_SUBGRP (updgrp, subgrp) {
 
                /*
index c8e503d72aa419f962eb2cda16e5dcb9053b8c3b..ad6f1a558873f4d02f03409715261915a4a04608 100644 (file)
@@ -6112,6 +6112,482 @@ ALIAS_HIDDEN(no_neighbor_addpath_tx_bestpath_per_as,
             NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Use addpath to advertise the bestpath per each neighboring AS\n")
 
+static int set_ecom_list(struct vty *vty, int argc, struct cmd_token **argv,
+                        struct ecommunity **list)
+{
+       struct ecommunity *ecom = NULL;
+       struct ecommunity *ecomadd;
+
+       for (; argc; --argc, ++argv) {
+
+               ecomadd = ecommunity_str2com(argv[0]->arg,
+                                            ECOMMUNITY_ROUTE_TARGET, 0);
+               if (!ecomadd) {
+                       vty_out(vty, "Malformed community-list value\n");
+                       if (ecom)
+                               ecommunity_free(&ecom);
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
+
+               if (ecom) {
+                       ecommunity_merge(ecom, ecomadd);
+                       ecommunity_free(&ecomadd);
+               } else {
+                       ecom = ecomadd;
+               }
+       }
+
+       if (*list) {
+               ecommunity_free(&*list);
+       }
+       *list = ecom;
+
+       return CMD_SUCCESS;
+}
+
+static int vpn_policy_getafi(struct vty *vty, int *doafi)
+{
+       switch (vty->node) {
+       case BGP_IPV4_NODE:
+               doafi[AFI_IP] = 1;
+               break;
+       case BGP_IPV6_NODE:
+               doafi[AFI_IP6] = 1;
+               break;
+       default:
+               vty_out(vty,
+                       "%% context error: valid only in address-family <ipv4|ipv6> unicast block\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       return CMD_SUCCESS;
+}
+
+DEFPY (af_rd_vpn_export,
+       af_rd_vpn_export_cmd,
+       "[no] rd vpn export ASN:NN_OR_IP-ADDRESS:NN$rd_str",
+       NO_STR
+       "Specify route distinguisher\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from current address-family to vpn\n"
+       "Route Distinguisher (<as-number>:<number> | <ip-address>:<number>)\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       struct prefix_rd prd;
+       int ret;
+       int doafi[AFI_MAX] = {0};
+       afi_t afi;
+       int idx = 0;
+       int yes = 1;
+
+       if (argv_find(argv, argc, "no", &idx))
+               yes = 0;
+
+       if (yes) {
+               ret = str2prefix_rd(rd_str, &prd);
+               if (!ret) {
+                       vty_out(vty, "%% Malformed rd\n");
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
+       }
+
+       ret = vpn_policy_getafi(vty, doafi);
+       if (ret != CMD_SUCCESS)
+               return ret;
+
+
+       for (afi = 0; afi < AFI_MAX; ++afi) {
+               if (!doafi[afi])
+                       continue;
+
+               /* pre-change: un-export vpn routes (vpn->vrf routes unaffected)
+                */
+               vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                  bgp_get_default(), bgp);
+
+               if (yes) {
+                       bgp->vpn_policy[afi].tovpn_rd = prd;
+                       SET_FLAG(bgp->vpn_policy[afi].flags,
+                                BGP_VPN_POLICY_TOVPN_RD_SET);
+               } else {
+                       UNSET_FLAG(bgp->vpn_policy[afi].flags,
+                                  BGP_VPN_POLICY_TOVPN_RD_SET);
+               }
+
+               /* post-change: re-export vpn routes */
+               vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                   bgp_get_default(), bgp);
+       }
+
+       return CMD_SUCCESS;
+}
+
+ALIAS (af_rd_vpn_export,
+       af_no_rd_vpn_export_cmd,
+       "no rd vpn export",
+       NO_STR
+       "Specify route distinguisher\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from current address-family to vpn\n")
+
+DEFPY (af_label_vpn_export,
+       af_label_vpn_export_cmd,
+       "[no] label vpn export (0-1048575)$label_val",
+       NO_STR
+       "label value for VRF\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from current address-family to vpn\n"
+       "Label Value <0-1048575>\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       mpls_label_t label = MPLS_LABEL_NONE;
+       int doafi[AFI_MAX] = {0};
+       afi_t afi;
+       int ret;
+       int idx = 0;
+       int yes = 1;
+
+       if (argv_find(argv, argc, "no", &idx))
+               yes = 0;
+
+       if (yes)
+               label = label_val; /* rely on parser to force unsigned */
+
+       ret = vpn_policy_getafi(vty, doafi);
+       if (ret != CMD_SUCCESS)
+               return ret;
+
+       for (afi = 0; afi < AFI_MAX; ++afi) {
+               if (!doafi[afi])
+                       continue;
+
+               /*
+                * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
+                */
+               vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                  bgp_get_default(), bgp);
+
+               bgp->vpn_policy[afi].tovpn_label = label;
+
+               /* post-change: re-export vpn routes */
+               vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                   bgp_get_default(), bgp);
+       }
+
+       return CMD_SUCCESS;
+}
+
+ALIAS (af_label_vpn_export,
+       af_no_label_vpn_export_cmd,
+       "no label vpn export",
+       NO_STR
+       "label value for VRF\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from current address-family to vpn\n")
+
+DEFPY (af_nexthop_vpn_export,
+       af_nexthop_vpn_export_cmd,
+       "[no] nexthop vpn export <A.B.C.D|X:X::X:X>$nexthop_str",
+       NO_STR
+       "Specify next hop to use for VRF advertised prefixes\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from current address-family to vpn\n"
+       "IPv4 prefix\n"
+       "IPv6 prefix\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int doafi[AFI_MAX] = {0};
+       afi_t afi;
+       int ret;
+       struct prefix p;
+       int idx = 0;
+       int yes = 1;
+
+       if (argv_find(argv, argc, "no", &idx))
+               yes = 0;
+
+       if (yes) {
+               if (!sockunion2hostprefix(nexthop_str, &p))
+                       return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       ret = vpn_policy_getafi(vty, doafi);
+       if (ret != CMD_SUCCESS)
+               return ret;
+
+       for (afi = 0; afi < AFI_MAX; ++afi) {
+               if (!doafi[afi])
+                       continue;
+
+               /*
+                * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
+                */
+               vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                  bgp_get_default(), bgp);
+
+               if (yes) {
+                       bgp->vpn_policy[afi].tovpn_nexthop = p;
+                       SET_FLAG(bgp->vpn_policy[afi].flags,
+                                BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
+               } else {
+                       UNSET_FLAG(bgp->vpn_policy[afi].flags,
+                                  BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
+               }
+
+               /* post-change: re-export vpn routes */
+               vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                                   bgp_get_default(), bgp);
+       }
+
+       return CMD_SUCCESS;
+}
+
+ALIAS (af_nexthop_vpn_export,
+       af_no_nexthop_vpn_export_cmd,
+       "no nexthop vpn export",
+       NO_STR
+       "Specify next hop to use for VRF advertised prefixes\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from current address-family to vpn\n")
+
+static int vpn_policy_getdirs(struct vty *vty, const char *dstr, int *dodir)
+{
+       if (!strcmp(dstr, "import")) {
+               dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
+       } else if (!strcmp(dstr, "export")) {
+               dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
+       } else if (!strcmp(dstr, "both")) {
+               dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
+               dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
+       } else {
+               vty_out(vty, "%% direction parse error\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       return CMD_SUCCESS;
+}
+
+DEFPY (af_rt_vpn_imexport,
+       af_rt_vpn_imexport_cmd,
+       "[no] <rt|route-target> vpn <import|export|both>$direction_str RTLIST...",
+       NO_STR
+       "Specify route target list\n"
+       "Specify route target list\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from vpn to current address-family: match any\n"
+       "For routes leaked from current address-family to vpn: set\n"
+       "both import: match any and export: set\n"
+       "Space separated route target list (A.B.C.D:MN|EF:OPQR|GHJK:MN)\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int ret;
+       struct ecommunity *ecom = NULL;
+       int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
+       int doafi[AFI_MAX] = {0};
+       vpn_policy_direction_t dir;
+       afi_t afi;
+       int idx = 0;
+       int yes = 1;
+
+       if (argv_find(argv, argc, "no", &idx))
+               yes = 0;
+
+       ret = vpn_policy_getafi(vty, doafi);
+       if (ret != CMD_SUCCESS)
+               return ret;
+
+       ret = vpn_policy_getdirs(vty, direction_str, dodir);
+       if (ret != CMD_SUCCESS)
+               return ret;
+
+       if (yes) {
+               if (!argv_find(argv, argc, "RTLIST", &idx)) {
+                       vty_out(vty, "%% Missing RTLIST\n");
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
+               ret = set_ecom_list(vty, argc - idx, argv + idx, &ecom);
+               if (ret != CMD_SUCCESS) {
+                       return ret;
+               }
+       }
+
+       for (afi = 0; afi < AFI_MAX; ++afi) {
+               if (!doafi[afi])
+                       continue;
+               for (dir = 0; dir < BGP_VPN_POLICY_DIR_MAX; ++dir) {
+                       if (!dodir[dir])
+                               continue;
+
+                       vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
+
+                       if (yes) {
+                               if (bgp->vpn_policy[afi].rtlist[dir])
+                                       ecommunity_free(
+                                           &bgp->vpn_policy[afi].rtlist[dir]);
+                               bgp->vpn_policy[afi].rtlist[dir] =
+                                       ecommunity_dup(ecom);
+                       } else {
+                               if (bgp->vpn_policy[afi].rtlist[dir])
+                                       ecommunity_free(
+                                           &bgp->vpn_policy[afi].rtlist[dir]);
+                               bgp->vpn_policy[afi].rtlist[dir] = NULL;
+                       }
+
+                       vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
+               }
+       }
+       if (ecom)
+               ecommunity_free(&ecom);
+
+       return CMD_SUCCESS;
+}
+
+ALIAS (af_rt_vpn_imexport,
+       af_no_rt_vpn_imexport_cmd,
+       "no <rt|route-target> vpn <import|export|both>$direction_str",
+       NO_STR
+       "Specify route target list\n"
+       "Specify route target list\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from vpn to current address-family\n"
+       "For routes leaked from current address-family to vpn\n"
+       "both import and export\n")
+
+DEFPY (af_route_map_vpn_imexport,
+       af_route_map_vpn_imexport_cmd,
+/* future: "route-map <vpn|evpn|vrf NAME> <import|export> RMAP" */
+       "[no] route-map vpn <import|export>$direction_str RMAP$rmap_str",
+       NO_STR
+       "Specify route map\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from vpn to current address-family\n"
+       "For routes leaked from current address-family to vpn\n"
+       "name of route-map\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int ret;
+       int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
+       int doafi[AFI_MAX] = {0};
+       vpn_policy_direction_t dir;
+       afi_t afi;
+       int idx = 0;
+       int yes = 1;
+
+       if (argv_find(argv, argc, "no", &idx))
+               yes = 0;
+
+       ret = vpn_policy_getafi(vty, doafi);
+       if (ret != CMD_SUCCESS)
+               return ret;
+
+       ret = vpn_policy_getdirs(vty, direction_str, dodir);
+       if (ret != CMD_SUCCESS)
+               return ret;
+
+       for (afi = 0; afi < AFI_MAX; ++afi) {
+               if (!doafi[afi])
+                       continue;
+               for (dir = 0; dir < BGP_VPN_POLICY_DIR_MAX; ++dir) {
+                       if (!dodir[dir])
+                               continue;
+
+                       vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
+
+                       if (yes) {
+                               if (bgp->vpn_policy[afi].rmap_name[dir])
+                                       XFREE(MTYPE_ROUTE_MAP_NAME,
+                                       bgp->vpn_policy[afi].rmap_name[dir]);
+                               bgp->vpn_policy[afi].rmap_name[dir] = XSTRDUP(
+                                       MTYPE_ROUTE_MAP_NAME, rmap_str);
+                               bgp->vpn_policy[afi].rmap[dir] =
+                                       route_map_lookup_by_name(rmap_str);
+                       } else {
+                               if (bgp->vpn_policy[afi].rmap_name[dir])
+                                       XFREE(MTYPE_ROUTE_MAP_NAME,
+                                       bgp->vpn_policy[afi].rmap_name[dir]);
+                               bgp->vpn_policy[afi].rmap_name[dir] = NULL;
+                               bgp->vpn_policy[afi].rmap[dir] = NULL;
+                       }
+
+                       vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
+               }
+       }
+
+       return CMD_SUCCESS;
+}
+
+ALIAS (af_route_map_vpn_imexport,
+       af_no_route_map_vpn_imexport_cmd,
+       "no route-map vpn <import|export>$direction_str",
+       NO_STR
+       "Specify route map\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from vpn to current address-family\n"
+       "For routes leaked from current address-family to vpn\n")
+
+/* This command is valid only in a bgp vrf instance or the default instance */
+DEFPY (bgp_imexport_vpn,
+       bgp_imexport_vpn_cmd,
+       "[no] <import|export>$direction_str vpn",
+       NO_STR
+       "Import routes to this address-family\n"
+       "Export routes from this address-family\n"
+       "to/from default instance VPN RIB\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int previous_state;
+       afi_t afi;
+       safi_t safi;
+       int idx = 0;
+       int yes = 1;
+       int flag;
+       vpn_policy_direction_t dir;
+
+       if (argv_find(argv, argc, "no", &idx))
+               yes = 0;
+
+       if (BGP_INSTANCE_TYPE_VRF != bgp->inst_type &&
+               BGP_INSTANCE_TYPE_DEFAULT != bgp->inst_type) {
+
+               vty_out(vty, "%% import|export vpn valid only for bgp vrf or default instance\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       afi = bgp_node_afi(vty);
+       safi = bgp_node_safi(vty);
+       if ((SAFI_UNICAST != safi) || ((AFI_IP != afi) && (AFI_IP6 != afi))) {
+               vty_out(vty, "%% import|export vpn valid only for unicast ipv4|ipv6\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       if (!strcmp(direction_str, "import")) {
+               flag = BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT;
+               dir = BGP_VPN_POLICY_DIR_FROMVPN;
+       } else if (!strcmp(direction_str, "export")) {
+               flag = BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT;
+               dir = BGP_VPN_POLICY_DIR_TOVPN;
+       } else {
+               vty_out(vty, "%% unknown direction %s\n", direction_str);
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       previous_state = CHECK_FLAG(bgp->af_flags[afi][safi], flag);
+
+       if (yes) {
+               SET_FLAG(bgp->af_flags[afi][safi], flag);
+               if (!previous_state) {
+                       /* trigger export current vrf */
+                       vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
+               }
+       } else {
+               if (previous_state) {
+                       /* trigger un-export current vrf */
+                       vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
+               }
+               UNSET_FLAG(bgp->af_flags[afi][safi], flag);
+       }
+
+       return CMD_SUCCESS;
+}
+
 DEFUN_NOSH (address_family_ipv4_safi,
        address_family_ipv4_safi_cmd,
        "address-family ipv4 [<unicast|multicast|vpn|labeled-unicast>]",
@@ -11139,6 +11615,80 @@ void bgp_config_write_redistribute(struct vty *vty, struct bgp *bgp, afi_t afi,
        }
 }
 
+/* This is part of the address-family block (unicast only) */
+void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
+                                           afi_t afi)
+{
+       int indent = 2;
+
+       if (bgp->vpn_policy[afi].tovpn_label != MPLS_LABEL_NONE) {
+               vty_out(vty, "%*slabel vpn export %u\n", indent, "",
+                       bgp->vpn_policy[afi].tovpn_label);
+       }
+       if (CHECK_FLAG(bgp->vpn_policy[afi].flags,
+                      BGP_VPN_POLICY_TOVPN_RD_SET)) {
+               char buf[RD_ADDRSTRLEN];
+               vty_out(vty, "%*srd vpn export %s\n", indent, "",
+                       prefix_rd2str(&bgp->vpn_policy[afi].tovpn_rd, buf,
+                                     sizeof(buf)));
+       }
+       if (CHECK_FLAG(bgp->vpn_policy[afi].flags,
+                      BGP_VPN_POLICY_TOVPN_NEXTHOP_SET)) {
+
+               char buf[PREFIX_STRLEN];
+               if (inet_ntop(bgp->vpn_policy[afi].tovpn_nexthop.family,
+                             &bgp->vpn_policy[afi].tovpn_nexthop.u.prefix, buf,
+                             sizeof(buf))) {
+
+                       vty_out(vty, "%*snexthop vpn export %s\n",
+                               indent, "", buf);
+               }
+       }
+       if (bgp->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_FROMVPN]
+           && bgp->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_TOVPN]
+           && ecommunity_cmp(
+                      bgp->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_FROMVPN],
+                      bgp->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_TOVPN])) {
+
+               char *b = ecommunity_ecom2str(
+                       bgp->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_TOVPN],
+                       ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET);
+               vty_out(vty, "%*srt vpn both %s\n", indent, "", b);
+               XFREE(MTYPE_ECOMMUNITY_STR, b);
+       } else {
+               if (bgp->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_FROMVPN]) {
+                       char *b = ecommunity_ecom2str(
+                               bgp->vpn_policy[afi]
+                                       .rtlist[BGP_VPN_POLICY_DIR_FROMVPN],
+                               ECOMMUNITY_FORMAT_ROUTE_MAP,
+                               ECOMMUNITY_ROUTE_TARGET);
+                       vty_out(vty, "%*srt vpn import %s\n", indent, "", b);
+                       XFREE(MTYPE_ECOMMUNITY_STR, b);
+               }
+               if (bgp->vpn_policy[afi].rtlist[BGP_VPN_POLICY_DIR_TOVPN]) {
+                       char *b = ecommunity_ecom2str(
+                               bgp->vpn_policy[afi]
+                                       .rtlist[BGP_VPN_POLICY_DIR_TOVPN],
+                               ECOMMUNITY_FORMAT_ROUTE_MAP,
+                               ECOMMUNITY_ROUTE_TARGET);
+                       vty_out(vty, "%*srt vpn export %s\n", indent, "", b);
+                       XFREE(MTYPE_ECOMMUNITY_STR, b);
+               }
+       }
+       if (bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]) {
+               vty_out(vty, "%*sroute-map vpn import %s\n", indent, "",
+                       bgp->vpn_policy[afi]
+                               .rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]);
+       }
+       if (bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_TOVPN]) {
+               vty_out(vty, "%*sroute-map vpn export %s\n", indent, "",
+                       bgp->vpn_policy[afi]
+                               .rmap_name[BGP_VPN_POLICY_DIR_TOVPN]);
+       }
+
+}
+
+
 /* BGP node structure. */
 static struct cmd_node bgp_node = {
        BGP_NODE, "%s(config-router)# ", 1,
@@ -12312,6 +12862,10 @@ void bgp_vty_init(void)
        install_element(BGP_IPV6_NODE, &bgp_redistribute_ipv6_rmap_metric_cmd);
        install_element(BGP_IPV6_NODE, &bgp_redistribute_ipv6_metric_rmap_cmd);
 
+       /* import|export vpn [route-map WORD] */
+       install_element(BGP_IPV4_NODE, &bgp_imexport_vpn_cmd);
+       install_element(BGP_IPV6_NODE, &bgp_imexport_vpn_cmd);
+
        /* ttl_security commands */
        install_element(BGP_NODE, &neighbor_ttl_security_cmd);
        install_element(BGP_NODE, &no_neighbor_ttl_security_cmd);
@@ -12330,6 +12884,29 @@ void bgp_vty_init(void)
 
        /* Community-list. */
        community_list_vty();
+
+       /* vpn-policy commands */
+       install_element(BGP_IPV4_NODE, &af_rd_vpn_export_cmd);
+       install_element(BGP_IPV6_NODE, &af_rd_vpn_export_cmd);
+       install_element(BGP_IPV4_NODE, &af_label_vpn_export_cmd);
+       install_element(BGP_IPV6_NODE, &af_label_vpn_export_cmd);
+       install_element(BGP_IPV4_NODE, &af_nexthop_vpn_export_cmd);
+       install_element(BGP_IPV6_NODE, &af_nexthop_vpn_export_cmd);
+       install_element(BGP_IPV4_NODE, &af_rt_vpn_imexport_cmd);
+       install_element(BGP_IPV6_NODE, &af_rt_vpn_imexport_cmd);
+       install_element(BGP_IPV4_NODE, &af_route_map_vpn_imexport_cmd);
+       install_element(BGP_IPV6_NODE, &af_route_map_vpn_imexport_cmd);
+
+       install_element(BGP_IPV4_NODE, &af_no_rd_vpn_export_cmd);
+       install_element(BGP_IPV6_NODE, &af_no_rd_vpn_export_cmd);
+       install_element(BGP_IPV4_NODE, &af_no_label_vpn_export_cmd);
+       install_element(BGP_IPV6_NODE, &af_no_label_vpn_export_cmd);
+       install_element(BGP_IPV4_NODE, &af_no_nexthop_vpn_export_cmd);
+       install_element(BGP_IPV6_NODE, &af_no_nexthop_vpn_export_cmd);
+       install_element(BGP_IPV4_NODE, &af_no_rt_vpn_imexport_cmd);
+       install_element(BGP_IPV6_NODE, &af_no_rt_vpn_imexport_cmd);
+       install_element(BGP_IPV4_NODE, &af_no_route_map_vpn_imexport_cmd);
+       install_element(BGP_IPV6_NODE, &af_no_route_map_vpn_imexport_cmd);
 }
 
 #include "memory.h"
index cbb41f0840a526e8e41559f9d08d0aa08510cb53..f77ebb610e3fec0f35d8a54ee593792e2d1d7ebe 100644 (file)
@@ -71,4 +71,6 @@ extern int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty,
                                               safi_t *safi, struct bgp **bgp);
 extern int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
                                safi_t safi, u_char use_json);
+extern void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
+                                           afi_t afi);
 #endif /* _QUAGGA_BGP_VTY_H */
index 23f626e960d28208b89df8d267bc294ca2991071..486ea3937a9c7b4c29d05e71cd03c9235d3ab69f 100644 (file)
@@ -54,6 +54,7 @@
 #include "bgpd/rfapi/vnc_export_bgp.h"
 #endif
 #include "bgpd/bgp_evpn.h"
+#include "bgpd/bgp_mplsvpn.h"
 
 /* All information about zebra. */
 struct zclient *zclient = NULL;
@@ -987,6 +988,7 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
        struct bgp_info *mpinfo_cp = &local_info;
        route_tag_t tag;
        mpls_label_t label;
+       int nh_othervrf = 0;
 
        /* Don't try to install if we're not connected to Zebra or Zebra doesn't
         * know of this instance.
@@ -997,6 +999,12 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
        if (bgp->main_zebra_update_hold)
                return;
 
+       /*
+        * vrf leaking support (will have only one nexthop)
+        */
+       if (info->extra && info->extra->bgp_orig)
+               nh_othervrf = 1;
+
        /* Make Zebra API structure. */
        memset(&api, 0, sizeof(api));
        memcpy(&api.rmac, &(info->attr->rmac), sizeof(struct ethaddr));
@@ -1008,6 +1016,21 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
 
        peer = info->peer;
 
+       if (info->type == ZEBRA_ROUTE_BGP
+           && info->sub_type == BGP_ROUTE_IMPORTED) {
+
+               struct bgp_info *bi;
+
+               /*
+                * Look at parent chain for peer sort
+                */
+               for (bi = info; bi->extra && bi->extra->parent;
+                    bi = bi->extra->parent) {
+
+                       peer = ((struct bgp_info *)(bi->extra->parent))->peer;
+               }
+       }
+
        tag = info->attr->tag;
 
        /* When we create an aggregate route we must also install a Null0 route
@@ -1055,17 +1078,43 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
                        continue;
 
                api_nh = &api.nexthops[valid_nh_count];
-               api_nh->vrf_id = bgp->vrf_id;
-
+               api_nh->vrf_id = nh_othervrf ? info->extra->bgp_orig->vrf_id
+                                            : bgp->vrf_id;
                if (nh_family == AF_INET) {
                        struct in_addr *nexthop;
 
-                       if (bgp->table_map[afi][safi].name) {
+                       if (bgp_debug_zebra(&api.prefix)) {
+                               char buf_prefix[PREFIX_STRLEN];
+                               prefix2str(&api.prefix, buf_prefix,
+                                          sizeof(buf_prefix));
+                               if (mpinfo->extra) {
+                                       zlog_debug(
+                                               "%s: p=%s, bgp_is_valid_label: %d",
+                                               __func__, buf_prefix,
+                                               bgp_is_valid_label(
+                                                       &mpinfo->extra
+                                                                ->label[0]));
+                               } else {
+                                       zlog_debug(
+                                               "%s: p=%s, extra is NULL, no label",
+                                               __func__, buf_prefix);
+                               }
+                       }
+
+                       if (bgp->table_map[afi][safi].name || nh_othervrf) {
                                /* Copy info and attributes, so the route-map
                                   apply doesn't modify the BGP route info. */
                                local_attr = *mpinfo->attr;
                                mpinfo_cp->attr = &local_attr;
+                               if (nh_othervrf) {
+                                       /* allow route-map to modify */
+                                       local_attr.nexthop =
+                                               info->extra->nexthop_orig.u
+                                                       .prefix4;
+                               }
+                       }
 
+                       if (bgp->table_map[afi][safi].name) {
                                if (!bgp_table_map_apply(
                                            bgp->table_map[afi][safi].map, p,
                                            mpinfo_cp))
@@ -1080,8 +1129,8 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
                        }
 
                        nexthop = &mpinfo_cp->attr->nexthop;
-
                        api_nh->gate.ipv4 = *nexthop;
+
                        /* EVPN type-2 routes are
                           programmed as onlink on l3-vni SVI
                         */
@@ -1095,6 +1144,21 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
 
                        ifindex = 0;
 
+                       if (bgp->table_map[afi][safi].name || nh_othervrf) {
+                               /* Copy info and attributes, so the route-map
+                                  apply doesn't modify the BGP route info. */
+                               local_attr = *mpinfo->attr;
+                               mpinfo_cp->attr = &local_attr;
+                               if (nh_othervrf) {
+                                       /* allow route-map to modify */
+                                       local_attr.mp_nexthop_global =
+                                               info->extra->nexthop_orig.u
+                                                       .prefix6;
+                                       local_attr.mp_nexthop_len =
+                                               BGP_ATTR_NHLEN_IPV6_GLOBAL;
+                               }
+                       }
+
                        if (bgp->table_map[afi][safi].name) {
                                /* Copy info and attributes, so the route-map
                                   apply doesn't modify the BGP route info. */
@@ -1229,9 +1293,12 @@ void bgp_zebra_announce_table(struct bgp *bgp, afi_t afi, safi_t safi)
 
        for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn))
                for (ri = rn->info; ri; ri = ri->next)
-                       if (CHECK_FLAG(ri->flags, BGP_INFO_SELECTED)
-                           && ri->type == ZEBRA_ROUTE_BGP
-                           && ri->sub_type == BGP_ROUTE_NORMAL)
+                       if (CHECK_FLAG(ri->flags, BGP_INFO_SELECTED) &&
+
+                           (ri->type == ZEBRA_ROUTE_BGP
+                            && (ri->sub_type == BGP_ROUTE_NORMAL
+                                || ri->sub_type == BGP_ROUTE_IMPORTED)))
+
                                bgp_zebra_announce(rn, &rn->p, ri, bgp, afi,
                                                   safi);
 }
@@ -1244,6 +1311,21 @@ void bgp_zebra_withdraw(struct prefix *p, struct bgp_info *info, safi_t safi)
        peer = info->peer;
        assert(peer);
 
+       if (info->type == ZEBRA_ROUTE_BGP
+           && info->sub_type == BGP_ROUTE_IMPORTED) {
+
+               struct bgp_info *bi;
+
+               /*
+                * Look at parent chain for peer sort
+                */
+               for (bi = info; bi->extra && bi->extra->parent;
+                    bi = bi->extra->parent) {
+
+                       peer = ((struct bgp_info *)(bi->extra->parent))->peer;
+               }
+       }
+
        /* Don't try to install if we're not connected to Zebra or Zebra doesn't
         * know of this instance.
         */
@@ -1484,11 +1566,6 @@ int bgp_redistribute_unreg(struct bgp *bgp, afi_t afi, int type,
                vrf_bitmap_unset(zclient->redist[afi][type], bgp->vrf_id);
        }
 
-#if ENABLE_BGP_VNC
-       if (bgp->vrf_id == VRF_DEFAULT && type == ZEBRA_ROUTE_VNC_DIRECT) {
-               vnc_export_bgp_disable(bgp, afi);
-       }
-#endif
 
        if (bgp_install_info_to_zebra(bgp)) {
                /* Send distribute delete message to zebra. */
@@ -1512,6 +1589,17 @@ int bgp_redistribute_unset(struct bgp *bgp, afi_t afi, int type,
 {
        struct bgp_redist *red;
 
+/*
+ * vnc and vpn->vrf checks must be before red check because
+ * they operate within bgpd irrespective of zebra connection
+ * status. red lookup fails if there is no zebra connection.
+ */
+#if ENABLE_BGP_VNC
+       if (bgp->vrf_id == VRF_DEFAULT && type == ZEBRA_ROUTE_VNC_DIRECT) {
+               vnc_export_bgp_disable(bgp, afi);
+       }
+#endif
+
        red = bgp_redist_lookup(bgp, afi, type, instance);
        if (!red)
                return CMD_SUCCESS;
index 60345769351c54b7cb742a7c14975fa3be788aee..c178727b548270be0fa20f84730717c23b5ab489 100644 (file)
@@ -1079,10 +1079,8 @@ static void peer_free(struct peer *peer)
                XFREE(MTYPE_TMP, peer->notify.data);
        memset(&peer->notify, 0, sizeof(struct bgp_notify));
 
-       if (peer->clear_node_queue) {
-               work_queue_free(peer->clear_node_queue);
-               peer->clear_node_queue = NULL;
-       }
+       if (peer->clear_node_queue)
+               work_queue_free_and_null(&peer->clear_node_queue);
 
        bgp_sync_delete(peer);
 
@@ -2943,6 +2941,11 @@ static struct bgp *bgp_create(as_t *as, const char *name,
        }
 #endif /* ENABLE_BGP_VNC */
 
+       for (afi = AFI_IP; afi < AFI_MAX; afi++) {
+               bgp->vpn_policy[afi].tovpn_label = MPLS_LABEL_NONE;
+               bgp->vpn_policy[afi].tovpn_zebra_vrf_label_last_sent =
+                       MPLS_LABEL_NONE;
+       }
        if (name) {
                bgp->name = XSTRDUP(MTYPE_BGP, name);
        } else {
@@ -7129,6 +7132,20 @@ static void bgp_config_write_family(struct vty *vty, struct bgp *bgp, afi_t afi,
        if (safi == SAFI_EVPN)
                bgp_config_write_evpn_info(vty, bgp, afi, safi);
 
+       if (safi == SAFI_UNICAST) {
+               bgp_vpn_policy_config_write_afi(vty, bgp, afi);
+               if (CHECK_FLAG(bgp->af_flags[afi][safi],
+                              BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT)) {
+
+                       vty_out(vty, "  export vpn\n");
+               }
+               if (CHECK_FLAG(bgp->af_flags[afi][safi],
+                              BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT)) {
+
+                       vty_out(vty, "  import vpn\n");
+               }
+       }
+
        vty_endframe(vty, " exit-address-family\n");
 }
 
@@ -7523,16 +7540,14 @@ static void bgp_pthreads_init()
                .id = PTHREAD_IO,
                .start = frr_pthread_attr_default.start,
                .stop = frr_pthread_attr_default.stop,
-               .name = "BGP I/O thread",
        };
        struct frr_pthread_attr ka = {
                .id = PTHREAD_KEEPALIVES,
                .start = bgp_keepalives_start,
                .stop = bgp_keepalives_stop,
-               .name = "BGP Keepalives thread",
        };
-       frr_pthread_new(&io);
-       frr_pthread_new(&ka);
+       frr_pthread_new(&io, "BGP I/O thread");
+       frr_pthread_new(&ka, "BGP Keepalives thread");
 }
 
 void bgp_pthreads_run()
@@ -7639,10 +7654,8 @@ void bgp_terminate(void)
                                bgp_notify_send(peer, BGP_NOTIFY_CEASE,
                                                BGP_NOTIFY_CEASE_PEER_UNCONFIG);
 
-       if (bm->process_main_queue) {
-               work_queue_free(bm->process_main_queue);
-               bm->process_main_queue = NULL;
-       }
+       if (bm->process_main_queue)
+               work_queue_free_and_null(&bm->process_main_queue);
 
        if (bm->t_rmap_update)
                BGP_TIMER_OFF(bm->t_rmap_update);
index e265da803f7bf9096d13c2c7d2673304785a44e5..79fe8c8c3bab69da98f9f17d43917a4f0ab1af98 100644 (file)
@@ -159,6 +159,12 @@ struct bgp_redist {
        struct bgp_rmap rmap;
 };
 
+typedef enum {
+       BGP_VPN_POLICY_DIR_FROMVPN = 0,
+       BGP_VPN_POLICY_DIR_TOVPN = 1,
+       BGP_VPN_POLICY_DIR_MAX = 2
+} vpn_policy_direction_t;
+
 /*
  * Type of 'struct bgp'.
  * - Default: The default instance
@@ -311,6 +317,15 @@ struct bgp {
        /* BGP Per AF flags */
        u_int16_t af_flags[AFI_MAX][SAFI_MAX];
 #define BGP_CONFIG_DAMPENING              (1 << 0)
+#define BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT  (1 << 1)
+#define BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT  (1 << 2)
+
+/* l2vpn evpn flags - 1 << 0 is used for DAMPENNG */
+#define BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST      (1 << 1)
+#define BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST      (1 << 2)
+#define BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV4     (1 << 3)
+#define BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV6     (1 << 4)
+
 
        /* Route table for next-hop lookup cache. */
        struct bgp_table *nexthop_cache_table[AFI_MAX];
@@ -423,12 +438,11 @@ struct bgp {
        /* vrf flags */
        uint32_t vrf_flags;
 #define BGP_VRF_AUTO                        (1 << 0)
-#define BGP_VRF_ADVERTISE_IPV4_IN_EVPN      (1 << 1)
-#define BGP_VRF_ADVERTISE_IPV6_IN_EVPN      (1 << 2)
-#define BGP_VRF_IMPORT_RT_CFGD              (1 << 3)
-#define BGP_VRF_EXPORT_RT_CFGD              (1 << 4)
-#define BGP_VRF_RD_CFGD                     (1 << 5)
-#define BGP_VRF_L3VNI_PREFIX_ROUTES_ONLY    (1 << 6)
+#define BGP_VRF_IMPORT_RT_CFGD              (1 << 1)
+#define BGP_VRF_EXPORT_RT_CFGD              (1 << 2)
+#define BGP_VRF_RD_CFGD                     (1 << 3)
+#define BGP_VRF_L3VNI_PREFIX_ROUTES_ONLY    (1 << 4)
+
 
        /* unique ID for auto derivation of RD for this vrf */
        uint16_t vrf_rd_id;
@@ -448,6 +462,22 @@ struct bgp {
        /* route map for advertise ipv4/ipv6 unicast (type-5 routes) */
        struct bgp_rmap adv_cmd_rmap[AFI_MAX][SAFI_MAX];
 
+       /* vpn-policy */
+       struct {
+               struct ecommunity *rtlist[BGP_VPN_POLICY_DIR_MAX];
+               char *rmap_name[BGP_VPN_POLICY_DIR_MAX];
+               struct route_map *rmap[BGP_VPN_POLICY_DIR_MAX];
+
+               /* should be mpls_label_t? */
+               uint32_t tovpn_label; /* may be MPLS_LABEL_NONE */
+               uint32_t tovpn_zebra_vrf_label_last_sent;
+               struct prefix_rd tovpn_rd;
+               struct prefix tovpn_nexthop; /* unset => set to 0 */
+               uint32_t flags;
+#define BGP_VPN_POLICY_TOVPN_RD_SET            0x00000004
+#define BGP_VPN_POLICY_TOVPN_NEXTHOP_SET       0x00000008
+       } vpn_policy[AFI_MAX];
+
        QOBJ_FIELDS
 };
 DECLARE_QOBJ_TYPE(bgp)
index 4c7c392ab89dcb07537f3ab2e503f03437955394..8c4d5ab04363b44b4ae403d8831a65e1c7846470 100644 (file)
@@ -2182,6 +2182,7 @@ void vnc_routemap_update(struct bgp *bgp, const char *unused)
        vnc_zlog_debug_verbose("%s done", __func__);
 }
 
+#if 0 /* superseded */
 static void vnc_routemap_event(route_map_event_t type, /* ignored */
                               const char *rmap_name)  /* ignored */
 {
@@ -2197,6 +2198,7 @@ static void vnc_routemap_event(route_map_event_t type, /* ignored */
 
        vnc_zlog_debug_verbose("%s: done", __func__);
 }
+#endif
 
 /*-------------------------------------------------------------------------
  *                     nve-group
@@ -3673,7 +3675,8 @@ bgp_rfapi_get_ecommunity_by_lni_label(struct bgp *bgp, uint32_t is_import,
 void bgp_rfapi_cfg_init(void)
 {
        /* main bgpd code does not use this hook, but vnc does */
-       route_map_event_hook(vnc_routemap_event);
+       /* superseded by bgp_route_map_process_update_cb() */
+       /* bgp_route_map_event_hook_add(vnc_routemap_event); */
 
        install_node(&bgp_vnc_defaults_node, NULL);
        install_node(&bgp_vnc_nve_group_node, NULL);
index c7d64bf1edecb24efb780e66cf30785675ecf856..348f1557e2c244a649ee4e4990889b29e8e9b41d 100644 (file)
@@ -4336,7 +4336,7 @@ void bgp_rfapi_destroy(struct bgp *bgp, struct rfapi *h)
                h->import_mac = NULL;
        }
 
-       work_queue_free(h->deferred_close_q);
+       work_queue_free_and_null(&h->deferred_close_q);
 
        if (h->rfp != NULL)
                rfp_stop(h->rfp);
index 2a8a465b70bfdb47c9c5994a5b880c7d025cf525..c71f59563fa830d8a1911921f18d9784f60b57e5 100644 (file)
@@ -571,10 +571,8 @@ void rfapiRibClear(struct rfapi_descriptor *rfd)
                        }
                }
        }
-       if (rfd->updated_responses_queue) {
-               work_queue_free(rfd->updated_responses_queue);
-               rfd->updated_responses_queue = NULL;
-       }
+       if (rfd->updated_responses_queue)
+               work_queue_free_and_null(&rfd->updated_responses_queue);
 }
 
 /*
index c4d66bbc655c7464aa955615672fee29cb7aa4cd..ae31c3fe9e6b7b47455cf6c82c1b758f99262862 100644 (file)
@@ -2049,6 +2049,9 @@ void vnc_direct_bgp_rh_reexport(struct bgp *bgp, afi_t afi)
  */
 void vnc_export_bgp_enable(struct bgp *bgp, afi_t afi)
 {
+       if (!bgp->rfapi_cfg)
+               return;
+
        switch (bgp->rfapi_cfg->flags & BGP_VNC_CONFIG_EXPORT_BGP_MODE_BITS) {
        case BGP_VNC_CONFIG_EXPORT_BGP_MODE_NONE:
                break;
@@ -2069,6 +2072,9 @@ void vnc_export_bgp_enable(struct bgp *bgp, afi_t afi)
 
 void vnc_export_bgp_disable(struct bgp *bgp, afi_t afi)
 {
+       if (!bgp->rfapi_cfg)
+               return;
+
        switch (bgp->rfapi_cfg->flags & BGP_VNC_CONFIG_EXPORT_BGP_MODE_BITS) {
        case BGP_VNC_CONFIG_EXPORT_BGP_MODE_NONE:
                break;
index 0d6c99acfa64b8f2f61b3310a81b4acb765fcf4e..24d6fa086720226095785d3b40b352a2b0eb1c73 100755 (executable)
@@ -396,6 +396,8 @@ AC_ARG_ENABLE(rpki,
   AS_HELP_STRING([--enable-rpki], [enable RPKI prefix validation support]))
 AC_ARG_ENABLE([clippy-only],
   AS_HELP_STRING([--enable-clippy-only], [Only build clippy]))
+AC_ARG_ENABLE([numeric_version],
+  AS_HELP_STRING([--enable-numeric-version], [Only numeric digits allowed in version (for Alpine)]))
 
 AS_IF([test "${enable_clippy_only}" != "yes"], [
 AC_CHECK_HEADERS(json-c/json.h)
@@ -647,6 +649,14 @@ AC_DEFINE_UNQUOTED(MULTIPATH_NUM, $MPATH_NUM, Maximum number of paths for a rout
 
 AC_DEFINE_UNQUOTED(VTYSH_PAGER, "$VTYSH_PAGER", [What pager to use])
 
+dnl ------------------------------------
+dnl Alpine only accepts numeric versions
+dnl ------------------------------------
+if test "x${enable_numeric_version}" != "x" ; then
+  VERSION="`echo ${VERSION} | tr -c -d '[[.0-9]]'`"
+  PACKAGE_VERSION="`echo ${PACKAGE_VERSION} | tr -c -d '[[.0-9]]'`"
+fi
+
 dnl -----------------------------------
 dnl Add extra version string to package
 dnl name, string and version fields.
@@ -1872,27 +1882,10 @@ AC_CONFIG_FILES([Makefile
          redhat/frr.spec
          debianpkg/Makefile
          debianpkg/changelog
+         alpine/APKBUILD
          snapcraft/snapcraft.yaml
          lib/version.h
          tests/lib/cli/test_cli.refout
-         doc/defines.texi
-         doc/bgpd.8
-         doc/isisd.8
-         doc/ospf6d.8
-         doc/ospfclient.8
-         doc/ospfd.8
-         doc/ldpd.8
-         doc/ripd.8
-         doc/eigrpd.8
-         doc/ripngd.8
-         doc/pimd.8
-         doc/mtracebis.8
-         doc/nhrpd.8
-         doc/vtysh.1
-         doc/watchfrr.8
-         doc/zebra.8
-         doc/frr.1
-         doc/frr-args.8
          pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh
          pkgsrc/ripd.sh pkgsrc/ripngd.sh pkgsrc/zebra.sh
          pkgsrc/eigrpd.sh])
index 889e83174416fe3100f43742d91e64da8ac38b37..8ccce93f5530aeefe5310b833c836e7568a42f59 100644 (file)
@@ -71,10 +71,15 @@ adding a new backport.
     Or change some options:
     (see `rules` file for available options)
 
-        export WANT_BGP_VNC=1
-        export WANT_CUMULUS_MODE=1
-        debuild -b -uc -us
-
+        debuild --set-envvar=WANT_BGP_VNC=1 --set-envvar=WANT_CUMULUS_MODE=1 -b -uc -us
+
+    To build with RPKI, download the librtr packages from
+       https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+    install librtr-dev on the build server and build the packages as
+        debuild --set-envvar=WANT_RPKI=1 -b -uc -us
+    RPKI packages have an additonal dependency of librtr0 which can be
+    found at the same URL
+    
 DONE.
 
 If all works correctly, then you should end up with the Debian packages under 
index 2e9e84faa6006270c1d4d03bdb57450eea8d68ff..01ad81d371a86e8024fb4cc4cd351432fe29b1a6 100755 (executable)
@@ -16,8 +16,10 @@ WANT_CUMULUS_MODE ?= 0
 WANT_MULTIPATH ?= 1
 WANT_SNMP ?= 0
 
+# NOTES:
+#
 # If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
-# Please be aware that 0 is NOT disabled, but treated as unlimited
+#    Please be aware that 0 is NOT disabled, but treated as unlimited
 
 MULTIPATH ?= 256
 
@@ -27,6 +29,9 @@ MULTIPATH ?= 256
 WANT_FRR_USER ?= frr
 WANT_FRR_VTY_GROUP ?= frrvty
 
+# Don't build PDF docs by default
+GENERATE_PDF ?= 0
+
 #
 ####################################
 
@@ -135,18 +140,11 @@ override_dh_auto_configure:
        fi
 
 override_dh_auto_build:
-       #dh_auto_build
-       $(MAKE)
-       dh_auto_build -- -C doc draft-zebra-00.txt
-
-
-       # doc/ is a bit crazy
 ifeq ($(GENERATE_PDF), 1)
-       dh_auto_build -- -C doc frr.pdf || true # pdfetex fails with exit code 1 but still produces a good looking .pdf
+       dh_auto_build -- -C doc pdf
 endif
-       rm -vf doc/frr.info
-       dh_auto_build -- -C doc frr.info
-       rm -vf doc/frr.info.html*
+       rm -vf doc/user/_build/texinfo/frr.info
+       dh_auto_build -- -C doc info
 
 override_dh_auto_test:
 
index 8e83bdf6df8a644c455b15517232df87699e24b7..0b0d953acf9334117023e8c65cd620b72b234a1b 100644 (file)
@@ -5,18 +5,6 @@ usr/include/frr/
 usr/lib/
 tools/frr etc/init.d/
 usr/share/doc/frr/
-usr/share/man/man1/vtysh.1
-usr/share/man/man1/frr.1
-usr/share/man/man8
-usr/share/man/man8/bgpd.8
-usr/share/man/man8/ospf6d.8
-usr/share/man/man8/ospfd.8
-usr/share/man/man8/ripd.8
-usr/share/man/man8/ripngd.8
-usr/share/man/man8/zebra.8
-usr/share/man/man8/isisd.8
-usr/share/man/man8/watchfrr.8
-usr/share/man/man8/mtracebis.8
 usr/share/snmp/mibs/
 tools/etc/* etc/
 tools/*.service    lib/systemd/system
index 4f82d772c900810c28eae44226748edbe80cb56a..f7b9428658bcfec5034e8b47f96f2b78e8d134de 100755 (executable)
@@ -15,9 +15,20 @@ WANT_BGP_VNC ?= 1
 WANT_CUMULUS_MODE ?= 0
 WANT_MULTIPATH ?= 1
 WANT_SNMP ?= 0
+WANT_RPKI ?= 0
 
+# NOTES:
+#
+# If you use WANT_RPKI, then there is a new dependency for librtr0 package
+#    and a build dependency of the librtr-dev package.
+#    While the librtr0 is added to the depenencies automatically, the build
+#    dependency can't be changed dynamically and building will fail if the
+#    librtr-dev isn't installed during package build
+#    Tested versions of both packages can be found at
+#    https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+#
 # If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
-# Please be aware that 0 is NOT disabled, but treated as unlimited
+#    Please be aware that 0 is NOT disabled, but treated as unlimited
 
 MULTIPATH ?= 256
 
@@ -27,6 +38,9 @@ MULTIPATH ?= 256
 WANT_FRR_USER ?= frr
 WANT_FRR_VTY_GROUP ?= frrvty
 
+# Don't build PDF docs by default
+GENERATE_PDF ?= 0
+
 #
 ####################################
 
@@ -88,6 +102,12 @@ else
   USE_CUMULUS=--enable-cumulus=no
 endif
 
+ifeq ($(WANT_RPKI), 1)
+  USE_RPKI=--enable-rpki
+else
+  USE_RPKI=--disable-rpki
+endif
+
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
@@ -99,6 +119,13 @@ endif
 %:
        dh $@ --with=autoreconf --parallel --dbg-package=frr-dbg --list-missing
 
+override_dh_gencontrol:
+ifeq ($(WANT_RPKI), 1)
+       dh_gencontrol -- -Vdist:Depends="librtr0 (>= 0.5)"
+else
+       dh_gencontrol
+endif
+
 override_dh_auto_configure:
        # Frr needs /proc to check some BSD vs Linux specific stuff.
        # Else it fails with an obscure error message pointing out that
@@ -131,22 +158,20 @@ override_dh_auto_configure:
                $(USE_PIM) \
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
+               $(USE_RPKI) \
                $(shell dpkg-buildflags --export=configure); \
        fi
 
 override_dh_auto_build:
        #dh_auto_build
        $(MAKE)
-       dh_auto_build -- -C doc draft-zebra-00.txt
-
 
        # doc/ is a bit crazy
 ifeq ($(GENERATE_PDF), 1)
-       dh_auto_build -- -C doc frr.pdf || true # pdfetex fails with exit code 1 but still produces a good looking .pdf
+       dh_auto_build -- -C doc pdf
 endif
-       rm -vf doc/frr.info
-       dh_auto_build -- -C doc frr.info
-       rm -vf doc/frr.info.html*
+       rm -vf doc/_build/texinfo/frr.info
+       dh_auto_build -- -C doc info
 
 override_dh_auto_test:
 
index 297a7cf1061e457b80a02eb6947fe1cb4073a510..bbd4c43b421d9d154661169263165c075560daaf 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Nobody <nobody@frrouting.org>
 Uploaders: Nobody <nobody@frrouting.org>
 XSBC-Original-Maintainer: <maintainers@frrouting.org>
-Build-Depends: debhelper (>= 7.0.50~), libncurses5-dev, libreadline-dev, texlive-latex-base, texlive-generic-recommended, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), imagemagick, ghostscript, groff, autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2 | libjson-c3, dh-systemd, libsystemd-dev, bison, flex, libc-ares-dev, pkg-config, python (>= 2.7), python-ipaddr
+Build-Depends: debhelper (>= 7.0.50~), libncurses5-dev, libreadline-dev, texlive-latex-base, texlive-generic-recommended, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2 | libjson-c3, dh-systemd, libsystemd-dev, bison, flex, libc-ares-dev, pkg-config, python (>= 2.7), python-ipaddr, python-sphinx
 Standards-Version: 3.9.6
 Homepage: http://www.frrouting.org/
 
index a0776fd68a3f2abfa95dce4602dd022318451918..4720a3b92034143e83913a2ee9e525a14051f8df 100644 (file)
@@ -2,7 +2,5 @@ AUTHORS
 NEWS
 README
 REPORTING-BUGS
-doc/BGP-TypeCode
-doc/draft-zebra-00.txt
-doc/mpls/
-bgpd/BGP4-MIB.txt
+doc/user/*.rst
+doc/figures/*.png
index c4f181cdb046ed5fda89808f287ae7e33a5622c5..a83255a24f74b87087b8cc9d82d9474fcb54d471 100644 (file)
@@ -1 +1 @@
-doc/frr.info*
+doc/user/_build/texinfo/frr.info
index e5910fec8f2771e4a3c03b982e5c5080e6ddeed1..8854b2c547e187fc34d7b842d4ec446e11e7ecd9 100644 (file)
@@ -1,2 +1 @@
-usr/share/info
-doc/*.png usr/share/info
+doc/user/_build/texinfo/*.png usr/share/info
index 1aee4d540e8868b7f41cd86f203fae61efc63089..20a58bb0e91619d0290fd307d8d4db3e3b510459 100644 (file)
@@ -5,20 +5,8 @@ usr/include/frr/
 usr/lib/
 tools/frr usr/lib/frr
 usr/share/doc/frr/
-usr/share/man/man1/vtysh.1
-usr/share/man/man1/frr.1
-usr/share/man/man8
-usr/share/man/man8/bgpd.8
-usr/share/man/man8/ospf6d.8
-usr/share/man/man8/ospfd.8
-usr/share/man/man8/ripd.8
-usr/share/man/man8/ripngd.8
-usr/share/man/man8/zebra.8
-usr/share/man/man8/isisd.8
-usr/share/man/man8/watchfrr.8
-usr/share/man/man8/frr-args.8
-usr/share/man/man8/mtracebis.8
 usr/share/snmp/mibs/
 tools/etc/* etc/
-tools/*.service    lib/systemd/system
-debian/frr.conf  usr/lib/tmpfiles.d
+tools/*.service lib/systemd/system
+tools/frr-reload usr/lib/frr/
+debian/frr.conf usr/lib/tmpfiles.d
index 17a128b7e31d3d5c97b413f26421727b77773619..d4bb920b464cecc1ef79951f5c6a96f9851fb003 100644 (file)
@@ -1,9 +1,15 @@
-doc/bgpd.8
-doc/ospf6d.8
-doc/ospfd.8
-doc/ripd.8
-doc/ripngd.8
-doc/vtysh.1
-doc/zebra.8
-doc/isisd.8
-doc/watchfrr.8
+doc/manpages/_build/man/frr.1
+doc/manpages/_build/man/bgpd.8
+doc/manpages/_build/man/pimd.8
+doc/manpages/_build/man/eigrpd.8
+doc/manpages/_build/man/ldpd.8
+doc/manpages/_build/man/nhrpd.8
+doc/manpages/_build/man/ospf6d.8
+doc/manpages/_build/man/ospfd.8
+doc/manpages/_build/man/ripd.8
+doc/manpages/_build/man/ripngd.8
+doc/manpages/_build/man/vtysh.1
+doc/manpages/_build/man/zebra.8
+doc/manpages/_build/man/isisd.8
+doc/manpages/_build/man/watchfrr.8
+doc/manpages/_build/man/mtracebis.8
index 574f448dffe997e434c8f5e097a59bb64a86dc45..0f2f4ebe166e0bd3aceacb40305d7ad34f1b6af2 100755 (executable)
@@ -15,9 +15,20 @@ WANT_BGP_VNC ?= 1
 WANT_CUMULUS_MODE ?= 0
 WANT_MULTIPATH ?= 1
 WANT_SNMP ?= 0
+WANT_RPKI ?= 0
 
+# NOTES:
+#
+# If you use WANT_RPKI, then there is a new dependency for librtr0 package
+#    and a build dependency of the librtr-dev package.
+#    While the librtr0 is added to the depenencies automatically, the build
+#    dependency can't be changed dynamically and building will fail if the
+#    librtr-dev isn't installed during package build
+#    Tested versions of both packages can be found at
+#    https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+#
 # If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
-# Please be aware that 0 is NOT disabled, but treated as unlimited
+#    Please be aware that 0 is NOT disabled, but treated as unlimited
 
 MULTIPATH ?= 256
 
@@ -27,6 +38,9 @@ MULTIPATH ?= 256
 WANT_FRR_USER ?= frr
 WANT_FRR_VTY_GROUP ?= frrvty
 
+# Don't build PDF docs by default
+GENERATE_PDF ?= 0
+
 #
 ####################################
 
@@ -88,6 +102,12 @@ else
   USE_CUMULUS=--enable-cumulus=no
 endif
 
+ifeq ($(WANT_RPKI), 1)
+  USE_RPKI=--enable-rpki
+else
+  USE_RPKI=--disable-rpki
+endif
+
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
@@ -99,6 +119,13 @@ endif
 %:
        dh $@ --with=systemd,autoreconf --parallel --dbg-package=frr-dbg --list-missing
 
+override_dh_gencontrol:
+ifeq ($(WANT_RPKI), 1)
+       dh_gencontrol -- -Vdist:Depends="librtr0 (>= 0.5)"
+else
+       dh_gencontrol
+endif
+
 override_dh_auto_configure:
        # Frr needs /proc to check some BSD vs Linux specific stuff.
        # Else it fails with an obscure error message pointing out that
@@ -132,22 +159,17 @@ override_dh_auto_configure:
                $(USE_PIM) \
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
+               $(USE_RPKI) \
                $(shell dpkg-buildflags --export=configure); \
        fi
 
 override_dh_auto_build:
-       #dh_auto_build
-       $(MAKE)
-       dh_auto_build -- -C doc draft-zebra-00.txt
-
-
        # doc/ is a bit crazy
 ifeq ($(GENERATE_PDF), 1)
-       dh_auto_build -- -C doc frr.pdf || true # pdfetex fails with exit code 1 but still produces a good looking .pdf
+       dh_auto_build -- -C doc pdf
 endif
-       rm -vf doc/frr.info
-       dh_auto_build -- -C doc frr.info
-       rm -vf doc/frr.info.html*
+       rm -vf doc/user/_build/texinfo/frr.info
+       dh_auto_build -- -C doc info
 
 override_dh_auto_test:
 
index 57c66cb4ac1b6b59ef3afd608e4bbe8d697cb49b..e539d9a97b1a1dd4732a9945e095ab1128144da2 100644 (file)
@@ -2,13 +2,6 @@ Makefile
 Makefile.in
 mdate-sh
 draft-zebra-00.txt
-frr.info-*
-zebra.html
-defines.texi
-version.texi
-texinfo.tex
-frr.html
-frr.info
 *.pdf
 *.eps
 frr.ps
@@ -28,8 +21,6 @@ stamp-vti
 *.toc
 *.tp
 *.vr
-*.8
-*.1
 .arch-inventory
 .arch-ids
 *~
diff --git a/doc/BGP-TypeCode b/doc/BGP-TypeCode
deleted file mode 100644 (file)
index b321807..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-                BGP-4[+] UPDATE Attribute TypeCode list
-
-  Value  Attribute            References
-=========================================================================
-    1    ORIGIN               [RFC 4271]
-    2    AS_PATH              [RFC 4271]
-    3    NEXT_HOP             [RFC 4271]
-    4    MULTI_EXIT_DISC      [RFC 4271]
-    5    LOCAL_PREF           [RFC 4271]
-    6    ATOMIC_AGGREGATE     [RFC 4271]
-    7    AGGREGATOR           [RFC 4271]
-    8    COMMUNITIES          [RFC 1997]
-    9    ORIGINATOR_ID        [RFC 4456]
-   10    CLUSTER_LIST         [RFC 4456]
-   11    DPA                  [draft-ietf-idr-bgp-dpa-05.txt(expired)]
-   12    ADVERTISER           [RFC 1863]
-   13    RCID_PATH            [RFC 1863]
-   14    MP_REACH_NLRI        [RFC 4760]
-   15    MP_UNREACH_NLRI      [RFC 4760]
-   16    EXT_COMMUNITIES      [RFC 4360]
-   17    AS4_PATH             [RFC 4893]
-   18    AS4_AGGREGATOR       [RFC 4893]
-=========================================================================
diff --git a/doc/Building_FRR_for_LEDE-OpenWRT.md b/doc/Building_FRR_for_LEDE-OpenWRT.md
deleted file mode 100644 (file)
index cde68db..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-Building FRR for OpenWRT/LEDE from Git Source
-===============================================
-
-- for the moment because of cross compile problems, master is not supported,
-  only upto 3.0
-- LDP can't be built because of missing Perl-XML-LibXML in OpenWRT/LEDE tree
-
-Prepare build environment
--------------------------
-
-https://lede-project.org/docs/guide-developer/install-buildsystem
-
-for
-
-Ubuntu 12.04LTS:
-
-    sudo apt-get install build-essential subversion git-core \
-       libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc \
-       libxml-parser-perl mercurial bzr ecj cvs unzip
-
-Ubuntu 64bit:
-
-    sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev \
-       gawk gcc-multilib flex git-core gettext libssl-dev
-
-Debian 8 Jessie:
-
-    sudo apt-get install build-essential libncurses5-dev gawk git subversion \
-       libssl-dev gettext unzip zlib1g-dev file python
-
-Debian 9 Stretch:
-
-    sudo apt-get install build-essential libncurses5-dev gawk git subversion \
-       libssl-dev gettext zlib1g-dev
-
-Centos x86-64 (some packages require EPEL):
-
-    yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex \
-       ncurses-devel zlib-devel zlib-static make patch unzip glibc glibc-devel \
-       perl-ExtUtils-MakeMaker glibc-static quilt ncurses-libs sed sdcc bison \
-       intltool sharutils wget git-core openssl-devel xz
-
-Fedora 24 - 64Bit:
-
-    dnf install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext git-core \
-       unzip ncurses-devel ncurses-compat-libs zlib-devel zlib-static make \
-       flex patch perl-ExtUtils-MakeMaker perl-Thread-Queue glibc glibc-devel \
-       glibc-static quilt sed sdcc intltool sharutils bison wget openssl-devel
-
-
-Get LEDE Sources (from Git)
----------------------------
-
-LEDE and OpenWRT is planned to remerge and won't cover the similar OpenWRT build
-As normal user:
-    git clone https://git.lede-project.org/source.git lede
-    cd lede
-    ./scripts/feeds update -a
-    ./scripts/feeds install -a
-    cd feeds/routing
-    git pull origin pull/319/head
-    ln -s ../../../feeds/routing/frr/ ../../package/feeds/routing/
-    cd ../..
-    make menuconfig
-
-Select the needed target then select needed packages in
-Network -> Routing and Redirection -> frr, exit and save
-
-    make or make package/frr/compile
-
-It may be possible that on first build `make package/frr/compile` not to work
-and it may be needed to run a `make` for the entire build envronment, add V=s
-for debugging
-
-Work with sources
------------------
-
-To update the rc1 version or add other options, the Makefile is found in
-feeds/routing/frr
-
-edit:
-    PKG_VERSION:=
-    PKG_SOURCE_VERSION:=<git-hash>
-
-Usage
------
-
-Edit `/usr/sbin/frr.init` and add/remove the daemons name in section DAEMONS=
-or don't install unneded packages
-For example: zebra bgpd ldpd isisd nhrpd ospfd ospf6d pimd ripd ripngd
-
-### Enable the serivce
- - service frr enable
-
-### Start the service
- -  service frr start
diff --git a/doc/Building_FRR_on_CentOS6.md b/doc/Building_FRR_on_CentOS6.md
deleted file mode 100644 (file)
index 10830e5..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-Building FRR on CentOS 6 from Git Source
-========================================
-
-(As an alternative to this installation, you may prefer to create a FRR
-rpm package yourself and install that package instead. See instructions 
-in redhat/README.rpm_build.md on how to build a rpm package)
-
-Instructions are tested with `CentOS 6.8` on `x86_64` platform
-
-CentOS 6 restrictions:
-----------------------
-
-- PIMd is not supported on `CentOS 6`. Upgrade to `CentOS 7` if PIMd is 
-  needed
-- MPLS is not supported on `CentOS 6`. MPLS requires Linux Kernel 4.5 or 
-  higher (LDP can be built, but may have limited use without MPLS)
-- Zebra is unable to detect what bridge/vrf an interface is associcated
-  with (IFLA_INFO_SLAVE_KIND does not exist in the kernel headers, you
-  can use a newer kernel + headers to get this functionality)
-- frr_reload.py will not work, as this requires Python 2.7, and CentOS 6
-  only has 2.6.  You can install Python 2.7 via IUS, but it won't work
-  properly unless you compile and install the ipaddr package for it.
-
-Install required packages
--------------------------
-
-Add packages:
-
-    sudo yum install git autoconf automake libtool make gawk \
-      readline-devel texinfo net-snmp-devel groff pkgconfig \
-      json-c-devel pam-devel flex epel-release perl-XML-LibXML \
-      c-ares-devel
-
-Install newer version of bison (CentOS 6 package source is too old) from 
-CentOS 7
-
-    sudo yum install rpm-build
-    curl -O http://vault.centos.org/7.0.1406/os/Source/SPackages/bison-2.7-4.el7.src.rpm
-    rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm
-    sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm
-    rm -rf rpmbuild
-
-Install newer version of autoconf and automake (Package versions are too old)
-
-    curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
-    tar xvf autoconf-2.69.tar.gz
-    cd autoconf-2.69
-    ./configure --prefix=/usr
-    make
-    sudo make install
-    cd ..
-    
-    curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
-    tar xvf automake-1.15.tar.gz
-    cd automake-1.15
-    ./configure --prefix=/usr
-    make
-    sudo make install
-    cd ..
-
-Install `Python 2.7` in parallel to default 2.6. 
-Make sure you've install EPEL (`epel-release` as above). Then install current 
-`python27`, `python27-devel` and `pytest`
-
-    sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
-    sudo rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
-    sudo yum install python27 python27-pip python27-devel
-    sudo pip2.7 install pytest
-
-Please note that `CentOS 6` needs to keep python pointing to version 2.6 
-for `yum` to keep working, so don't create a symlink for python2.7 to python
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using 
-any packages**
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -r -g 85 frrvt
-    sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
-      -c "FRR FRRouting suite" -d /var/run/frr frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just 
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    ./configure \
-        --bindir=/usr/bin \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --libdir=/usr/lib/frr \
-        --libexecdir=/usr/lib/frr \
-        --localstatedir=/var/run/frr \
-        --with-moduledir=/usr/lib/frr/modules \
-        --disable-pimd \
-        --enable-snmp=agentx \
-        --enable-multipath=64 \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvt \
-        --enable-rtadv \
-        --disable-exampledir \
-        --enable-watchfrr \
-        --disable-ldpd \
-        --enable-fpm \
-        --enable-nhrpd \
-        --enable-eigrpd \
-        --enable-babeld \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion
-    make
-    make check PYTHON=/usr/bin/python2.7
-    sudo make install
-
-### Create empty FRR configuration files
-    sudo mkdir /var/log/frr
-    sudo mkdir /etc/frr
-    sudo touch /etc/frr/zebra.conf
-    sudo touch /etc/frr/bgpd.conf
-    sudo touch /etc/frr/ospfd.conf
-    sudo touch /etc/frr/ospf6d.conf
-    sudo touch /etc/frr/isisd.conf
-    sudo touch /etc/frr/ripd.conf
-    sudo touch /etc/frr/ripngd.conf
-    sudo touch /etc/frr/nhrpd.conf
-    sudo touch /etc/frr/eigrpd.conf
-    sudo touch /etc/frr/babeld.conf
-    sudo chown -R frr:frr /etc/frr/
-    sudo touch /etc/frr/vtysh.conf
-    sudo chown frr:frrvt /etc/frr/vtysh.conf
-    sudo chmod 640 /etc/frr/*.conf
-
-### Install daemon config file
-    sudo install -p -m 644 redhat/daemons /etc/frr/
-    sudo chown frr:frr /etc/frr/daemons
-
-### Edit /etc/frr/daemons as needed to select the required daemons
-
-Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
-Enable the daemons as required by changing the value to `yes` 
-
-### Enable IP & IPv6 forwarding
-
-Edit `/etc/sysctl.conf` and set the following values (ignore the other 
-settings)
-
-    # Controls IP packet forwarding
-    net.ipv4.ip_forward = 1
-    net.ipv6.conf.all.forwarding=1
-
-    # Controls source route verification
-    net.ipv4.conf.default.rp_filter = 0
-
-Load the modifed sysctl's on the system:
-
-    sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
-
-### Add init.d startup files
-    sudo install -p -m 755 redhat/frr.init /etc/init.d/frr
-    sudo chkconfig --add frr
-
-### Enable frr daemon at startup
-    sudo chkconfig frr on
-
-### Start FRR manually (or reboot)
-    sudo /etc/init.d/frr start
diff --git a/doc/Building_FRR_on_CentOS7.md b/doc/Building_FRR_on_CentOS7.md
deleted file mode 100644 (file)
index 3880248..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-Building FRR on CentOS 7 from Git Source
-========================================
-
-(As an alternative to this installation, you may prefer to create a FRR
-rpm package yourself and install that package instead. See instructions
-in redhat/README.rpm_build.md on how to build a rpm package)
-
-CentOS 7 restrictions:
-----------------------
-
-- MPLS is not supported on `CentOS 7` with default kernel. MPLS requires 
-  Linux Kernel 4.5 or higher (LDP can be built, but may have limited use 
-  without MPLS)
-  
-Install required packages
--------------------------
-
-Add packages:
-
-    sudo yum install git autoconf automake libtool make gawk \
-      readline-devel texinfo net-snmp-devel groff pkgconfig \
-      json-c-devel pam-devel bison flex pytest c-ares-devel \
-      perl-XML-LibXML python-devel systemd-devel
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using 
-any packages**
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -r -g 85 frrvt
-    sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
-      -c "FRR FRRouting suite" -d /var/run/frr frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just 
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    ./configure \
-        --bindir=/usr/bin \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --libdir=/usr/lib/frr \
-        --libexecdir=/usr/lib/frr \
-        --localstatedir=/var/run/frr \
-        --with-moduledir=/usr/lib/frr/modules \
-        --enable-pimd \
-        --enable-snmp=agentx \
-        --enable-multipath=64 \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvt \
-        --enable-rtadv \
-       --enable-systemd=yes \
-        --disable-exampledir \
-        --enable-watchfrr \
-        --disable-ldpd \
-        --enable-fpm \
-        --enable-nhrpd \
-        --enable-eigrpd \
-        --enable-babeld \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion
-    make
-    make check
-    sudo make install
-
-### Create empty FRR configuration files
-    sudo mkdir /var/log/frr
-    sudo mkdir /etc/frr
-    sudo touch /etc/frr/zebra.conf
-    sudo touch /etc/frr/bgpd.conf
-    sudo touch /etc/frr/ospfd.conf
-    sudo touch /etc/frr/ospf6d.conf
-    sudo touch /etc/frr/isisd.conf
-    sudo touch /etc/frr/ripd.conf
-    sudo touch /etc/frr/ripngd.conf
-    sudo touch /etc/frr/pimd.conf
-    sudo touch /etc/frr/nhrpd.conf
-    sudo touch /etc/frr/eigrpd.conf
-    sudo touch /etc/frr/babeld.conf
-    sudo chown -R frr:frr /etc/frr/
-    sudo touch /etc/frr/vtysh.conf
-    sudo chown frr:frrvt /etc/frr/vtysh.conf
-    sudo chmod 640 /etc/frr/*.conf
-
-### Install daemon config file
-    sudo install -p -m 644 redhat/daemons /etc/frr/
-    sudo chown frr:frr /etc/frr/daemons
-
-### Edit /etc/frr/daemons as needed to select the required daemons
-
-Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
-Enable the daemons as required by changing the value to `yes` 
-
-### Enable IP & IPv6 forwarding
-
-Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the 
-following content:
-
-    # Sysctl for routing
-    #
-    # Routing: We need to forward packets
-    net.ipv4.conf.all.forwarding=1
-    net.ipv6.conf.all.forwarding=1
-
-Load the modifed sysctl's on the system:
-
-    sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
-
-### Install frr Service and redhat init files 
-    sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
-    sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
-
-### Register the systemd files
-    sudo systemctl preset frr.service
-### Enable required frr at startup
-    sudo systemctl enable frr
-
-### Reboot or start FRR manually
-    sudo systemctl start frr
diff --git a/doc/Building_FRR_on_Debian8.md b/doc/Building_FRR_on_Debian8.md
deleted file mode 100644 (file)
index a2dbbdb..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-Building FRR on Debian 8 from Git Source
-========================================
-
-Debian 8 restrictions:
-----------------------
-
-- MPLS is not supported on `Debian 8` with default kernel. MPLS requires
-  Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
-  without MPLS)
-
-Install required packages
--------------------------
-
-Add packages:
-
-    sudo apt-get install git autoconf automake libtool make gawk \
-       libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
-       python-pip libc-ares-dev python3-dev
-
-Install newer pytest (>3.0) from pip    
-
-    sudo pip install pytest    
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using
-any packages**
-
-### Add frr groups and user
-
-    sudo addgroup --system --gid 92 frr
-    sudo addgroup --system --gid 85 frrvty
-    sudo adduser --system --ingroup frr --home /var/run/frr/ \
-       --gecos "FRR suite" --shell /bin/false frr
-    sudo usermod -a -G frrvty frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    ./configure \
-        --enable-exampledir=/usr/share/doc/frr/examples/ \
-        --localstatedir=/var/run/frr \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --enable-vtysh \
-        --enable-isisd \
-        --enable-pimd \
-        --enable-watchfrr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --enable-ldpd \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    make
-    make check
-    sudo make install
-
-### Create empty FRR configuration files
-
-    sudo install -m 755 -o frr -g frr -d /var/log/frr
-    sudo install -m 775 -o frr -g frrvty -d /etc/frr
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
-    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
-
-### Enable IP & IPv6 forwarding
-
-Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
-other settings)
-
-    # Uncomment the next line to enable packet forwarding for IPv4
-    net.ipv4.ip_forward=1
-
-    # Uncomment the next line to enable packet forwarding for IPv6
-    #  Enabling this option disables Stateless Address Autoconfiguration
-    #  based on Router Advertisements for this host
-    net.ipv6.conf.all.forwarding=1
-
-**Reboot** or use `sysctl -p` to apply the same config to the running system
-
-### Troubleshooting
-
-**Local state directory**
-
-The local state directory must exist and have the correct permissions applied
-for the frrouting daemons to start.  In the above ./configure example the
-local state directory is set to /var/run/frr (--localstatedir=/var/run/frr)
-Debian considers /var/run/frr to be temporary and this is removed after a
-reboot.
-
-When using a different local state directory you need to create the new
-directory and change the ownership to the frr user, for example:
-
-    mkdir /var/opt/frr
-    chown frr /var/opt/frr
-
-**Shared library error**
-
-If you try and start any of the frrouting daemons you may see the below error
-due to the frrouting shared library directory not being found:
-
-    ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
-
-The fix is to add the following line to /etc/ld.so.conf which will continue to
-reference the library directory after the system reboots.  To load the library
-directory path immediately run the ldconfig command after adding the line to
-the file eg:
-
-    echo include /usr/local/lib >> /etc/ld.so.conf
-    ldconfig
diff --git a/doc/Building_FRR_on_Debian9.md b/doc/Building_FRR_on_Debian9.md
deleted file mode 100644 (file)
index e2d424a..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-Building FRR on Debian 9 from Git Source
-========================================
-
-Install required packages
--------------------------
-
-Add packages:
-
-    sudo apt-get install git autoconf automake libtool make \
-      libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
-      python-pip libc-ares-dev python3-dev python-pytest
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using
-any packages**
-
-### Add frr groups and user
-
-    sudo addgroup --system --gid 92 frr
-    sudo addgroup --system --gid 85 frrvty
-    sudo adduser --system --ingroup frr --home /var/opt/frr/ \
-       --gecos "FRR suite" --shell /bin/false frr
-    sudo usermod -a -G frrvty frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    git checkout stable/3.0
-    ./bootstrap.sh
-    ./configure \
-        --enable-exampledir=/usr/share/doc/frr/examples/ \
-        --localstatedir=/var/opt/frr \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --enable-vtysh \
-        --enable-isisd \
-        --enable-pimd \
-        --enable-watchfrr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --enable-ldpd \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    make
-    make check
-    sudo make install
-
-### Create empty FRR configuration files
-
-    sudo install -m 755 -o frr -g frr -d /var/log/frr
-    sudo install -m 755 -o frr -g frr -d /var/opt/frr
-    sudo install -m 775 -o frr -g frrvty -d /etc/frr
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
-    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
-
-### Enable IP & IPv6 forwarding
-
-Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
-other settings)
-
-    # Uncomment the next line to enable packet forwarding for IPv4
-    net.ipv4.ip_forward=1
-
-    # Uncomment the next line to enable packet forwarding for IPv6
-    #  Enabling this option disables Stateless Address Autoconfiguration
-    #  based on Router Advertisements for this host
-    net.ipv6.conf.all.forwarding=1
-
-**Reboot** or use `sysctl -p` to apply the same config to the running system
-
-### Troubleshooting
-
-**Shared library error**
-
-If you try and start any of the frrouting daemons you may see the below error
-due to the frrouting shared library directory not being found:
-
-    ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
-
-The fix is to add the following line to /etc/ld.so.conf which will continue to
-reference the library directory after the system reboots.  To load the library
-directory path immediately run the ldconfig command after adding the line to
-the file eg:
-
-    echo include /usr/local/lib >> /etc/ld.so.conf
-    ldconfig
diff --git a/doc/Building_FRR_on_Fedora24.md b/doc/Building_FRR_on_Fedora24.md
deleted file mode 100644 (file)
index 0070fd1..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-Building FRR on Fedora 24 from Git Source
-=========================================
-
-(As an alternative to this installation, you may prefer to create a FRR
-rpm package yourself and install that package instead. See instructions
-in redhat/README.rpm_build.md on how to build a rpm package)
-
-Install required packages
--------------------------
-
-Add packages:
-
-    sudo dnf install git autoconf automake libtool make gawk \
-      readline-devel texinfo net-snmp-devel groff pkgconfig \
-      json-c-devel pam-devel perl-XML-LibXML pytest bison flex \
-      c-ares-devel python3-devel
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not 
-using any packages**
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -r -g 85 frrvt
-    sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
-      -c "FRR FRRouting suite" -d /var/run/frr frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just 
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    ./configure \
-        --bindir=/usr/bin \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --libdir=/usr/lib/frr \
-        --libexecdir=/usr/lib/frr \
-        --localstatedir=/var/run/frr \
-        --with-moduledir=/usr/lib/frr/modules \
-        --enable-pimd \
-        --enable-snmp=agentx \
-        --enable-multipath=64 \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvt \
-        --enable-rtadv \
-        --disable-exampledir \
-        --enable-watchfrr \
-        --enable-ldpd \
-        --enable-fpm \
-        --enable-nhrpd \
-        --enable-eigrpd \
-        --enable-babeld \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion    
-    make
-    make check
-    sudo make install
-
-### Create empty FRR configuration files
-    sudo mkdir /var/log/frr
-    sudo mkdir /etc/frr
-    sudo touch /etc/frr/zebra.conf
-    sudo touch /etc/frr/bgpd.conf
-    sudo touch /etc/frr/ospfd.conf
-    sudo touch /etc/frr/ospf6d.conf
-    sudo touch /etc/frr/isisd.conf
-    sudo touch /etc/frr/ripd.conf
-    sudo touch /etc/frr/ripngd.conf
-    sudo touch /etc/frr/pimd.conf
-    sudo touch /etc/frr/ldpd.conf
-    sudo touch /etc/frr/nhrpd.conf
-    sudo touch /etc/frr/eigrpd.conf
-    sudo touch /etc/frr/babeld.conf
-    sudo chown -R frr:frr /etc/frr/
-    sudo touch /etc/frr/vtysh.conf
-    sudo chown frr:frrvt /etc/frr/vtysh.conf
-    sudo chmod 640 /etc/frr/*.conf
-
-### Install daemon config file
-    sudo install -p -m 644 redhat/daemons /etc/frr/
-    sudo chown frr:frr /etc/frr/daemons
-
-### Edit /etc/frr/daemons as needed to select the required daemons
-
-Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
-Enable the daemons as required by changing the value to `yes` 
-
-### Enable IP & IPv6 forwarding (and MPLS)
-
-Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the 
-following content:
-(Please make sure to list all interfaces with required MPLS similar 
-to `net.mpls.conf.eth0.input=1`)
-
-    # Sysctl for routing
-    #
-    # Routing: We need to forward packets
-    net.ipv4.conf.all.forwarding=1
-    net.ipv6.conf.all.forwarding=1
-    #
-    # Enable MPLS Label processing on all interfaces
-    net.mpls.conf.eth0.input=1
-    net.mpls.conf.eth1.input=1
-    net.mpls.conf.eth2.input=1
-    net.mpls.platform_labels=100000
-
-Load the modifed sysctl's on the system:
-
-    sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
-
-Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
-
-    # Load MPLS Kernel Modules
-    mpls-router
-    mpls-iptunnel
-
-And load the kernel modules on the running system:
-
-    sudo modprobe mpls-router mpls-iptunnel
-
-### Install frr Service and redhat init files 
-    sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
-    sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
-### Enable required frr at startup
-    sudo systemctl enable frr
-
-### Reboot or start FRR manually
-    sudo systemctl start frr
diff --git a/doc/Building_FRR_on_FreeBSD10.md b/doc/Building_FRR_on_FreeBSD10.md
deleted file mode 100644 (file)
index ccae83a..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-Building FRR on FreeBSD 10 from Git Source
-==========================================
-
-FreeBSD 10 restrictions:
-------------------------
-
-- MPLS is not supported on `FreeBSD`. MPLS requires a Linux Kernel
-  (4.5 or higher). LDP can be built, but may have limited use 
-  without MPLS
-
-Install required packages
--------------------------
-
-Add packages:
-(Allow the install of the package managment tool if this is first package 
-install and asked)  
-
-    pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
-        bison flex py27-pytest c-ares python3
-
-Make sure there is no /usr/bin/flex preinstalled (and use the newly 
-installed in /usr/local/bin):
-(FreeBSD frequently provides a older flex as part of the base OS which 
-takes preference in path)
-
-    rm -f /usr/bin/flex
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not 
-using any packages**
-
-### Add frr group and user
-
-    pw groupadd frr -g 101
-    pw groupadd frrvty -g 102
-    pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
-        -d /usr/local/etc/frr -s /usr/sbin/nologin
-
-(You may prefer different options on configure statement. These are just 
-an example)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    export MAKE=gmake
-    export LDFLAGS="-L/usr/local/lib"
-    export CPPFLAGS="-I/usr/local/include"
-    ./configure \
-        --sysconfdir=/usr/local/etc/frr \
-        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
-        --localstatedir=/var/run/frr \
-        --prefix=/usr/local \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    gmake
-    gmake check
-    sudo gmake install
-
-### Create empty FRR configuration files
-    sudo mkdir /usr/local/etc/frr
-    sudo touch /usr/local/etc/frr/zebra.conf
-    sudo touch /usr/local/etc/frr/bgpd.conf
-    sudo touch /usr/local/etc/frr/ospfd.conf
-    sudo touch /usr/local/etc/frr/ospf6d.conf
-    sudo touch /usr/local/etc/frr/isisd.conf
-    sudo touch /usr/local/etc/frr/ripd.conf
-    sudo touch /usr/local/etc/frr/ripngd.conf
-    sudo touch /usr/local/etc/frr/pimd.conf
-    sudo chown -R frr:frr /usr/local/etc/frr
-    sudo touch /usr/local/etc/frr/vtysh.conf
-    sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
-    sudo chmod 640 /usr/local/etc/frr/*.conf
-
-### Enable IP & IPv6 forwarding
-
-Add the following lines to the end of `/etc/sysctl.conf`:
-
-    # Routing: We need to forward packets
-    net.inet.ip.forwarding=1
-    net.inet6.ip6.forwarding=1
-
-**Reboot** or use `sysctl` to apply the same config to the running system
diff --git a/doc/Building_FRR_on_FreeBSD11.md b/doc/Building_FRR_on_FreeBSD11.md
deleted file mode 100644 (file)
index 71ccd14..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-Building FRR on FreeBSD 11 from Git Source
-==========================================
-
-FreeBSD 11 restrictions:
-------------------------
-
-- MPLS is not supported on `FreeBSD`. MPLS requires a Linux Kernel
-  (4.5 or higher). LDP can be built, but may have limited use 
-  without MPLS
-
-Install required packages
--------------------------
-
-Add packages:
-(Allow the install of the package managment tool if this is first package
-install and asked)  
-
-    pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
-        bison flex py27-pytest c-ares python3
-
-Make sure there is no /usr/bin/flex preinstalled (and use the newly 
-installed in /usr/local/bin):
-(FreeBSD frequently provides a older flex as part of the base OS which
-takes preference in path)
-
-    rm -f /usr/bin/flex
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not 
-using any packages**
-
-### Add frr group and user
-
-    pw groupadd frr -g 101
-    pw groupadd frrvty -g 102
-    pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
-        -d /usr/local/etc/frr -s /usr/sbin/nologin
-
-(You may prefer different options on configure statement. These are just
-an example)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    export MAKE=gmake
-    export LDFLAGS="-L/usr/local/lib"
-    export CPPFLAGS="-I/usr/local/include"
-    ./configure \
-        --sysconfdir=/usr/local/etc/frr \
-        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
-        --localstatedir=/var/run/frr \
-        --prefix=/usr/local \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    gmake
-    gmake check
-    sudo gmake install
-
-### Create empty FRR configuration files
-    sudo mkdir /usr/local/etc/frr
-    sudo touch /usr/local/etc/frr/zebra.conf
-    sudo touch /usr/local/etc/frr/bgpd.conf
-    sudo touch /usr/local/etc/frr/ospfd.conf
-    sudo touch /usr/local/etc/frr/ospf6d.conf
-    sudo touch /usr/local/etc/frr/isisd.conf
-    sudo touch /usr/local/etc/frr/ripd.conf
-    sudo touch /usr/local/etc/frr/ripngd.conf
-    sudo touch /usr/local/etc/frr/pimd.conf
-    sudo chown -R frr:frr /usr/local/etc/frr
-    sudo touch /usr/local/etc/frr/vtysh.conf
-    sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
-    sudo chmod 640 /usr/local/etc/frr/*.conf
-
-### Enable IP & IPv6 forwarding
-
-Add the following lines to the end of `/etc/sysctl.conf`:
-
-    # Routing: We need to forward packets
-    net.inet.ip.forwarding=1
-    net.inet6.ip6.forwarding=1
-
-**Reboot** or use `sysctl` to apply the same config to the running system
diff --git a/doc/Building_FRR_on_FreeBSD9.md b/doc/Building_FRR_on_FreeBSD9.md
deleted file mode 100644 (file)
index 8a09d8a..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-Building FRR on FreeBSD 9 from Git Source
-=========================================
-
-FreeBSD 9 restrictions:
------------------------
-
-- MPLS is not supported on `FreeBSD`. MPLS requires a Linux Kernel
-  (4.5 or higher). LDP can be built, but may have limited use 
-  without MPLS
-  
-Install required packages
--------------------------
-
-Add packages:
-(Allow the install of the package managment tool if this is first package 
-install and asked)  
-
-    pkg install -y git autoconf automake libtool gmake gawk \
-        pkgconf texinfo json-c bison flex py27-pytest c-ares \
-        python3
-
-Make sure there is no /usr/bin/flex preinstalled (and use the newly
-installed in /usr/local/bin):
-(FreeBSD frequently provides a older flex as part of the base OS which
-takes preference in path)
-
-    rm -f /usr/bin/flex
-
-For building with clang (instead of gcc), upgrade clang from 3.4 default to 3.6 *This is needed to build FreeBSD packages as well - for packages clang is default* (Clang 3.4 as shipped with FreeBSD 9 crashes during compile)
-
-    pkg install clang36
-    pkg delete clang34
-    mv /usr/bin/clang /usr/bin/clang34
-    ln -s /usr/local/bin/clang36 /usr/bin/clang
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not
-using any packages**
-
-### Add frr group and user
-
-    pw groupadd frr -g 101
-    pw groupadd frrvty -g 102
-    pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
-        -d /usr/local/etc/frr -s /usr/sbin/nologin
-
-(You may prefer different options on configure statement. These are just
-an example)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    export MAKE=gmake
-    export LDFLAGS="-L/usr/local/lib"
-    export CPPFLAGS="-I/usr/local/include"
-    ./configure \
-        --sysconfdir=/usr/local/etc/frr \
-        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
-        --localstatedir=/var/run/frr \
-        --prefix=/usr/local \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    gmake
-    gmake check
-    sudo gmake install
-
-### Create empty FRR configuration files
-    sudo mkdir /usr/local/etc/frr
-    sudo touch /usr/local/etc/frr/zebra.conf
-    sudo touch /usr/local/etc/frr/bgpd.conf
-    sudo touch /usr/local/etc/frr/ospfd.conf
-    sudo touch /usr/local/etc/frr/ospf6d.conf
-    sudo touch /usr/local/etc/frr/isisd.conf
-    sudo touch /usr/local/etc/frr/ripd.conf
-    sudo touch /usr/local/etc/frr/ripngd.conf
-    sudo touch /usr/local/etc/frr/pimd.conf
-    sudo chown -R frr:frr /usr/local/etc/frr
-    sudo touch /usr/local/etc/frr/vtysh.conf
-    sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
-    sudo chmod 640 /usr/local/etc/frr/*.conf
-
-### Enable IP & IPv6 forwarding
-
-Add the following lines to the end of `/etc/sysctl.conf`:
-
-    # Routing: We need to forward packets
-    net.inet.ip.forwarding=1
-    net.inet6.ip6.forwarding=1
-
-**Reboot** or use `sysctl` to apply the same config to the running system
diff --git a/doc/Building_FRR_on_NetBSD6.md b/doc/Building_FRR_on_NetBSD6.md
deleted file mode 100644 (file)
index 4fe7109..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-Building FRR on NetBSD 6 from Git Source
-========================================
-
-NetBSD 6 restrictions:
-----------------------
-
-- MPLS is not supported on `NetBSD`. MPLS requires a Linux Kernel
-  (4.5 or higher). LDP can be built, but may have limited use 
-  without MPLS
-
-Install required packages
--------------------------
-Configure Package location:
-
-    PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
-    export PKG_PATH
-
-Add packages:
-
-    sudo pkg_add git autoconf automake libtool gmake gawk openssl \
-       pkg-config json-c python27 py27-test python35
-
-Install SSL Root Certificates (for git https access):
-
-    sudo pkg_add mozilla-rootcerts
-    sudo touch /etc/openssl/openssl.cnf
-    sudo mozilla-rootcerts install
-
-Select default Python and py.test
-
-    sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
-    sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
-
-Get FRR, compile it and install it (from Git)
-------------------------------------------------
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -g 93 frrvty
-    sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
-        -d /nonexistent -s /sbin/nologin frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just 
-an example)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    MAKE=gmake
-    export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
-    export CPPFLAGS="-I/usr/pkg/include"
-    ./configure \
-        --sysconfdir=/usr/pkg/etc/frr \
-        --enable-exampledir=/usr/pkg/share/examples/frr \
-        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
-        --localstatedir=/var/run/frr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    gmake
-    gmake check
-    sudo gmake install
-
-### Create empty FRR configuration files
-    sudo mkdir /var/log/frr
-    sudo mkdir /usr/pkg/etc/frr
-    sudo touch /usr/pkg/etc/frr/zebra.conf
-    sudo touch /usr/pkg/etc/frr/bgpd.conf
-    sudo touch /usr/pkg/etc/frr/ospfd.conf
-    sudo touch /usr/pkg/etc/frr/ospf6d.conf
-    sudo touch /usr/pkg/etc/frr/isisd.conf
-    sudo touch /usr/pkg/etc/frr/ripd.conf
-    sudo touch /usr/pkg/etc/frr/ripngd.conf
-    sudo touch /usr/pkg/etc/frr/pimd.conf
-    sudo chown -R frr:frr /usr/pkg/etc/frr
-    sudo touch /usr/local/etc/frr/vtysh.conf
-    sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
-    sudo chmod 640 /usr/pkg/etc/frr/*.conf
-
-### Enable IP & IPv6 forwarding
-
-Add the following lines to the end of `/etc/sysctl.conf`:
-
-    # Routing: We need to forward packets
-    net.inet.ip.forwarding=1
-    net.inet6.ip6.forwarding=1
-
-**Reboot** or use `sysctl` to apply the same config to the running system
-
-### Install rc.d init files
-    cp pkgsrc/*.sh /etc/rc.d/
-    chmod 555 /etc/rc.d/*.sh
-
-### Enable FRR processes
-(Enable the required processes only)
-
-    echo "zebra=YES" >> /etc/rc.conf
-    echo "bgpd=YES" >> /etc/rc.conf
-    echo "ospfd=YES" >> /etc/rc.conf
-    echo "ospf6d=YES" >> /etc/rc.conf
-    echo "isisd=YES" >> /etc/rc.conf
-    echo "ripngd=YES" >> /etc/rc.conf
-    echo "ripd=YES" >> /etc/rc.conf
-    echo "pimd=YES" >> /etc/rc.conf
diff --git a/doc/Building_FRR_on_NetBSD7.md b/doc/Building_FRR_on_NetBSD7.md
deleted file mode 100644 (file)
index 7fe9ad2..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-Building FRR on NetBSD 7 from Git Source
-========================================
-
-NetBSD 7 restrictions:
-----------------------
-
-- MPLS is not supported on `NetBSD`. MPLS requires a Linux Kernel
-  (4.5 or higher). LDP can be built, but may have limited use 
-  without MPLS
-
-Install required packages
--------------------------
-
-    sudo pkgin install git autoconf automake libtool gmake gawk openssl \
-       pkg-config json-c python27 py27-test python35
-
-Install SSL Root Certificates (for git https access):
-
-    sudo pkgin install mozilla-rootcerts
-    sudo touch /etc/openssl/openssl.cnf
-    sudo mozilla-rootcerts install
-
-Select default Python and py.test
-
-    sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
-    sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
-
-Get FRR, compile it and install it (from Git)
-------------------------------------------------
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -g 93 frrvty
-    sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
-        -d /nonexistent -s /sbin/nologin frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just
-an example)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    MAKE=gmake
-    export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
-    export CPPFLAGS="-I/usr/pkg/include"
-    ./configure \
-        --sysconfdir=/usr/pkg/etc/frr \
-        --enable-exampledir=/usr/pkg/share/examples/frr \
-        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
-        --localstatedir=/var/run/frr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    gmake
-    gmake check
-    sudo gmake install
-
-### Create empty FRR configuration files
-    sudo mkdir /usr/pkg/etc/frr
-    sudo touch /usr/pkg/etc/frr/zebra.conf
-    sudo touch /usr/pkg/etc/frr/bgpd.conf
-    sudo touch /usr/pkg/etc/frr/ospfd.conf
-    sudo touch /usr/pkg/etc/frr/ospf6d.conf
-    sudo touch /usr/pkg/etc/frr/isisd.conf
-    sudo touch /usr/pkg/etc/frr/ripd.conf
-    sudo touch /usr/pkg/etc/frr/ripngd.conf
-    sudo touch /usr/pkg/etc/frr/pimd.conf
-    sudo chown -R frr:frr /usr/pkg/etc/frr
-    sudo touch /usr/local/etc/frr/vtysh.conf
-    sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
-    sudo chmod 640 /usr/pkg/etc/frr/*.conf
-
-### Enable IP & IPv6 forwarding
-
-Add the following lines to the end of `/etc/sysctl.conf`:
-
-    # Routing: We need to forward packets
-    net.inet.ip.forwarding=1
-    net.inet6.ip6.forwarding=1
-
-**Reboot** or use `sysctl` to apply the same config to the running system
-
-### Install rc.d init files
-    cp pkgsrc/*.sh /etc/rc.d/
-    chmod 555 /etc/rc.d/*.sh
-
-### Enable FRR processes
-(Enable the required processes only)
-
-    echo "zebra=YES" >> /etc/rc.conf
-    echo "bgpd=YES" >> /etc/rc.conf
-    echo "ospfd=YES" >> /etc/rc.conf
-    echo "ospf6d=YES" >> /etc/rc.conf
-    echo "isisd=YES" >> /etc/rc.conf
-    echo "ripngd=YES" >> /etc/rc.conf
-    echo "ripd=YES" >> /etc/rc.conf
-    echo "pimd=YES" >> /etc/rc.conf
diff --git a/doc/Building_FRR_on_OmniOS.md b/doc/Building_FRR_on_OmniOS.md
deleted file mode 100644 (file)
index 6e4575f..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-Building FRR on OmniOS (OpenSolaris) from Git Source
-====================================================
-
-OmniOS restrictions:
---------------------
-
-- MPLS is not supported on `OmniOS` or `Solaris`. MPLS requires a Linux 
-  Kernel (4.5 or higher). LDP can be built, but may have limited use 
-  without MPLS
-
-### Enable IP & IPv6 forwarding
-
-    routeadm -e ipv4-forwarding
-    routeadm -e ipv6-forwarding 
-
-Install required packages
--------------------------
-
-Add packages:
-
-    pkg install \
-      developer/build/autoconf \
-      developer/build/automake \
-      developer/lexer/flex \
-      developer/parser/bison \
-      developer/object-file \
-      developer/linker \
-      developer/library/lint \
-      developer/build/gnu-make \
-      developer/gcc51 \
-      library/idnkit \
-      library/idnkit/header-idnkit \
-      system/header \
-      system/library/math/header-math \
-      git libtool gawk pkg-config   
-
-Add additional Solaris packages:
-
-    pkgadd -d http://get.opencsw.org/now
-    /opt/csw/bin/pkgutil -U
-    /opt/csw/bin/pkgutil -y -i texinfo
-    /opt/csw/bin/pkgutil -y -i perl
-    /opt/csw/bin/pkgutil -y -i libjson_c_dev
-    /opt/csw/bin/pkgutil -y -i python27 py_pip python27_dev
-
-Add libjson to Solaris equivalent of ld.so.conf
-
-    crle -l /opt/csw/lib -u
-
-Add pytest:
-
-    pip install pytest
-
-Select Python 2.7 as default (required for pytest)
-
-    rm -f /usr/bin/python
-    ln -s /opt/csw/bin/python2.7 /usr/bin/python
-
-Fix PATH for all users and non-interactive sessions. Edit `/etc/default/login`
-and add the following default PATH:
-
-    PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
-
-Edit `~/.profile` and add the following default PATH:
-
-    PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using
-any packages**
-
-### Add frr group and user
-
-    sudo groupadd -g 93 frr
-    sudo groupadd -g 94 frrvty
-    sudo useradd -g 93 -u 93 -G frrvty -c "FRR suite" \
-        -d /nonexistent -s /bin/false frr
-
-(You may prefer different options on configure statement. These are just
-an example)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    export MAKE=gmake
-    export LDFLAGS="-L/opt/csw/lib"
-    export CPPFLAGS="-I/opt/csw/include"
-    export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig
-    ./configure \
-        --sysconfdir=/etc/frr \
-        --enable-exampledir=/usr/share/doc/frr/examples/ \
-        --localstatedir=/var/run/frr \
-        --sbindir=/usr/lib/frr \
-        --enable-vtysh \
-        --enable-watchfrr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    gmake
-    gmake check
-    sudo gmake install
-
-### Enable IP & IPv6 forwarding
-
-    routeadm -e ipv4-forwarding
-    routeadm -e ipv6-forwarding 
diff --git a/doc/Building_FRR_on_OpenBSD6.md b/doc/Building_FRR_on_OpenBSD6.md
deleted file mode 100644 (file)
index c1bfa50..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-Building FRR on OpenBSD 6 from Git Source
-=========================================
-
-Install required packages
--------------------------
-
-Configure PKG_PATH
-
-    export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/
-
-Add packages:
-
-    pkg_add git autoconf-2.69p2 automake-1.15p0 libtool bison
-    pkg_add gmake gawk dejagnu openssl json-c py-test
-
-Select Python2.7 as default (required for pytest)
-
-    ln -s /usr/local/bin/python2.7 /usr/local/bin/python
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using
-any packages**
-
-### Add frr group and user
-
-    groupadd -g 525 _frr
-    groupadd -g 526 _frrvty
-    useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \
-        -d /nonexistent -s /sbin/nologin _frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just 
-an example)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    export AUTOCONF_VERSION="2.69"
-    export AUTOMAKE_VERSION="1.15"
-    ./bootstrap.sh
-    export LDFLAGS="-L/usr/local/lib"
-    export CPPFLAGS="-I/usr/local/include"
-    ./configure \
-        --sysconfdir=/etc/frr \
-        --localstatedir=/var/frr \
-        --enable-pimd \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=_frr \
-        --enable-group=_frr \
-        --enable-vty-group=_frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    gmake
-    gmake check
-    doas gmake install
-
-### Create empty FRR configuration files
-
-    doas mkdir /var/frr
-    doas chown _frr:_frr /var/frr
-    doas chmod 755 /var/frr
-    doas mkdir /etc/frr
-    doas touch /etc/frr/zebra.conf
-    doas touch /etc/frr/bgpd.conf
-    doas touch /etc/frr/ospfd.conf
-    doas touch /etc/frr/ospf6d.conf
-    doas touch /etc/frr/isisd.conf
-    doas touch /etc/frr/ripd.conf
-    doas touch /etc/frr/ripngd.conf
-    doas touch /etc/frr/pimd.conf
-    doas touch /etc/frr/ldpd.conf
-    doas touch /etc/frr/nhrpd.conf
-    doas chown -R _frr:_frr /etc/frr
-    doas touch /etc/frr/vtysh.conf
-    doas chown -R _frr:_frrvty /etc/frr/vtysh.conf
-    doas chmod 750 /etc/frr
-    doas chmod 640 /etc/frr/*.conf
-
-### Enable IP & IPv6 forwarding
-
-Add the following lines to the end of `/etc/rc.conf`:
-
-    net.inet6.ip6.forwarding=1      # 1=Permit forwarding of IPv6 packets 
-    net.inet6.ip6.mforwarding=1     # 1=Permit forwarding of IPv6 multicast packets
-    net.inet6.ip6.multipath=1       # 1=Enable IPv6 multipath routing
-
-**Reboot** to apply the config to the system
-
-### Enable MPLS Forwarding
-
-To enable MPLS forwarding on a given interface, use the following command:
-
-    doas ifconfig em0 mpls
-
-Alternatively, to make MPLS forwarding persistent across reboots, add the "mpls"
-keyword in the hostname.* files of the desired interfaces. Example:
-
-    cat /etc/hostname.em0
-    inet 10.0.1.1 255.255.255.0 mpls
-
-### Install rc.d init files
-(create them in /etc/rc.d - no example are included at this time with 
-FRR source)
-
-Example (for zebra - store as `/etc/rc.d/frr_zebra.sh`)
-
-    #!/bin/sh
-    #
-    # $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $
-    
-    daemon="/usr/local/sbin/zebra -d"
-    
-    . /etc/rc.d/rc.subr
-    
-    rc_cmd $1
-
-### Enable FRR processes
-(Enable the required processes only)
-
-    echo "frr_zebra=YES" >> /etc/rc.conf
-    echo "frr_bgpd=YES" >> /etc/rc.conf
-    echo "frr_ospfd=YES" >> /etc/rc.conf
-    echo "frr_ospf6d=YES" >> /etc/rc.conf
-    echo "frr_isisd=YES" >> /etc/rc.conf
-    echo "frr_ripngd=YES" >> /etc/rc.conf
-    echo "frr_ripd=YES" >> /etc/rc.conf
-    echo "frr_pimd=YES" >> /etc/rc.conf
-    echo "frr_ldpd=YES" >> /etc/rc.conf
diff --git a/doc/Building_FRR_on_Ubuntu1204.md b/doc/Building_FRR_on_Ubuntu1204.md
deleted file mode 100644 (file)
index 58aa167..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-Building FRR on Ubuntu 12.04LTS from Git Source
-===============================================
-
-- MPLS is not supported on `Ubuntu 12.04` with default kernel. MPLS requires 
-  Linux Kernel 4.5 or higher (LDP can be built, but may have limited use 
-  without MPLS)
-  For an updated Ubuntu Kernel, see http://kernel.ubuntu.com/~kernel-ppa/mainline/
-
-Install required packages
--------------------------
-
-Add packages:
-
-    apt-get install git autoconf automake libtool make gawk libreadline-dev \
-       texinfo libpam0g-dev dejagnu libjson0-dev pkg-config libpam0g-dev \
-       libjson0-dev flex python-pip libc-ares-dev python3-dev
-
-Install newer bison from 14.04 package source (Ubuntu 12.04 package source
-is too old)
-
-    mkdir builddir
-    cd builddir
-    wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc
-    wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2
-    wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz
-    tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2 
-    cd bison-3.0.2.dfsg/
-    tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz 
-    sudo apt-get build-dep bison
-    debuild -b -uc -us
-    cd ..
-    sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb 
-    cd ..
-    rm -rf builddir
-
-Install newer version of autoconf and automake:
-
-    wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
-    tar xvf autoconf-2.69.tar.gz
-    cd autoconf-2.69
-    ./configure --prefix=/usr
-    make
-    sudo make install
-    cd ..
-    
-    wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
-    tar xvf automake-1.15.tar.gz
-    cd automake-1.15
-    ./configure --prefix=/usr
-    make
-    sudo make install
-    cd ..
-
-Install pytest:
-
-    pip install pytest
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using
-any packages**
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -r -g 85 frrvty
-    sudo adduser --system --ingroup frr --home /var/run/frr/ \
-       --gecos "FRR suite" --shell /sbin/nologin frr
-    sudo usermod -a -G frrvty frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    ./configure \
-        --prefix=/usr \
-        --enable-exampledir=/usr/share/doc/frr/examples/ \
-        --localstatedir=/var/run/frr \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --enable-pimd \
-        --enable-watchfrr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    make
-    make check
-    sudo make install
-
-### Create empty FRR configuration files
-
-    sudo install -m 755 -o frr -g frr -d /var/log/frr
-    sudo install -m 775 -o frr -g frrvty -d /etc/frr
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
-    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
-
-### Enable IP & IPv6 forwarding
-
-Edit `/etc/sysctl.conf` and uncomment the following values (ignore the 
-other settings)
-
-    # Uncomment the next line to enable packet forwarding for IPv4
-    net.ipv4.ip_forward=1
-
-    # Uncomment the next line to enable packet forwarding for IPv6
-    #  Enabling this option disables Stateless Address Autoconfiguration
-    #  based on Router Advertisements for this host
-    net.ipv6.conf.all.forwarding=1
-
-**Reboot** or use `sysctl -p` to apply the same config to the running system
-
-### Install the init.d service
-
-    sudo install -m 755 tools/frr /etc/init.d/frr
-    sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
-    sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
-    sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
-    
-### Enable daemons 
-Edit `/etc/frr/daemons` and change the value from "no" to "yes" for those daemons you want to start by systemd.  
-For example.
-
-    zebra=yes  
-    bgpd=yes  
-    ospfd=yes  
-    ospf6d=yes  
-    ripd=yes  
-    ripngd=yes  
-    isisd=yes 
-    
-### Start the init.d service
-- /etc/init.d/frr start
-- use `/etc/init.d/frr status` to check its status.
diff --git a/doc/Building_FRR_on_Ubuntu1404.md b/doc/Building_FRR_on_Ubuntu1404.md
deleted file mode 100644 (file)
index 8e6b38c..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-Building FRR on Ubuntu 14.04LTS from Git Source
-===============================================
-
-- MPLS is not supported on `Ubuntu 14.04` with default kernel. MPLS requires 
-  Linux Kernel 4.5 or higher (LDP can be built, but may have limited use 
-  without MPLS)
-  For an updated Ubuntu Kernel, see http://kernel.ubuntu.com/~kernel-ppa/mainline/
-
-Install required packages
--------------------------
-
-Add packages:
-
-    apt-get install git autoconf automake libtool make gawk libreadline-dev \
-       texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
-       python-pytest libc-ares-dev python3-dev
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using
-any packages**
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -r -g 85 frrvty
-    sudo adduser --system --ingroup frr --home /var/run/frr/ \
-       --gecos "FRR suite" --shell /sbin/nologin frr
-    sudo usermod -a -G frrvty frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just 
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    ./configure \
-        --prefix=/usr \
-        --enable-exampledir=/usr/share/doc/frr/examples/ \
-        --localstatedir=/var/run/frr \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --enable-pimd \
-        --enable-watchfrr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --enable-ldpd \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    make
-    make check
-    sudo make install
-
-### Create empty FRR configuration files
-
-    sudo install -m 755 -o frr -g frr -d /var/log/frr
-    sudo install -m 775 -o frr -g frrvty -d /etc/frr
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf    
-    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
-
-### Enable IP & IPv6 forwarding
-
-Edit `/etc/sysctl.conf` and uncomment the following values (ignore the 
-other settings)
-
-    # Uncomment the next line to enable packet forwarding for IPv4
-    net.ipv4.ip_forward=1
-
-    # Uncomment the next line to enable packet forwarding for IPv6
-    #  Enabling this option disables Stateless Address Autoconfiguration
-    #  based on Router Advertisements for this host
-    net.ipv6.conf.all.forwarding=1
-
-**Reboot** or use `sysctl -p` to apply the same config to the running system
-### Install the init.d service
-
-    sudo install -m 755 tools/frr /etc/init.d/frr
-    sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
-    sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
-    sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
-### Enable daemons 
-
-Edit `/etc/frr/daemons` and change the value from "no" to "yes" for those daemons you want to start by systemd.  
-For example.
-
-    zebra=yes  
-    bgpd=yes  
-    ospfd=yes  
-    ospf6d=yes  
-    ripd=yes  
-    ripngd=yes  
-    isisd=yes 
-    
-### Start the init.d service
-- /etc/init.d/frr start
-- use `/etc/init.d/frr status` to check its status.
-    
diff --git a/doc/Building_FRR_on_Ubuntu1604.md b/doc/Building_FRR_on_Ubuntu1604.md
deleted file mode 100644 (file)
index bdd0a96..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-Building FRR on Ubuntu 16.04LTS from Git Source
-===============================================
-
-- MPLS is not supported on `Ubuntu 16.04` with default kernel. MPLS requires 
-  Linux Kernel 4.5 or higher (LDP can be built, but may have limited use 
-  without MPLS)
-  For an updated Ubuntu Kernel, see 
-    http://kernel.ubuntu.com/~kernel-ppa/mainline/
-
-Install required packages
--------------------------
-
-Add packages:
-
-    apt-get install git autoconf automake libtool make gawk libreadline-dev \
-       texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
-       python-pytest libc-ares-dev python3-dev libsystemd-dev python-ipaddr
-
-Get FRR, compile it and install it (from Git)
----------------------------------------------
-
-**This assumes you want to build and install FRR from source and not using 
-any packages**
-
-### Add frr groups and user
-
-    sudo groupadd -g 92 frr
-    sudo groupadd -r -g 85 frrvty
-    sudo adduser --system --ingroup frr --home /var/run/frr/ \
-       --gecos "FRR suite" --shell /sbin/nologin frr
-    sudo usermod -a -G frrvty frr
-
-### Download Source, configure and compile it
-(You may prefer different options on configure statement. These are just 
-an example.)
-
-    git clone https://github.com/frrouting/frr.git frr
-    cd frr
-    ./bootstrap.sh
-    ./configure \
-        --prefix=/usr \
-        --enable-exampledir=/usr/share/doc/frr/examples/ \
-        --localstatedir=/var/run/frr \
-        --sbindir=/usr/lib/frr \
-        --sysconfdir=/etc/frr \
-        --enable-pimd \
-        --enable-watchfrr \
-        --enable-ospfclient=yes \
-        --enable-ospfapi=yes \
-        --enable-multipath=64 \
-        --enable-user=frr \
-        --enable-group=frr \
-        --enable-vty-group=frrvty \
-        --enable-configfile-mask=0640 \
-        --enable-logfile-mask=0640 \
-        --enable-rtadv \
-        --enable-fpm \
-        --enable-systemd=yes \
-        --with-pkg-git-version \
-        --with-pkg-extra-version=-MyOwnFRRVersion   
-    make
-    make check
-    sudo make install
-
-### Create empty FRR configuration files
-
-    sudo install -m 755 -o frr -g frr -d /var/log/frr
-    sudo install -m 775 -o frr -g frrvty -d /etc/frr
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
-    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf    
-    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
-
-### Enable IPv4 & IPv6 forwarding
-
-Edit `/etc/sysctl.conf` and uncomment the following values (ignore the 
-other settings)
-
-    # Uncomment the next line to enable packet forwarding for IPv4
-    net.ipv4.ip_forward=1
-
-    # Uncomment the next line to enable packet forwarding for IPv6
-    #  Enabling this option disables Stateless Address Autoconfiguration
-    #  based on Router Advertisements for this host
-    net.ipv6.conf.all.forwarding=1
-
-### Enable MPLS Forwarding (with Linux Kernel >= 4.5)
-
-Edit `/etc/sysctl.conf` and the following lines. Make sure to add a line 
-equal to `net.mpls.conf.eth0.input` or each interface used with MPLS
-
-    # Enable MPLS Label processing on all interfaces
-    net.mpls.conf.eth0.input=1
-    net.mpls.conf.eth1.input=1
-    net.mpls.conf.eth2.input=1
-    net.mpls.platform_labels=100000
-
-### Add MPLS kernel modules
-
-Add the following lines to `/etc/modules-load.d/modules.conf`:
-
-    # Load MPLS Kernel Modules
-    mpls-router
-    mpls-iptunnel
-
-**Reboot** or use `sysctl -p` to apply the same config to the running system
-
-
-### Install the systemd service (if rebooted from last step, change directory back to frr directory)
-
-    sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
-    sudo install -m 644 tools/etc/default/frr /etc/default/frr
-    sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
-    sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
-    sudo install -m 644 tools/etc/frr/frr.conf /etc/frr/frr.conf
-    sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
-
-### Enable daemons 
-
-Edit `/etc/frr/daemons` and change the value from "no" to "yes" for those daemons you want to start by systemd.  
-For example.
-
-    zebra=yes
-    bgpd=yes
-    ospfd=yes
-    ospf6d=yes
-    ripd=yes
-    ripngd=yes
-    isisd=yes
-
-### Enable the systemd service
- - systemctl enable frr
-
-### Start the systemd service
-- systemctl start frr
-- use `systemctl status frr` to check its status.
index 9c81202db9e7938500a0fcabf6d5888fb48c4516..8d35d4540ba797aaa8337dd5a5290ef6e063659c 100644 (file)
 ## Process this file with automake to produce Makefile.in.
 
-# Dia, the version i have at least, doesn't do very good EPS output
-# (some of the text is scaled strangely). So this will work, but 
-# it is probably better to use something like gimp to convert the 
-# dia exported PNG files to EPS manually.
+# Pass down make invocation to each subdirectory.
 #
-# Here we use 'convert' from the well known 'ImageMagick' package
-# to do conversion from png to eps/pdf for figures. 
-# PDF form is required for frr.pdf, using PDFTex at least.
+# Each of these directories contains a Sphinx-generated Makefile that has been
+# modified to implement all the targets required by Automake, as documented in
+# the 'Third-Party Makefiles' section of the Automake docs.
 #
-# TeX implementation, which we depend on already anyway.
-#
-# dia -> (dia) -> png -> (convert) -> eps -> (epstopdf) -> pdf
-SUFFIXES = .png .eps .dia .pdf
-DIATOPNG = dia -t png -e
-DIATOEPS = dia -t eps -e
-PNGTOEPS = convert -antialias -contrast -despeckle
-PNGTOPDF = $(PNGTOEPS)
-EPSTOPDF = epstopdf
-
-VNCFIGURES_PNG = 
-VNCFIGURES_DIA = -vnc-mesh -vnc-frr-route-reflector            \
--vnc-commercial-route-reflector -vnc-redundant-route-reflectors        \
--vnc-gw -vnc-gw-rr
-
-# TODO: A target that creates an empty text file for each member of
-# VNCFIGURES_TXT
-VNCFIGURES_TXT = $(VNCFIGURES:%.png=%.txt)
-
-# The figure sources
-figures_names_parts = -normal-processing -rs-processing \
-       _topologies_full _topologies_rs \
-       $(VNCFIGURES_DIA)
-
-figures_sources = $(figures_names_parts:%=fig%.dia)
-figures_png = $(figures_names_parts:%=fig%.png) $(VNCFIGURES_PNG)
-figures_pdf = $(figures_names_parts:%=fig%.pdf) $(VNCFIGURES_PNG:%.png=%.pdf)
-figures_eps = $(figures_names_parts:%=fig%.eps) $(VNCFIGURES_PNG:%.png=%.eps)
-figures_txt = $(figures_names_parts:%=fig%.txt)
-
-# rather twisted logic because we have to build PDFs of the EPS figures for
-# PDFTex and yet build one PDF, frr.pdf, from texi source. Which means we
-# cant rely on a single automatic rule for *.pdf, eg the one automatically
-# provided by automake. If you are an automake wizard, please feel free to
-# compact it somehow.
-
-info_TEXINFOS = frr.texi
-
-# Have to manually specify the frr.pdf rule in order to allow
-# us to have a generic automatic .pdf rule to build the figure sources
-# because it cant just work from the png's directly it seems - contrary
-# to the documentation...
-frr.pdf: $(info_TEXINFOS) $(figures_pdf) $(frr_TEXINFOS) defines.texi
-       $(TEXI2PDF) -o "$@" $< || true
-
-# don't ask me why the info file is in srcdir
-$(srcdir)/frr.info: $(frr_TEXINFOS) defines.texi
-frr.dvi: $(frr_TEXINFOS) defines.texi
-frr.html: $(frr_TEXINFOS) defines.texi
-
-frr_TEXINFOS = \
-       appendix.texi \
-       basic.texi \
-       bgpd.texi \
-       isisd.texi \
-       filter.texi \
-       vnc.texi \
-       babeld.texi \
-       install.texi \
-       ipv6.texi  \
-       kernel.texi \
-       main.texi \
-       nhrpd.texi \
-       eigrpd.texi \
-       ospf6d.texi \
-       ospfd.texi \
-       overview.texi \
-       protocol.texi \
-       ripd.texi \
-       ripngd.texi \
-       routemap.texi \
-       snmp.texi \
-       vtysh.texi \
-       routeserver.texi \
-       $(figures_png) \
-       snmptrap.texi \
-       ospf_fundamentals.texi \
-       isisd.texi $(figures_txt) \
-       rpki.texi \
-       pimd.texi \
-       #END
-
-.png.eps:
-       $(PNGTOEPS) $< "$@"
-
-.png.pdf:
-       $(PNGTOPDF) $< "$@"
-
-.dia.png:
-       $(DIATOPNG) "$@" $<
-
-man_MANS = frr.1 frr-args.8
+# Note the absence of the 'developer' directory here; development docs are
+# never built as part of a regular build. They are only built when explicitly
+# asked for. See comment further down.
+
+# Sphinx is not designed to be invoked multiple times against the same toctree.
+.NOTPARALLEL:
+
+SUBDIRS = manpages user
+AM_MAKEFLAGS = DESTDIR=${DESTDIR} infodir=${infodir} doczdir=${abs_srcdir}
+
+MANPAGE_BUILDDIR = manpages/_build/man
+
+# This is a hack, see comment further down.
+man_MANS = $(MANPAGE_BUILDDIR)/frr.1
 
 if PIMD
-man_MANS += pimd.8
-man_MANS += mtracebis.8
+man_MANS += $(MANPAGE_BUILDDIR)/pimd.8
+man_MANS += $(MANPAGE_BUILDDIR)/mtracebis.8
 endif
 
 if BGPD
-man_MANS += bgpd.8
+man_MANS += $(MANPAGE_BUILDDIR)/bgpd.8
 endif
 
 if ISISD
-man_MANS += isisd.8
+man_MANS += $(MANPAGE_BUILDDIR)/isisd.8
 endif
 
 if OSPF6D
-man_MANS += ospf6d.8
+man_MANS += $(MANPAGE_BUILDDIR)/ospf6d.8
 endif
 
 if OSPFCLIENT
-man_MANS += ospfclient.8
+man_MANS += $(MANPAGE_BUILDDIR)/ospfclient.8
 endif
 
 if OSPFD
-man_MANS += ospfd.8
+man_MANS += $(MANPAGE_BUILDDIR)/ospfd.8
 endif
 
 if LDPD
-man_MANS += ldpd.8
+man_MANS += $(MANPAGE_BUILDDIR)/ldpd.8
 endif
 
 if RIPD
-man_MANS += ripd.8
+man_MANS += $(MANPAGE_BUILDDIR)/ripd.8
 endif
 
 if RIPNGD
-man_MANS += ripngd.8
+man_MANS += $(MANPAGE_BUILDDIR)/ripngd.8
 endif
 
 if NHRPD
-man_MANS += nhrpd.8
+man_MANS += $(MANPAGE_BUILDDIR)/nhrpd.8
 endif
 
 if VTYSH
-man_MANS += vtysh.1
+man_MANS += $(MANPAGE_BUILDDIR)/vtysh.1
 endif
 
 if WATCHFRR
-man_MANS += watchfrr.8
+man_MANS += $(MANPAGE_BUILDDIR)/watchfrr.8
 endif
 
 if ZEBRA
-man_MANS += zebra.8
+man_MANS += $(MANPAGE_BUILDDIR)/zebra.8
 endif
 
 if EIGRPD
-man_MANS += eigrpd.8
+man_MANS += $(MANPAGE_BUILDDIR)/eigrpd.8
 endif
 
-EXTRA_DIST = BGP-TypeCode draft-zebra-00.ms draft-zebra-00.txt \
-       \
-       bgpd.8.in \
-       isisd.8.in \
-       ospf6d.8.in \
-       ospfclient.8.in \
-       ospfd.8.in \
-       ldpd.8.in \
-       ripd.8.in \
-       ripngd.8.in \
-       pimd.8.in \
-       mtracebis.8.in \
-       nhrpd.8.in \
-       vtysh.1.in \
-       watchfrr.8.in \
-       zebra.8.in \
-       frr.1.in \
-       eigrpd.8.in \
-       \
-       mpls/ChangeLog.opaque.txt mpls/cli_summary.txt \
-       mpls/opaque_lsa.txt mpls/ospfd.conf \
-       $(figures_sources) $(figures_png) $(figures_txt)
-
-draft-zebra-00.txt: draft-zebra-00.ms
-       groff -T ascii -ms $< > $@
-
-# Ensure that all of the figures are copied into the html directory
-html-local: $(HTMLS)
-       if test -d $(HTMLS) ; then \
-               cp -p $(figures_png) $(HTMLS) ; \
-       else \
-               echo "$(HTMLS) is not a directory. Make it so, the rerun make."; \
-       fi
+# Automake is particular about manpages. It is aware of them and has some
+# special facilities for handling them, but it assumes that manpages are always
+# given in groff source and so these facilities are limited to simply
+# specifying the path to the groff sources in a special variable. There is no
+# target for building manpages that can be extended, as there are for pdf,
+# html, dvi, etc. Unfortunately this leaves us with hijacking the
+# 'install-data' and 'all' targets in the 3rd-party Makefile in manpages/ to
+# make sure manpages are always built, and then using the special Automake
+# variable defined above in order to take advantage of automatic installation.
+#
+# However, it is conceivable that someone may want to build just the manpages,
+# so here's an explicit target for that.
+man:
+       $(MAKE) -C manpages man
+
+# Automake automatically defines targets for various document formats. All of
+# the child 3rd-party Makefiles are aware of all Automake targets and implement
+# the ones we are interested in.
+#
+# The SUBDIRS variable at the top of this Makefile.am causes the following
+# implicit Automake targets to only build user documentation, and not developer
+# documentation:
+# - info
+# - html
+# - pdf
+#
+# If you wish to build developer documentation, use these targets:
+developer-info:
+       $(MAKE) -C developer info
+
+developer-pdf:
+       $(MAKE) -C developer latexpdf
+
+developer-html:
+       $(MAKE) -C developer html
+
+# If you want to build the developer's docs in other formats, try the
+# following:
+#
+# $ cd developer
+# $ make help
+
+# dist tarballs want doc sources
+EXTRA_DIST = frr-sphinx.mk \
+       manpages/defines.rst \
+       manpages/ldpd.rst \
+       manpages/index.rst \
+       manpages/bgpd.rst \
+       manpages/watchfrr.rst \
+       manpages/ospfclient.rst \
+       manpages/ripd.rst \
+       manpages/zebra.rst \
+       manpages/epilogue.rst \
+       manpages/eigrpd.rst \
+       manpages/isisd.rst \
+       manpages/ospf6d.rst \
+       manpages/common-options.rst \
+       manpages/ospfd.rst \
+       manpages/vtysh.rst \
+       manpages/nhrpd.rst \
+       manpages/pimd.rst \
+       manpages/mtracebis.rst \
+       manpages/ripngd.rst \
+       manpages/frr.rst \
+       manpages/conf.py \
+       manpages/Makefile \
+       developer/Building_FRR_on_NetBSD7.rst \
+       developer/ldpd-basic-test-setup.md \
+       developer/cli.rst \
+       developer/index.rst \
+       developer/library.rst \
+       developer/memtypes.rst \
+       developer/bgpd.rst \
+       developer/draft-zebra-00.ms \
+       developer/dev-modules.md \
+       developer/conf.py \
+       developer/next-hop-tracking.rst \
+       developer/Building_FRR_on_FreeBSD11.rst \
+       developer/building.rst \
+       developer/Building_FRR_on_CentOS6.rst \
+       developer/Building_FRR_on_Ubuntu1604.rst \
+       developer/ospf-api.rst \
+       developer/ospf-sr.rst \
+       developer/Building_FRR_on_OpenBSD6.rst \
+       developer/Building_FRR_on_Debian8.rst \
+       developer/Building_FRR_on_NetBSD6.rst \
+       developer/Building_FRR_on_Debian9.rst \
+       developer/Building_FRR_on_LEDE-OpenWRT.rst \
+       developer/modules.rst \
+       developer/Building_FRR_on_FreeBSD10.rst \
+       developer/Building_FRR_on_Ubuntu1204.rst \
+       developer/Building_FRR_on_Fedora24.rst \
+       developer/Makefile \
+       developer/Building_FRR_on_FreeBSD9.rst \
+       developer/BGP-TypeCode \
+       developer/Building_FRR_on_OmniOS.rst \
+       developer/Building_FRR_on_CentOS7.rst \
+       developer/hooks.rst \
+       developer/OSPF-API.md \
+       developer/workflow.rst \
+       developer/Building_FRR_on_Ubuntu1404.rst \
+       developer/Building_FRR_on_Alpine.rst \
+       user/ospf_fundamentals.rst \
+       user/routemap.rst \
+       user/index.rst \
+       user/conf.py \
+       user/ipv6.rst \
+       user/ripd.rst \
+       user/vnc.rst \
+       user/zebra.rst \
+       user/installation.rst \
+       user/overview.rst \
+       user/protocol.rst \
+       user/eigrpd.rst \
+       user/rpki.rst \
+       user/kernel.rst \
+       user/isisd.rst \
+       user/ospf6d.rst \
+       user/Useful_Sysctl_Settings.md \
+       user/basic.rst \
+       user/ospfd.rst \
+       user/vtysh.rst \
+       user/filter.rst \
+       user/nhrpd.rst \
+       user/Makefile \
+       user/routeserver.rst \
+       user/appendix.rst \
+       user/bgp.rst \
+       user/babeld.rst \
+       user/snmp.rst \
+       user/pim.rst \
+       user/ripngd.rst \
+       user/snmptrap.rst \
+       user/glossary.rst \
+       mpls/ChangeLog.opaque.txt \
+       mpls/ospfd.conf \
+       mpls/cli_summary.txt \
+       mpls/opaque_lsa.txt \
+       figures/frr-logo.png \
+       figures/fig-vnc-commercial-route-reflector.dia \
+       figures/ospf_api_msghdr.png \
+       figures/fig-normal-processing.txt \
+       figures/fig-vnc-gw-rr.txt \
+       figures/fig-vnc-mesh.dia \
+       figures/frr-logo-medium.png \
+       figures/git_branches.svg \
+       figures/fig-vnc-commercial-route-reflector.txt \
+       figures/fig_topologies_rs.txt \
+       figures/git_branches.png \
+       figures/fig-vnc-mesh.txt \
+       figures/ospf_api_msgs1.png \
+       figures/fig-vnc-redundant-route-reflectors.txt \
+       figures/fig-vnc-commercial-route-reflector.png \
+       figures/fig-vnc-gw.png \
+       figures/fig_topologies_rs.png \
+       figures/fig_topologies_full.txt \
+       figures/fig-vnc-frr-route-reflector.txt \
+       figures/fig-normal-processing.dia \
+       figures/fig-vnc-redundant-route-reflectors.png \
+       figures/fig-vnc-frr-route-reflector.dia \
+       figures/fig_topologies_full.png \
+       figures/fig-vnc-redundant-route-reflectors.dia \
+       figures/fig-normal-processing.png \
+       figures/fig-rs-processing.dia \
+       figures/ospf_api_msgs2.png \
+       figures/fig-vnc-gw.dia \
+       figures/fig-rs-processing.txt \
+       figures/frr-logo-icon.png \
+       figures/ospf_api_architecture.png \
+       figures/fig-vnc-gw.txt \
+       figures/fig-rs-processing.png \
+       figures/frr-icon.svg \
+       figures/fig_topologies_rs.dia \
+       figures/fig-vnc-frr-route-reflector.png \
+       figures/fig-vnc-gw-rr.png \
+       figures/fig-vnc-gw-rr.dia \
+       figures/fig_topologies_full.dia \
+       figures/frr-logo-small.png \
+       figures/fig-vnc-mesh.png
diff --git a/doc/OSPF-API.md b/doc/OSPF-API.md
deleted file mode 100644 (file)
index 5774300..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-# OSPF API Documentation
-
-[TOC]
-
-## Disclaimer
-
-The OSPF daemon contains an API for application access to the LSA database. This API was created by Ralph Keller, originally as patch for Zebra. Unfortunately, the page containing documentation of the API is no longer online. This page is an attempt to recreate documentation for the API (with lots of help of the WayBackMachine)
-
-## 1.  Introduction
-
-This page describes an API that allows external applications to access the link-state database (LSDB) of the OSPF daemon. The implementation is based on the OSPF code from FRRouting (forked from Quagga and formerly Zebra) routing protocol suite and is subject to the GNU General Public License. The OSPF API provides you with the following functionality:
-
-*     Retrieval of the full or partial link-state database of the OSPF daemon. This allows applications to obtain an exact copy of the LSDB including router LSAs, network LSAs and so on. Whenever a new LSA arrives at the OSPF daemon, the API module immediately informs the application by sending a message. This way, the application is always synchronized with the LSDB of the OSPF daemon.
-*    Origination of own opaque LSAs (of type 9, 10, or 11) which are then distributed transparently to other routers within the flooding scope and received by other applications through the OSPF API.
-
-Opaque LSAs, which are described in RFC 2370 , allow you to distribute application-specific information within a network using the OSPF protocol. The information contained in opaque LSAs is transparent for the routing process but it can be processed by other modules such as traffic engineering (e.g., MPLS-TE).
-
-## 2.  Architecture
-
-The following picture depicts the architecture of the Quagga/Zebra protocol suite. The OSPF daemon is extended with opaque LSA capabilities and an API for external applications. The OSPF core module executes the OSPF protocol by discovering neighbors and exchanging neighbor state. The opaque module, implemented by Masahiko Endo, provides functions to exchange opaque LSAs between routers. Opaque LSAs can be generated by several modules such as the MPLS-TE module or the API server module. These modules then invoke the opaque module to flood their data to neighbors within the flooding scope.
-
-The client, which is an application potentially running on a different node than the OSPF daemon, links against the OSPF API client library. This client library establishes a socket connection with the API server module of the OSPF daemon and uses this connection to retrieve LSAs and originate opaque LSAs.
-
-![image](ospf_api_architecture.png)
-
-The OSPF API server module works like any other internal opaque module (such as the MPLS-TE module), but listens to connections from external applications that want to communicate with the OSPF daemon. The API server module can handle multiple clients concurrently.
-
-One of the main objectives of the implementation is to make as little changes to the existing Zebra code as possible.
-
-## 3.  Installation & Configuration
-
-Download FRRouting and unpack
-
-Configure your frr version (note that --enable-opaque-lsa also enables the ospfapi server and ospfclient).
-
-```
-% update-autotools
-% sh ./configure --enable-opaque-lsa
-% make
-
-```
-
-This should also compile the client library and sample application in ospfclient.
-
-Make sure that you have enabled opaque LSAs in your configuration. Add the ospf opaque-lsa statement to your ospfd.conf:
-
-```
-! -*- ospf -*-
-!
-! OSPFd sample configuration file
-!
-!
-hostname xxxxx
-password xxxxx
-
-router ospf
-  router-id 10.0.0.1
-  network 10.0.0.1/24 area 1
-  neighbor 10.0.0.2
-  network 10.0.1.2/24 area 1
-  neighbor 10.0.1.1
-  ospf opaque-lsa      <============ add this statement!
-
-```
-
-## 4. Usage
-
-In the following we describe how you can use the sample application to originate opaque LSAs. The sample application first registers with the OSPF daemon the opaque type it wants to inject and then waits until the OSPF daemon is ready to accept opaque LSAs of that type. Then the client application originates an opaque LSA, waits 10 seconds and then updates the opaque LSA with new opaque data. After another 20 seconds, the client application deletes the opaque LSA from the LSDB. If the clients terminates unexpectedly, the OSPF API module will remove all the opaque LSAs that the application registered. Since the opaque LSAs are flooded to other routers, we will see the opaque LSAs in all routers according to the flooding scope of the opaque LSA.
-
-We have a very simple demo setup, just two routers connected with an ATM point-to-point link. Start the modified OSPF daemons on two adjacent routers. First run on msr2:
-
-```
-    > msr2:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf
-```
-
-And on the neighboring router msr3:
-
-
-```
-    > msr3:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf
-```
-
-Now the two routers form adjacency and start exchanging their databases. Looking at the OSPF daemon of msr2 (or msr3), you see this:
-
-```
-    ospfd> show ip ospf database
-
-           OSPF Router with ID (10.0.0.1)
-
-                    Router Link States (Area 0.0.0.1)
-
-    Link ID         ADV Router      Age  Seq#       CkSum  Link count
-    10.0.0.1        10.0.0.1          55 0x80000003 0xc62f 2
-    10.0.0.2        10.0.0.2          55 0x80000003 0xe3e4 3
-
-                    Net Link States (Area 0.0.0.1)
-
-    Link ID         ADV Router      Age  Seq#       CkSum
-    10.0.0.2        10.0.0.2          60 0x80000001 0x5fcb
-
-```
-
-Now we start the sample main application that originates an opaque LSA.
-
-
-```
-    > cd ospfapi/apiclient
-    > ./main msr2 10 250 20 0.0.0.0 0.0.0.1
-
-```
-
-This originates an opaque LSA of type 10 (area local), with opaque type 250 (experimental), opaque id of 20 (chosen arbitrarily), interface address 0.0.0.0 (which is used only for opaque LSAs type 9), and area 0.0.0.1
-
-Again looking at the OSPF database you see:
-
-```
-    ospfd> show ip ospf database
-
-           OSPF Router with ID (10.0.0.1)
-
-                    Router Link States (Area 0.0.0.1)
-
-    Link ID         ADV Router      Age  Seq#       CkSum  Link count
-    10.0.0.1        10.0.0.1         437 0x80000003 0xc62f 2
-    10.0.0.2        10.0.0.2         437 0x80000003 0xe3e4 3
-
-                    Net Link States (Area 0.0.0.1)
-
-    Link ID         ADV Router      Age  Seq#       CkSum
-    10.0.0.2        10.0.0.2         442 0x80000001 0x5fcb
-
-                    Area-Local Opaque-LSA (Area 0.0.0.1)
-
-    Opaque-Type/Id  ADV Router      Age  Seq#       CkSum
-    250.0.0.20      10.0.0.1           0 0x80000001 0x58a6  <=== opaque LSA
-
-```
-
-You can take a closer look at this opaque LSA:
-
-```
-       ospfd> show ip ospf database opaque-area
-
-       OSPF Router with ID (10.0.0.1)
-
-
-       Area-Local Opaque-LSA (Area 0.0.0.1)
-
-       LS age: 4
-       Options: 66
-       LS Type: Area-Local Opaque-LSA
-       Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID)
-       Advertising Router: 10.0.0.1
-       LS Seq Number: 80000001
-       Checksum: 0x58a6
-       Length: 24
-       Opaque-Type 250 (Private/Experimental)
-       Opaque-ID 0x14
-       Opaque-Info: 4 octets of data
-       Added using OSPF API: 4 octets of opaque data
-       Opaque data: 1 0 0 0 <==== counter is 1
-
-```
-
-Note that the main application updates the opaque LSA after 10 seconds, then it looks as follows:
-
-```
-    ospfd> show ip ospf database opaque-area
-
-           OSPF Router with ID (10.0.0.1)
-
-
-                    Area-Local Opaque-LSA (Area 0.0.0.1)
-
-      LS age: 1
-      Options: 66
-      LS Type: Area-Local Opaque-LSA
-      Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID)
-      Advertising Router: 10.0.0.1
-      LS Seq Number: 80000002
-      Checksum: 0x59a3
-      Length: 24
-      Opaque-Type 250 (Private/Experimental)
-      Opaque-ID   0x14
-      Opaque-Info: 4 octets of data
-      Added using OSPF API: 4 octets of opaque data
-      Opaque data: 2 0 0 0  <==== counter is now 2
-
-```
-
-Note that the payload of the opaque LSA has changed as you can see above.
-
-Then, again after another 20 seconds, the opaque LSA is flushed from the LSDB.
-
-#### Important note:
-
-In order to originate an opaque LSA, there must be at least one active opaque-capable neighbor. Thus, you cannot originate opaque LSAs of no neighbors are present. If you try to originate even so no neighbor is ready,  you will receive a not ready error message. The reason for this restriction is that it might be possible that some routers have an identical opaque LSA from a previous origination in their LSDB that unfortunately could not be flushed due to a crash, and now if the router comes up again and starts originating a new opaque LSA, the new opaque LSA is considered older since it has a lower sequence number and is ignored by other routers (that consider the stalled opaque LSA as more recent). However, if the originating router first synchronizes the database before originating opaque LSAs, it will detect the older opaque LSA and can flush it first.
-
-
-## 5.  Protocol and Message Formats
-
-If you are developing your own client application and you don't want to make use of the client library (due to the GNU license restriction or whatever reason), you can implement your own client-side message handling. The OSPF API uses two connections between the client and the OSPF API server: One connection is used for a synchronous request /reply protocol and another connection is used for asynchronous notifications (e.g., LSA update, neighbor status change).
-
-Each message begins with the following header:
-
-![image](ospf_api_msghdr.png)
-
-The message type field can take one of the following values:
-
-Messages to OSPF deamon | Value
------------------------ | -----
-MSG_REGISTER_OPAQUETYPE         | 1
-MSG_UNREGISTER_OPAQUETYPE | 2
-MSG_REGISTER_EVENT | 3
-MSG_SYNC_LSDB | 4
-MSG_ORIGINATE_REQUEST | 5
-MSG_DELETE_REQUEST | 6
-
-Messages from OSPF deamon | Value
-------------------------- | -----
-MSG_REPLY | 10
-MSG_READY_NOTIFY | 11
-MSG_LSA_UPDATE_NOTIFY | 12
-MSG_LSA_DELETE_NOTIFY | 13
-MSG_NEW_IF | 14
-MSG_DEL_IF | 15
-MSG_ISM_CHANGE | 16
-MSG_NSM_CHANGE | 17
-
-The synchronous requests and replies have the following message formats:
-
-![image](ospf_api_msgs1.png)
-
-The origin field allows to select according to the following types of origins:
-
-Origin | Value
------- | -----
-NON_SELF_ORIGINATED | 0
-SELF_ORIGINATED | 1
-ANY_ORIGIN | 2
-
-The reply message has on of the following error codes:
-
-Error code | Value
----------- | -----
-API_OK | 0
-API_NOSUCHINTERFACE | -1
-API_NOSUCHAREA | -2
-API_NOSUCHLSA | -3
-API_ILLEGALSATYPE | -4
-API_ILLEGALOPAQUETYPE | -5
-API_OPAQUETYPEINUSE | -6
-API_NOMEMORY | -7
-API_ERROR | -99
-API_UNDEF | -100
-
-The asynchronous notifications have the following message formats:
-
-![image](ospf_api_msgs2.png)
-
-## 6.  Original Acknowledgments from Ralph Keller
-
-I would like to thank Masahiko Endo, the author of the opaque LSA extension module, for his great support. His wonderful ASCII graphs explaining the internal workings of this code, and his invaluable input proved to be crucial in designing a useful API for accessing the link state database of the OSPF daemon. Once, he even decided to take the plane from Tokyo to Zurich so that we could actually meet and have face-to-face discussions, which was a lot of fun. Clearly, without Masahiko no API would ever be completed. I also would like to thank Daniel Bauer who wrote an opaque LSA implementation too and was willing to test the OSPF API code in one of his projects.
diff --git a/doc/OSPF-SR.rst b/doc/OSPF-SR.rst
deleted file mode 100644 (file)
index 299a7e1..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-OSPF Segment Routing
-====================
-
-This is an EXPERIMENTAL support of draft
-`draft-ietf-ospf-segment-routing-extensions-24`.
-DON'T use it for production network.
-
-Supported Features
-------------------
-
-* Automatic computation of Primary and Backup Adjacency SID with
-  Cisco experimental remote IP address
-* SRGB configuration
-* Prefix configuration for Node SID with optional NO-PHP flag (Linux
-  kernel support both mode)
-* Node MSD configuration (with Linux Kernel >= 4.10 a maximum of 32 labels
-  could be stack)
-* Automatic provisioning of MPLS table
-* Static route configuration with label stack up to 32 labels
-
-Interoperability
-----------------
-
-* tested on various topology including point-to-point and LAN interfaces
-  in a mix of Free Range Routing instance and Cisco IOS-XR 6.0.x
-* check OSPF LSA conformity with latest wireshark release 2.5.0-rc
-
-Implementation details
-----------------------
-
-Concepts
-~~~~~~~~
-
-Segment Routing used 3 differents OPAQUE LSA in OSPF to carry the various
-information:
-
-* **Router Information:** flood the Segment Routing capabilities of the node.
-  This include the supported algorithms, the Segment Routing Global Block
-  (SRGB) and the Maximum Stack Depth (MSD).
-* **Extended Link:** flood the Adjaceny and Lan Adjacency Segment Identifier
-* **Extended Prefix:** flood the Prefix Segment Identifier
-
-The implementation follow previous TE and Router Information codes. It used the
-OPAQUE LSA functions defined in ospf_opaque.[c,h] as well as the OSPF API. This
-latter is mandatory for the implementation as it provides the Callback to
-Segment Routing functions (see below) when an Extended Link / Prefix or Router
-Information LSA s are received.
-
-Overview
-~~~~~~~~
-
-Following files where modified or added:
-
-* ospd_ri.[c,h] have been modified to add the new TLVs for Segment Routing.
-* ospf_ext.[c,h] implement RFC7684 as base support of Extended Link and Prefix
-  Opaque LSA.
-* ospf_sr.[c,h] implement the earth of Segment Routing. It adds a new Segment
-  Routing database to manage Segment Identifiers per Link and Prefix and
-  Segment Routing enable node, Callback functions to process incoming LSA and
-  install MPLS FIB entry through Zebra.
-
-The figure below shows the relation between the various files:
-
-* ospf_sr.c centralized all the Segment Routing processing. It receives Opaque
-  LSA Router Information (4.0.0.0) from ospf_ri.c and Extended Prefix
-  (7.0.0.X) Link (8.0.0.X) from ospf_ext.c. Once received, it parse TLVs and
-  SubTLVs and store information in SRDB (which is defined in ospf_sr.h). For
-  each received LSA, NHLFE is computed and send to Zebra to add/remove new
-  MPLS labels entries and FEC. New CLI configurations are also centralized in
-  ospf_sr.c. This CLI will trigger the flooding of new LSA Router Information
-  (4.0.0.0), Extended Prefix (7.0.0.X) and Link (8.0.0.X) by ospf_ri.c,
-  respectively ospf_ext.c.
-* ospf_ri.c send back to ospf_sr.c received Router Information LSA and update
-  Self Router Information LSA with paramters provided by ospf_sr.c i.e. SRGB
-  and MSD. It use ospf_opaque.c functions to send/received these Opaque LSAs.
-* ospf_ext.c send back to ospf_sr.c received Extended Prefix and Link Opaque
-  LSA and send self Extended Prefix and Link Opaque LSA through ospf_opaque.c
-  functions.
-
-::
-
-                    +-----------+     +-------+
-                    |           |     |       |
-                    | ospf_sr.c +-----+  SRDB |
-        +-----------+           +--+  |       |
-        |           +-^-------^-+  |  +-------+
-        |             |   |   |    |
-        |             |   |   |    |
-        |             |   |   |    +--------+
-        |             |   |   |             |
-    +---v----------+  |   |   |       +-----v-------+
-    |              |  |   |   |       |             |
-    | ospf_ri.c    +--+   |   +-------+ ospf_ext.c  |
-    | LSA 4.0.0.0  |      |           | LSA 7.0.0.X |
-    |              |      |           | LSA 8.0.0.X |
-    +---^----------+      |           |             |
-        |                 |           +-----^-------+
-        |                 |                 |
-        |                 |                 |
-        |        +--------v------------+    |
-        |        |                     |    |
-        |        | ZEBRA: Labels + FEC |    |
-        |        |                     |    |
-        |        +---------------------+    |
-        |                                   |
-        |                                   |
-        |         +---------------+         |
-        |         |               |         |
-        +---------> ospf_opaque.c <---------+
-                  |               |
-                  +---------------+
-
-      Figure 1: Overview of Segment Routing interaction
-
-Module interactions
-~~~~~~~~~~~~~~~~~~~
-
-To process incoming LSA, the code is based on the capability to call `hook()`
-functions when LSA are inserted or delete to / from the LSDB and the
-possibility to register particular treatment for Opaque LSA. The first point
-is provided by the OSPF API feature and the second by the Opaque implementation
-itself. Indeed, it is possible to register callback function for a given Opaque
-LSA ID (see `ospf_register_opaque_functab()` function defined in
-`ospf_opaque.c`). Each time a new LSA is added to the LSDB, the
-`new_lsa_hook()` function previously register for this LSA type is called. For
-Opaque LSA it is the `ospf_opaque_lsa_install_hook()`.  For deletion, it is
-`ospf_opaque_lsa_delete_hook()`.
-
-Note that incoming LSA which is already present in the LSDB will be inserted
-after the old instance of this LSA remove from the LSDB. Thus, after the first
-time, each incoming LSA will trigger a `delete` following by an `install`. This
-is not very helpfull to handle real LSA deletion. In fact, LSA deletion is done
-by Flushing LSA i.e. flood LSA after seting its age to MAX_AGE. Then, a garbage
-function has the role to remove all LSA with `age == MAX_AGE` in the LSDB. So,
-to handle LSA Flush, the best is to look to the LSA age to determine if it is
-an installation or a future deletion i.e. the flushed LSA is first store in the
-LSDB with MAX_AGE waiting for the garbage collector function.
-
-Router Information LSAs
-^^^^^^^^^^^^^^^^^^^^^^^
-
-To activate Segment Routing, new CLI command `segment-routing on` has been
-introduced. When this command is activated, function
-`ospf_router_info_update_sr()` is called to indicate to Router Information
-process that Segment Routing TLVs must be flood. Same function is called to
-modify the Segment Routing Global Block (SRGB) and Maximum Stack Depth (MSD)
-TLV. Only Shortest Path First (SPF) Algorithm is supported, so no possiblity
-to modify this TLV is offer by the code.
-
-When Opaque LSA Tyep 4 i.e. Router Information are stored in LSDB, function
-`ospf_opaque_lsa_install_hook()` will call the previously registered function
-`ospf_router_info_lsa_update()`. In turn, the function will simply trigger
-`ospf_sr_ri_lsa_update()` or `ospf_sr_ri_lsa_delete` in function of the LSA
-age. Before, it verifies that the LSA Opaque Type is 4 (Router Information).
-Self Opaque LSA are not send back to the Segment Routing functions as
-information are already stored.
-
-Extended Link Prefix LSAs
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Like for Router Information, Segment Routing is activate at the Extended
-Link/Prefix level with new `segment-routing on` command. This trigger
-automtically the flooding of Extended Link LSA for all ospf interface where
-adjacency is full. For Extended Prefix LSA, the new CLI command
-`segment-routing prefix ...` will trigger the flooding of Prefix SID
-TLV/SubTLVs.
-
-When Opaque LSA Type 7 i.e. Extended Prefix and Type 8 i.e. Extended Link are
-store in the LSDB, `ospf_ext_pref_update_lsa()` respectively
-`ospf_ext_link_update_lsa()` are called like for Router Information LSA. In
-turn, they respectively trigger `ospf_sr_ext_prefix_lsa_update()` /
-`ospf_sr_ext_link_lsa_update()` or `ospf_sr_ext_prefix_lsa_delete()` /
-`ospf_sr_ext_link_lsa_delete()` if the LSA age is equal to MAX_AGE.
-
-Zebra
-^^^^^
-
-When a new MPLS entry or new Forwarding Equivalent Class (FEC) must be added or
-deleted in the data plane, `add_sid_nhlfe()` respectively `del_sid_nhlfe()` are
-called. Once check the validity of labels, they are send to ZEBRA layer through
-`ZEBRA_MPLS_LABELS_ADD` command, respectively `ZEBRA_MPLS_LABELS_DELETE`
-command for deletion. This is completed by a new labelled route through
-`ZEBRA_ROUTE_ADD` command, respectively `ZEBRA_ROUTE_DELETE` command.
-
-Configuration
--------------
-
-Linux Kernel
-~~~~~~~~~~~~
-
-In order to use OSPF Segment Routing, you must setup MPLS data plane. Up to
-know, only Linux Kernel version >= 4.5 is supported.
-
-First, the MPLS modules aren't loaded by default, so you'll need to load them
-yourself:
-
-::
-
-       modprobe mpls_router
-       modprobe mpls_gso
-       modprobe mpls_iptunnel
-
-Then, you must activate MPLS on the interface you would used:
-
-::
-
-       sysctl -w net.mpls.conf.enp0s9.input=1
-       sysctl -w net.mpls.conf.lo.input=1
-       sysctl -w net.mpls.platform_labels=1048575
-
-The last line fix the maximum MPLS label value.
-
-Once OSPFd start with Segment Routing, you could check that MPLS routes are
-enable with:
-
-::
-
-       ip -M route
-       ip route
-
-The first command show the MPLS LFIB table while the second show the FIB
-table which contains route with MPLS label encapsulation.
-
-If you disable Penultimate Hop Popping with the `no-php-flag` (see below), you
-MUST check that RP filter is not enable for the interface you intend to use,
-especially the `lo` one. For that purpose, disable RP filtering with:
-
-::
-
-       systcl -w net.ipv4.conf.all.rp_filter=0
-       sysctl -w net.ipv4.conf.lo.rp_filter=0
-
-OSPFd
-~~~~~
-
-Here it is a simple example of configuration to enable Segment Routing. Note
-that `opaque capability` and `router information` must be set to activate
-Opaque LSA prior to Segment
-Routing.
-
-::
-
-       router ospf
-        ospf router-id 192.168.1.11
-        capability opaque
-         mpls-te on
-         mpls-te router-address 192.168.1.11
-        router-info area 0.0.0.0
-        segment-routing on
-        segment-routing global-block 10000 19999
-        segment-routing node-msd 8
-        segment-routing prefix 192.168.1.11/32 index 1100
-
-The first segment-routing statement enable it. The Second one set the SRGB,
-third line the MSD and finally, set the Prefix SID index for a given prefix.
-Note that only prefix of Loopback interface could be configured with a Prefix
-SID. It is possible to add `no-php-flag` at the end of the prefix command to
-disbale Penultimate Hop Popping. This advertises peers that they MUST NOT pop
-the MPLS label prior to sending the packet.
-
-Known limitations
------------------
-
-* Runs only within default VRF
-* Only single Area is supported. ABR is not yet supported
-* Only SPF algorithm is supported
-* Extended Prefix Range is not supported
-* MPLS table are not flush at startup. Thus, restarting zebra process is
-  mandatory to remove old MPLS entries in the data plane after a crash of
-  ospfd daemon
-* With NO Penultimate Hop Popping, it is not possible to express a Segment
-  Path with an Adjacency SID due to the impossibility for the Linux Kernel to
-  perform double POP instruction.
-
-Credits
--------
-
-* Author: Anselme Sawadogo <anselmesawadogo@gmail.com>
-* Author: Olivier Dugeon <olivier.dugeon@orange.com>
-* Copyright (C) 2016 - 2018 Orange Labs http://www.orange.com
-
-This work has been performed in the framework of the H2020-ICT-2014
-project 5GEx (Grant Agreement no. 671636), which is partially funded
-by the European Commission.
-
-
diff --git a/doc/Useful_Sysctl_Settings.md b/doc/Useful_Sysctl_Settings.md
deleted file mode 100644 (file)
index 4244b5f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# Useful Sysctl Settings
-Sysctl on Linux systems can tweak many useful behaviors. When it comes to a routing protocol suite like FRRouting there are numerous values depending on your use case that make sense to optimize.
-
-The below sysctl values provide a logical set of defaults which can be further optimized.
-
-
-```
-# /etc/sysctl.d/99frr_defaults.conf
-# Place this file at the location above and reload the device.
-# or run the sysctl -p /etc/sysctl.d/99frr_defaults.conf
-  
-# Enables IPv4/IPv6 Routing
-net.ipv4.ip_forward = 1
-net.ipv6.conf.all.forwarding=1
-
-# Routing
-net.ipv6.route.max_size=131072
-net.ipv4.conf.all.ignore_routes_with_linkdown=1
-net.ipv6.conf.all.ignore_routes_with_linkdown=1
-
-# Best Settings for Peering w/ BGP Unnumbered
-#    and OSPF Neighbors
-net.ipv4.conf.all.rp_filter = 0
-net.ipv4.conf.default.rp_filter = 0
-net.ipv4.conf.lo.rp_filter = 0
-net.ipv4.conf.all.forwarding = 1
-net.ipv4.conf.default.forwarding = 1
-net.ipv4.conf.default.arp_announce = 2
-net.ipv4.conf.default.arp_notify = 1
-net.ipv4.conf.default.arp_ignore=1
-net.ipv4.conf.all.arp_announce = 2
-net.ipv4.conf.all.arp_notify = 1
-net.ipv4.conf.all.arp_ignore=1
-net.ipv4.icmp_errors_use_inbound_ifaddr=1
-
-# Miscellaneous Settings
-
-#   Keep ipv6 permanent addresses on an admin down
-net.ipv6.conf.all.keep_addr_on_down=1
-
-# igmp
-net.ipv4.igmp_max_memberships=1000
-net.ipv4.neigh.default.mcast_solicit = 10
-
-# MLD
-net.ipv6.mld_max_msf=512
-
-# Garbage Collection Settings for ARP and Neighbors
-net.ipv4.neigh.default.gc_thresh2=7168
-net.ipv4.neigh.default.gc_thresh3=8192
-net.ipv4.neigh.default.base_reachable_time_ms=14400000
-net.ipv6.neigh.default.gc_thresh2=3584
-net.ipv6.neigh.default.gc_thresh3=4096
-net.ipv6.neigh.default.base_reachable_time_ms=14400000
-
-# Use neigh information on selection of nexthop for multipath hops
-net.ipv4.fib_multipath_use_neigh=1
-
-# Allows Apps to Work with VRF
-net.ipv4.tcp_l3mdev_accept=1
-```
diff --git a/doc/appendix.texi b/doc/appendix.texi
deleted file mode 100644 (file)
index 2e1c9de..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-@node  Packet Binary Dump Format
-@appendix Packet Binary Dump Format
-
-  FRR can dump routing protocol packet into file with a binary format
-(@pxref{Dump BGP packets and table}).
-
-  It seems to be better that we share the MRT's header format for
-backward compatibility with MRT's dump logs. We should also define the
-binary format excluding the header, because we must support both IP
-v4 and v6 addresses as socket addresses and / or routing entries.
-
-  In the last meeting, we discussed to have a version field in the
-header. But Masaki told us that we can define new `type' value rather
-than having a `version' field, and it seems to be better because we
-don't need to change header format.
-
-  Here is the common header format. This is same as that of MRT.
-
-@example
-@group
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                              Time                             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|             Type              |            Subtype            |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                             Length                            |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-  If `type' is PROTOCOL_BGP4MP_ET, the common header format will
-contain an additional microsecond field (RFC6396 2011).
-
-@example
-@group
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                              Time                             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|             Type              |            Subtype            |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                             Length                            |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                          Microsecond                          |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-  If `type' is PROTOCOL_BGP4MP, `subtype' is BGP4MP_STATE_CHANGE, and
-Address Family == IP (version 4)
-
-@example
-@group
- 0                   1                   2                   3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Source AS number       |     Destination AS number     |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Interface Index        |      Address Family           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address                      |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address                    |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|            Old State          |           New State           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-Where State is the value defined in RFC1771.
-
-If `type' is PROTOCOL_BGP4MP, `subtype' is BGP4MP_STATE_CHANGE,
-and Address Family == IP version 6
-
-@example
-@group
- 0                   1                   2                   3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Source AS number       |     Destination AS number     |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Interface Index        |      Address Family           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address                      |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address (Cont'd)             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address (Cont'd)             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address (Cont'd)             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address                    |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address (Cont'd)           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address (Cont'd)           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address (Cont'd)           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|            Old State          |           New State           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-If `type' is PROTOCOL_BGP4MP, `subtype' is BGP4MP_MESSAGE,
-and Address Family == IP (version 4)
-
-@example
-@group
- 0                   1                   2                   3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Source AS number       |     Destination AS number     |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Interface Index        |      Address Family           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address                      |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address                    |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                       BGP Message Packet                      |
-|                                                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-Where BGP Message Packet is the whole contents of the
-BGP4 message including header portion.
-
-If `type' is PROTOCOL_BGP4MP, `subtype' is BGP4MP_MESSAGE,
-and Address Family == IP version 6
-
-@example
-@group
- 0                   1                   2                   3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Source AS number       |     Destination AS number     |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Interface Index        |      Address Family           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address                      |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address (Cont'd)             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address (Cont'd)             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Source IP address (Cont'd)             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address                    |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address (Cont'd)           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address (Cont'd)           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                     Destination IP address (Cont'd)           |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                       BGP Message Packet                      |
-|                                                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-If `type' is PROTOCOL_BGP4MP, `subtype' is BGP4MP_ENTRY,
-and Address Family == IP (version 4)
-
-@example
-@group
- 0                   1                   2                   3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|            View #             |            Status             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Time Last Change                       |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|       Address Family          |    SAFI       | Next-Hop-Len  |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Next Hop Address                       |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Prefix Length |             Address Prefix [variable]         |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|       Attribute Length        |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|      BGP Attribute [variable length]                         |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-If `type' is PROTOCOL_BGP4MP, `subtype' is BGP4MP_ENTRY,
-and Address Family == IP version 6
-
-@example
-@group
- 0                   1                   2                   3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|            View #             |            Status             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Time Last Change                       |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|       Address Family          |    SAFI       | Next-Hop-Len  |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Next Hop Address                       |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Next Hop Address (Cont'd)              |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Next Hop Address (Cont'd)              |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Next Hop Address (Cont'd)              |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Prefix Length |             Address Prefix [variable]         |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|     Address Prefix (cont'd) [variable]        |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|       Attribute Length        |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|      BGP Attribute [variable length]                             |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-       BGP4 Attribute must not contain MP_UNREACH_NLRI.
-       If BGP Attribute has MP_REACH_NLRI field, it must has
-       zero length NLRI, e.g., MP_REACH_NLRI has only Address
-       Family, SAFI and next-hop values.
-
-If `type' is PROTOCOL_BGP4MP and `subtype' is BGP4MP_SNAPSHOT,
-
-@example
-@group
- 0                   1                   2                   3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|           View #              |       File Name [variable]    |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-@end group
-@end example
-
-    The file specified in "File Name" contains all routing entries,
-    which are in the format of ``subtype == BGP4MP_ENTRY''.
-
-@example
-@group
-Constants:
-  /* type value */
-  #define MSG_PROTOCOL_BGP4MP    16
-  #define MSG_PROTOCOL_BGP4MP_ET 17
-  /* subtype value */
-  #define BGP4MP_STATE_CHANGE 0
-  #define BGP4MP_MESSAGE 1
-  #define BGP4MP_ENTRY 2
-  #define BGP4MP_SNAPSHOT 3
-@end group
-@end example
diff --git a/doc/babeld.texi b/doc/babeld.texi
deleted file mode 100644 (file)
index 341f692..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the FRR Manual.
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-@node Babel
-@chapter Babel
-
-Babel is an interior gateway protocol that is suitable both for wired
-networks and for wireless mesh networks.  Babel has been described as
-``RIP on speed'' --- it is based on the same principles as RIP, but
-includes a number of refinements that make it react much faster to
-topology changes without ever counting to infinity, and allow it to
-perform reliable link quality estimation on wireless links.  Babel is
-a double-stack routing protocol, meaning that a single Babel instance
-is able to perform routing for both IPv4 and IPv6.
-
-FRR implements Babel as described in RFC6126.
-
-@menu
-* Configuring babeld::          
-* Babel configuration::         
-* Babel redistribution::        
-* Show Babel information::      
-* Babel debugging commands::    
-@end menu
-
-@node Configuring babeld, Babel configuration, Babel, Babel
-@section Configuring babeld
-
-The @command{babeld} daemon can be invoked with any of the common
-options (@pxref{Common Invocation Options}).
-
-The @command{zebra} daemon must be running before @command{babeld} is
-invoked. Also, if @command{zebra} is restarted then @command{babeld}
-must be too.
-
-Configuration of @command{babeld} is done in its configuration file
-@file{babeld.conf}.
-
-@node Babel configuration, Babel redistribution, Configuring babeld, Babel
-@section Babel configuration
-
-@deffn Command {router babel} {}
-@deffnx Command {no router babel} {}
-Enable or disable Babel routing.
-@end deffn
-
-@deffn Command {babel resend-delay <20-655340>} {}
-Specifies the time after which important messages are resent when
-avoiding a black-hole.  The default is 2000@dmn{ms}.
-@end deffn
-
-@deffn Command {babel diversity} {}
-@deffnx Command {no babel diversity} {}
-Enable or disable routing using radio frequency diversity.  This is
-highly recommended in networks with many wireless nodes.
-
-If you enable this, you will probably want to set @code{babel
-diversity-factor} and @code{babel channel} below.
-@end deffn
-
-@deffn Command {babel diversity-factor <1-256>} {}
-Sets the multiplicative factor used for diversity routing, in units of
-1/256; lower values cause diversity to play a more important role in
-route selection.  The default it 256, which means that diversity plays
-no role in route selection; you will probably want to set that to 128
-or less on nodes with multiple independent radios.
-@end deffn
-
-@deffn {Babel Command} {network @var{ifname}} {}
-@deffnx {Babel Command} {no network @var{ifname}} {}
-Enable or disable Babel on the given interface.
-@end deffn
-
-@deffn {Interface Command} {babel wired} {}
-@deffnx {Interface Command} {babel wireless} {}
-Specifies whether this interface is wireless, which disables a number
-of optimisations that are only correct on wired interfaces.
-Specifying @code{wireless} (the default) is always correct, but may
-cause slower convergence and extra routing traffic.
-@end deffn
-
-@deffn {Interface Command} {babel split-horizon}
-@deffnx {Interface Command} {no babel split-horizon}
-Specifies whether to perform split-horizon on the interface.
-Specifying @code{no babel split-horizon} is always correct, while
-@code{babel split-horizon} is an optimisation that should only be used
-on symmetric and transitive (wired) networks.  The default is
-@code{babel split-horizon} on wired interfaces, and @code{no babel
-split-horizon} on wireless interfaces.  This flag is reset when the
-wired/wireless status of an interface is changed.
-@end deffn
-
-@deffn {Interface Command} {babel hello-interval <20-655340>}
-Specifies the time in milliseconds between two scheduled hellos.  On
-wired links, Babel notices a link failure within two hello intervals;
-on wireless links, the link quality value is reestimated at every
-hello interval.  The default is 4000@dmn{ms}.
-@end deffn
-
-@deffn {Interface Command} {babel update-interval <20-655340>}
-Specifies the time in milliseconds between two scheduled updates.
-Since Babel makes extensive use of triggered updates, this can be set
-to fairly high values on links with little packet loss.  The default
-is 20000@dmn{ms}.
-@end deffn
-
-@deffn {Interface Command} {babel channel <1-254>}
-@deffnx {Interface Command} {babel channel interfering}
-@deffnx {Interface Command} {babel channel noninterfering}
-Set the channel number that diversity routing uses for this interface
-(see @code{babel diversity} above).  Noninterfering interfaces are
-assumed to only interfere with themselves, interfering interfaces are
-assumed to interfere with all other channels except noninterfering
-channels, and interfaces with a channel number interfere with
-interfering interfaces and interfaces with the same channel number.
-The default is @samp{babel channel interfering} for wireless
-interfaces, and @samp{babel channel noninterfering} for wired
-interfaces.  This is reset when the wired/wireless status of an
-interface is changed.
-@end deffn
-
-@deffn {Interface Command} {babel rxcost <1-65534>}
-Specifies the base receive cost for this interface.  For wireless
-interfaces, it specifies the multiplier used for computing the ETX
-reception cost (default 256); for wired interfaces, it specifies the
-cost that will be advertised to neighbours.  This value is reset when
-the wired/wireless attribute of the interface is changed.
-
-Do not use this command unless you know what you are doing; in most
-networks, acting directly on the cost using route maps is a better
-technique.
-@end deffn
-
-@deffn {Interface Command} {babel rtt-decay <1-256>}
-This specifies the decay factor for the exponential moving average of
-RTT samples, in units of 1/256.  Higher values discard old samples
-faster.  The default is 42.
-@end deffn
-
-@deffn {Interface Command} {babel rtt-min <1-65535>}
-This specifies the minimum RTT, in milliseconds, starting from which we
-increase the cost to a neighbour. The additional cost is linear in (rtt
-- rtt-min ).  The default is 10@dmn{ms}.
-@end deffn
-
-@deffn {Interface Command} {babel rtt-max <1-65535>}
-This specifies the maximum RTT, in milliseconds, above which we don't
-increase the cost to a neighbour. The default is 120@dmn{ms}.
-@end deffn
-
-@deffn {Interface Command} {babel max-rtt-penalty <0-65535>}
-This specifies the maximum cost added to a neighbour because of RTT,
-i.e. when the RTT is higher or equal than rtt-max.  The default is 0,
-which effectively disables the use of a RTT-based cost.
-@end deffn
-
-@deffn {Interface Command} {babel enable-timestamps}
-@deffnx {Interface Command} {no babel enable-timestamps}
-Enable or disable sending timestamps with each Hello and IHU message in
-order to compute RTT values.  The default is @code{no babel
-enable-timestamps}.
-@end deffn
-
-@deffn {Babel Command} {babel resend-delay <20-655340>}
-Specifies the time in milliseconds after which an ``important''
-request or update will be resent.  The default is 2000@dmn{ms}.  You
-probably don't want to tweak this value.
-@end deffn
-
-@deffn {Babel Command} {babel smoothing-half-life <0-65534>}
-Specifies the time constant, in seconds, of the smoothing algorithm
-used for implementing hysteresis.  Larger values reduce route
-oscillation at the cost of very slightly increasing convergence time.
-The value 0 disables hysteresis, and is suitable for wired networks.
-The default is 4@dmn{s}.
-@end deffn
-
-@node Babel redistribution, Show Babel information, Babel configuration, Babel
-@section Babel redistribution
-
-@deffn {Babel command} {redistribute @var{<ipv4|ipv6>} @var{kind}}
-@deffnx {Babel command} {no redistribute @var{<ipv4|ipv6>} @var{kind}}
-Specify which kind of routes should be redistributed into Babel.
-@end deffn
-
-@node Show Babel information, Babel debugging commands, Babel redistribution, Babel
-@section Show Babel information
-
-@deffn {Command} {show babel route} {}
-@deffnx {Command} {show babel route A.B.C.D}
-@deffnx {Command} {show babel route X:X::X:X}
-@deffnx {Command} {show babel route A.B.C.D/M}
-@deffnx {Command} {show babel route X:X::X:X/M}
-@deffnx {Command} {show babel interface} {}
-@deffnx {Command} {show babel interface @var{ifname}} {}
-@deffnx {Command} {show babel neighbor} {}
-@deffnx {Command} {show babel parameters} {}
-These commands dump various parts of @command{babeld}'s internal state.
-@end deffn
-
-@node Babel debugging commands,  , Show Babel information, Babel
-@section Babel debugging commands
-
-@deffn {Babel Command} {debug babel @var{kind}} {}
-@deffnx {Babel Command} {no debug babel @var{kind}} {}
-Enable or disable debugging messages of a given kind.  @var{kind} can
-be one of @samp{common}, @samp{kernel}, @samp{filter}, @samp{timeout},
-@samp{interface}, @samp{route} or @samp{all}.  Note that if you have
-compiled with the NO_DEBUG flag, then these commands aren't available.
-@end deffn
-
diff --git a/doc/basic.texi b/doc/basic.texi
deleted file mode 100644 (file)
index 6e43210..0000000
+++ /dev/null
@@ -1,642 +0,0 @@
-@node Basic commands
-@chapter Basic commands
-
-There are five routing daemons in use, and there is one manager daemon.
-These daemons may be located on separate machines from the manager
-daemon.  Each of these daemons will listen on a particular port for
-incoming VTY connections.  The routing daemons are:
-
-@itemize @bullet
-@item @command{ripd}, @command{ripngd}, @command{ospfd}, @command{ospf6d}, @command{bgpd}
-@item @command{zebra}
-@end itemize
-
-The following sections discuss commands common to all the routing
-daemons.
-
-@menu
-* Config Commands::             Commands used in config files
-* Terminal Mode Commands::      Common commands used in a VTY
-* Common Invocation Options::   Starting the daemons
-* Loadable Module Support::     Using extension modules
-* Virtual Terminal Interfaces:: Interacting with the daemons
-@end menu
-
-
-
-@node Config Commands
-@section Config Commands
-
-@cindex Configuration files for running the software
-@c A -not configuration files for installing the software
-@cindex Files for running configurations
-@cindex Modifying the herd's behavior
-@cindex Getting the herd running
-
-
-@menu
-* Basic Config Commands::       Some of the generic config commands
-* Sample Config File::          An example config file
-@end menu
-
-
-In a config file, you can write the debugging options, a vty's password,
-routing daemon configurations, a log file name, and so forth. This
-information forms the initial command set for a routing beast as it is
-starting.
-
-Config files are generally found in:
-
-@itemize @w{}
-@item @file{@value{INSTALL_PREFIX_ETC}/*.conf}
-@end itemize
-
-Each of the daemons has its own
-config file.  For example, zebra's default config file name is:
-
-@itemize @w{}
-@item @file{@value{INSTALL_PREFIX_ETC}/zebra.conf}
-@end itemize
-
-The daemon name plus @file{.conf} is the default config file name. You
-can specify a config file using the @kbd{-f} or @kbd{--config-file}
-options when starting the daemon.
-
-
-
-@node Basic Config Commands
-@subsection Basic Config Commands
-
-@deffn Command {hostname @var{hostname}} {}
-Set hostname of the router.
-@end deffn
-
-@deffn Command {password @var{password}} {}
-Set password for vty interface.  If there is no password, a vty won't
-accept connections.
-@end deffn
-
-@deffn Command {enable password @var{password}} {}
-Set enable password.
-@end deffn
-
-@deffn Command {log trap @var{level}} {}
-@deffnx Command {no log trap} {}
-These commands are deprecated and are present only for historical compatibility.
-The log trap command sets the current logging level for all enabled
-logging destinations, and it sets the default for all future logging commands
-that do not specify a level.  The normal default
-logging level is debugging.  The @code{no} form of the command resets
-the default level for future logging commands to debugging, but it does
-not change the logging level of existing logging destinations.
-@end deffn
-
-
-@deffn Command {log stdout} {}
-@deffnx Command {log stdout @var{level}} {}
-@deffnx Command {no log stdout} {}
-Enable logging output to stdout. 
-If the optional second argument specifying the
-logging level is not present, the default logging level (typically debugging,
-but can be changed using the deprecated @code{log trap} command) will be used.
-The @code{no} form of the command disables logging to stdout.
-The @code{level} argument must have one of these values: 
-emergencies, alerts, critical, errors, warnings, notifications, informational, or debugging.  Note that the existing code logs its most important messages
-with severity @code{errors}.
-@end deffn
-
-@deffn Command {log file @var{filename}} {}
-@deffnx Command {log file @var{filename} @var{level}} {}
-@deffnx Command {no log file} {}
-If you want to log into a file, please specify @code{filename} as
-in this example:
-@example
-log file /var/log/frr/bgpd.log informational
-@end example
-If the optional second argument specifying the
-logging level is not present, the default logging level (typically debugging,
-but can be changed using the deprecated @code{log trap} command) will be used.
-The @code{no} form of the command disables logging to a file.
-
-Note: if you do not configure any file logging, and a daemon crashes due
-to a signal or an assertion failure, it will attempt to save the crash
-information in a file named /var/tmp/frr.<daemon name>.crashlog.
-For security reasons, this will not happen if the file exists already, so
-it is important to delete the file after reporting the crash information.
-@end deffn
-
-@deffn Command {log syslog} {}
-@deffnx Command {log syslog @var{level}} {}
-@deffnx Command {no log syslog} {}
-Enable logging output to syslog.
-If the optional second argument specifying the
-logging level is not present, the default logging level (typically debugging,
-but can be changed using the deprecated @code{log trap} command) will be used.
-The @code{no} form of the command disables logging to syslog.
-@end deffn
-
-@deffn Command {log monitor} {}
-@deffnx Command {log monitor @var{level}} {}
-@deffnx Command {no log monitor} {}
-Enable logging output to vty terminals that have enabled logging
-using the @code{terminal monitor} command.
-By default, monitor logging is enabled at the debugging level, but this
-command (or the deprecated @code{log trap} command) can be used to change 
-the monitor logging level.
-If the optional second argument specifying the
-logging level is not present, the default logging level (typically debugging,
-but can be changed using the deprecated @code{log trap} command) will be used.
-The @code{no} form of the command disables logging to terminal monitors.
-@end deffn
-
-@deffn Command {log facility @var{facility}} {}
-@deffnx Command {no log facility} {}
-This command changes the facility used in syslog messages.  The default
-facility is @code{daemon}.  The @code{no} form of the command resets
-the facility to the default @code{daemon} facility.
-@end deffn
-
-@deffn Command {log record-priority} {}
-@deffnx Command {no log record-priority} {}
-To include the severity in all messages logged to a file, to stdout, or to
-a terminal monitor (i.e. anything except syslog),
-use the @code{log record-priority} global configuration command.
-To disable this option, use the @code{no} form of the command.  By default,
-the severity level is not included in logged messages.  Note: some
-versions of syslogd (including Solaris) can be configured to include
-the facility and level in the messages emitted.
-@end deffn
-
-@deffn Command {log timestamp precision @var{<0-6>}} {}
-@deffnx Command {no log timestamp precision} {}
-This command sets the precision of log message timestamps to the
-given number of digits after the decimal point.  Currently,
-the value must be in the range 0 to 6 (i.e. the maximum precision
-is microseconds).
-To restore the default behavior (1-second accuracy), use the
-@code{no} form of the command, or set the precision explicitly to 0.
-
-@example
-@group
-log timestamp precision 3
-@end group
-@end example
-
-In this example, the precision is set to provide timestamps with
-millisecond accuracy.
-@end deffn
-
-@deffn Command {log commands} {}
-This command enables the logging of all commands typed by a user to
-all enabled log destinations.  The note that logging includes full
-command lines, including passwords.  Once set, command logging can only
-be turned off by restarting the daemon.
-@end deffn  
-
-@deffn Command {service password-encryption} {}
-Encrypt password.
-@end deffn
-
-@deffn Command {service advanced-vty} {}
-Enable advanced mode VTY.
-@end deffn
-
-@deffn Command {service terminal-length @var{<0-512>}} {}
-Set system wide line configuration.  This configuration command applies
-to all VTY interfaces.
-@end deffn
-
-@deffn Command {line vty} {}
-Enter vty configuration mode.
-@end deffn
-
-@deffn Command {banner motd default} {}
-Set default motd string.
-@end deffn
-
-@deffn Command {no banner motd} {}
-No motd banner string will be printed.
-@end deffn
-
-@deffn {Line Command} {exec-timeout @var{minute}} {}
-@deffnx {Line Command} {exec-timeout @var{minute} @var{second}} {}
-Set VTY connection timeout value.  When only one argument is specified
-it is used for timeout value in minutes.  Optional second argument is
-used for timeout value in seconds. Default timeout value is 10 minutes.
-When timeout value is zero, it means no timeout.
-@end deffn
-
-@deffn {Line Command} {no exec-timeout} {}
-Do not perform timeout at all.  This command is as same as
-@command{exec-timeout 0 0}.
-@end deffn
-
-@deffn {Line Command} {access-class @var{access-list}} {}
-Restrict vty connections with an access list.
-@end deffn
-
-@node Sample Config File
-@subsection Sample Config File
-
-
-Below is a sample configuration file for the zebra daemon.
-
-@example
-@group
-!
-! Zebra configuration file
-!
-hostname Router
-password zebra
-enable password zebra
-!
-log stdout
-!
-!
-@end group
-@end example
-
-'!' and '#' are comment characters.  If the first character of the word
-is one of the comment characters then from the rest of the line forward
-will be ignored as a comment.
-
-@example
-password zebra!password
-@end example
-
-If a comment character is not the first character of the word, it's a
-normal character. So in the above example '!' will not be regarded as a
-comment and the password is set to 'zebra!password'.
-
-
-
-@node Terminal Mode Commands
-@section Terminal Mode Commands
-
-@deffn Command {write terminal} {}
-Displays the current configuration to the vty interface.
-@end deffn
-
-@deffn Command {write file} {}
-Write current configuration to configuration file.
-@end deffn
-
-@deffn Command {configure terminal} {}
-Change to configuration mode.  This command is the first step to
-configuration.
-@end deffn
-
-@deffn Command {terminal length @var{<0-512>}} {}
-Set terminal display length to @var{<0-512>}.  If length is 0, no
-display control is performed.
-@end deffn
-
-@deffn Command {who} {}
-Show a list of currently connected vty sessions.
-@end deffn
-
-@deffn Command {list} {}
-List all available commands.
-@end deffn
-
-@deffn Command {show version} {}
-Show the current version of @value{PACKAGE_NAME} and its build host information.
-@end deffn
-
-@deffn Command {show logging} {}
-Shows the current configuration of the logging system.  This includes
-the status of all logging destinations.
-@end deffn
-
-@deffn Command {logmsg @var{level} @var{message}} {}
-Send a message to all logging destinations that are enabled for messages
-of the given severity.
-@end deffn
-
-
-
-
-@node Common Invocation Options
-@section Common Invocation Options
-@c COMMON_OPTIONS
-@c OPTIONS section of the man page
-
-These options apply to all @value{PACKAGE_NAME} daemons.
-
-@table @samp
-
-@item -d
-@itemx --daemon
-Runs in daemon mode.
-
-@item -f @var{file}
-@itemx --config_file=@var{file}
-Set configuration file name.
-
-@item -h
-@itemx --help
-Display this help and exit.
-
-@item -i @var{file}
-@itemx --pid_file=@var{file}
-
-Upon startup the process identifier of the daemon is written to a file,
-typically in @file{/var/run}.  This file can be used by the init system
-to implement commands such as @command{@dots{}/init.d/zebra status},
-@command{@dots{}/init.d/zebra restart} or @command{@dots{}/init.d/zebra
-stop}.
-
-The file name is an run-time option rather than a configure-time option
-so that multiple routing daemons can be run simultaneously.  This is
-useful when using @value{PACKAGE_NAME} to implement a routing looking glass.  One
-machine can be used to collect differing routing views from differing
-points in the network.
-
-@item -A @var{address}
-@itemx --vty_addr=@var{address}
-Set the VTY local address to bind to. If set, the VTY socket will only
-be bound to this address. 
-
-@item -P @var{port}
-@itemx --vty_port=@var{port}
-Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not
-be opened.
-
-@item -u @var{user}
-@itemx --vty_addr=@var{user}
-Set the user and group to run as.
-
-@item -v
-@itemx --version
-Print program version.
-
-@end table
-
-
-@node Loadable Module Support
-@section Loadable Module Support
-
-FRR supports loading extension modules at startup.  Loading, reloading or
-unloading modules at runtime is not supported (yet).  To load a module, use
-the following command line option at daemon startup:
-
-@table @samp
-@item -M @var{module:options}
-@itemx --module @var{module:options}
-
-Load the specified module, optionally passing options to it.  If the module
-name contains a slash (/), it is assumed to be a full pathname to a file to
-be loaded.  If it does not contain a slash, the
-@code{@value{INSTALL_PREFIX_MODULES}} directory is searched for a module of
-the given name; first with the daemon name prepended (e.g. @code{zebra_mod}
-for @code{mod}), then without the daemon name prepended.
-
-This option is available on all daemons, though some daemons may not have
-any modules available to be loaded.
-@end table
-
-
-@subsection The SNMP Module
-
-If SNMP is enabled during compile-time and installed as part of the package,
-the @code{snmp} module can be loaded for the @command{zebra},
-@command{bgpd}, @command{ospfd}, @command{ospf6d} and @command{ripd} daemons.
-
-The module ignores any options passed to it.  Refer to @ref{SNMP Support}
-for information on its usage.
-
-
-@subsection The FPM Module
-
-If FPM is enabled during compile-time and installed as part of the package,
-the @code{fpm} module can be loaded for the @command{zebra} daemon.  This
-provides the Forwarding Plane Manager ("FPM") API.
-
-The module expects its argument to be either @code{netlink} or
-@code{protobuf}, specifying the encapsulation to use.  @code{netlink} is the
-default, and @code{protobuf} may not be available if the module was built
-without protobuf support.  Refer to @ref{zebra FIB push interface} for more
-information.
-
-
-@node Virtual Terminal Interfaces
-@section Virtual Terminal Interfaces
-
-VTY -- Virtual Terminal [aka TeletYpe] Interface is a command line
-interface (CLI) for user interaction with the routing daemon.
-
-@menu
-* VTY Overview::                Basics about VTYs                
-* VTY Modes::                   View, Enable, and Other VTY modes
-* VTY CLI Commands::            Commands for movement, edition, and management
-@end menu
-
-
-
-@node VTY Overview
-@subsection VTY Overview
-
-
-VTY stands for Virtual TeletYpe interface.  It means you can connect to
-the daemon via the telnet protocol.
-
-To enable a VTY interface, you have to setup a VTY password.  If there
-is no VTY password, one cannot connect to the VTY interface at all.
-
-@example
-@group
-% telnet localhost 2601
-Trying 127.0.0.1...
-Connected to localhost.
-Escape character is '^]'.
-
-Hello, this is @value{PACKAGE_NAME} (version @value{PACKAGE_VERSION})
-@value{COPYRIGHT_STR}
-
-User Access Verification
-
-Password: XXXXX
-Router> ?
-  enable            Turn on privileged commands
-  exit              Exit current mode and down to previous mode
-  help              Description of the interactive help system
-  list              Print command list
-  show              Show running system information
-  who               Display who is on a vty
-Router> enable
-Password: XXXXX
-Router# configure terminal
-Router(config)# interface eth0
-Router(config-if)# ip address 10.0.0.1/8
-Router(config-if)# ^Z
-Router#
-@end group
-@end example
-
-'?' is very useful for looking up commands.
-
-@node VTY Modes
-@subsection VTY Modes
-
-There are three basic VTY modes:
-
-@menu
-* VTY View Mode::               Mode for read-only interaction               
-* VTY Enable Mode::             Mode for read-write interaction
-* VTY Other Modes::             Special modes (tftp, etc)
-@end menu
-
-There are commands that may be restricted to specific VTY modes. 
-
-@node VTY View Mode
-@subsubsection VTY View Mode
-@c to be written (gpoul)
-
-
-This mode is for read-only access to the CLI. One may exit the mode by
-leaving the system, or by entering @code{enable} mode.
-
-@node VTY Enable Mode
-@subsubsection VTY Enable Mode
-
-@c to be written (gpoul)
-This mode is for read-write access to the CLI. One may exit the mode by
-leaving the system, or by escaping to view mode.
-
-@node VTY Other Modes
-@subsubsection VTY Other Modes
-
-
-@c to be written (gpoul)
-This page is for describing other modes.
-
-@node VTY CLI Commands
-@subsection VTY CLI Commands
-
-Commands that you may use at the command-line are described in the following
-three subsubsections.
-
-@menu
-* CLI Movement Commands::       Commands for moving the cursor about
-* CLI Editing Commands::        Commands for changing text
-* CLI Advanced Commands::       Other commands, session management and so on
-@end menu
-
-@node CLI Movement Commands
-@subsubsection CLI Movement Commands
-
-These commands are used for moving the CLI cursor. The @key{C} character
-means press the Control Key.
-
-@table @kbd
-
-@item C-f
-@itemx @key{RIGHT}
-@kindex C-f
-@kindex @key{RIGHT}
-Move forward one character.
-
-@item C-b
-@itemx @key{LEFT}
-@kindex C-b
-@kindex @key{LEFT}
-Move backward one character.
-
-@item M-f
-@kindex M-f
-Move forward one word.
-
-@item M-b
-@kindex M-b
-Move backward one word.
-
-@item C-a
-@kindex C-a
-Move to the beginning of the line.
-
-@item C-e
-@kindex C-e
-Move to the end of the line.
-
-@end table
-
-@node CLI Editing Commands
-@subsubsection CLI Editing Commands
-
-These commands are used for editing text on a line. The @key{C}
-character means press the Control Key.
-
-@table @kbd
-
-@item C-h
-@itemx @key{DEL}
-@kindex C-h
-@kindex @key{DEL}
-Delete the character before point.
-
-@item C-d
-@kindex C-d
-Delete the character after point.
-
-@item M-d
-@kindex M-d
-Forward kill word.
-
-@item C-w
-@kindex C-w
-Backward kill word.
-
-@item C-k
-@kindex C-k
-Kill to the end of the line.
-
-@item C-u
-@kindex C-u
-Kill line from the beginning, erasing input.
-
-@item C-t
-@kindex C-t
-Transpose character.
-
-@end table
-
-@node CLI Advanced Commands
-@subsubsection CLI Advanced Commands
-
-There are several additional CLI commands for command line completions,
-insta-help, and VTY session management.
-
-@table @kbd
-
-@item C-c
-@kindex C-c
-Interrupt current input and moves to the next line.
-
-@item C-z
-@kindex C-z
-End current configuration session and move to top node.
-
-
-@item C-n
-@itemx @key{DOWN}
-@kindex C-n
-@kindex @key{DOWN}
-Move down to next line in the history buffer.
-
-@item C-p
-@itemx @key{UP}
-@kindex C-p
-@kindex @key{UP}
-Move up to previous line in the history buffer.
-
-@item TAB
-@kindex @key{TAB}
-Use command line completion by typing @key{TAB}.
-
-@item ?
-@kindex @key{?}
-You can use command line help by typing @code{help} at the beginning of
-the line.  Typing @kbd{?} at any point in the line will show possible
-completions.
-
-@end table
diff --git a/doc/bgpd.8.in b/doc/bgpd.8.in
deleted file mode 100644 (file)
index 0df1b1d..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH BGPD 8 "25 November 2004" "@PACKAGE_FULLNAME@ BGPD daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-bgpd \- a BGPv4, BGPv4\+, BGPv4\- routing engine for use with @PACKAGE_FULLNAME@.
-
-.SH SYNOPSIS
-.B bgpd
-[
-.B \-dhrSv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-p
-.I bgp-port-number
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B bgpd 
-is a routing component that works with the 
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B bgpd
-command:
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR 
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/bgpd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When bgpd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart bgpd.  The default is \fB\fI@CFG_STATE@/bgpd.pid\fR.
-.TP
-\fB\-p\fR, \fB\-\-bgp_port \fR\fIbgp-port-number\fR
-Set the port that bgpd will listen to for bgp data.  
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the bgpd VTY will listen on. This defaults to
-2605, as specified in \fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the bgpd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-r\fR, \fB\-\-retain\fR 
-When the program terminates, retain routes added by \fBbgpd\fR.
-.TP
-\fB\-S\fR, \fB\-\-skip_runas\fR
-Skip setting the process effective user and group.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-The \fBsnmp\fR module may be available for
-\fBbgpd\fR, if the package was built with SNMP support.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/bgpd
-The default location of the 
-.B bgpd
-binary.
-.TP
-.BI @CFG_SYSCONF@/bgpd.conf
-The default location of the 
-.B bgpd
-config file.
-.TP
-.BI $(PWD)/bgpd.log 
-If the 
-.B bgpd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBbgpd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The bgpd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBbgpd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR nhrpd (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-.B bgpd
-eats bugs for breakfast. If you have food for the maintainers try 
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/doc/bgpd.texi b/doc/bgpd.texi
deleted file mode 100644 (file)
index 83483f5..0000000
+++ /dev/null
@@ -1,2142 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the Frr Manual.
-@c @value{COPYRIGHT_STR}
-@c Portions: 
-@c   Copyright @copyright{} 2015 Hewlett Packard Enterprise Development LP
-@c See file frr.texi for copying conditions.
-@node BGP
-@chapter BGP
-
-@acronym{BGP} stands for a Border Gateway Protocol.  The lastest BGP version
-is 4.  It is referred as BGP-4.  BGP-4 is one of the Exterior Gateway
-Protocols and de-fact standard of Inter Domain routing protocol.
-BGP-4 is described in @cite{RFC1771, A Border Gateway Protocol
-4 (BGP-4)}.
-
-Many extensions have been added to @cite{RFC1771}.  @cite{RFC2858,
-Multiprotocol Extensions for BGP-4} provides multiprotocol support to
-BGP-4.
-
-@menu
-* Starting BGP::                
-* BGP router::                  
-* BGP MED::
-* BGP network::                 
-* BGP Peer::                    
-* BGP Peer Group::              
-* BGP Address Family::          
-* Autonomous System::           
-* BGP Communities Attribute::   
-* BGP Extended Communities Attribute::  
-* BGP Large Communities Attribute::  
-* Displaying BGP information::       
-* Capability Negotiation::      
-* Route Reflector::             
-* Route Server::                
-* BGP Regular Expressions::  
-* How to set up a 6-Bone connection::  
-* Dump BGP packets and table::  
-* BGP Configuration Examples::
-* Prefix Origin Validation Using RPKI::
-@end menu
-
-@node Starting BGP
-@section Starting BGP
-
-Default configuration file of @command{bgpd} is @file{bgpd.conf}.
-@command{bgpd} searches the current directory first then
-@value{INSTALL_PREFIX_ETC}/bgpd.conf.  All of bgpd's command must be
-configured in @file{bgpd.conf}.
-
-@command{bgpd} specific invocation options are described below.  Common
-options may also be specified (@pxref{Common Invocation Options}).
-
-@table @samp
-@item -p @var{PORT}
-@itemx --bgp_port=@var{PORT}
-Set the bgp protocol's port number.
-
-@item -r
-@itemx --retain
-When program terminates, retain BGP routes added by zebra.
-
-@item -l
-@itemx --listenon
-Specify a specific IP address for bgpd to listen on, rather than its 
-default of INADDR_ANY / IN6ADDR_ANY. This can be useful to constrain bgpd
-to an internal address, or to run multiple bgpd processes on one host.
-
-@end table
-
-@node BGP router
-@section BGP router
-
-  First of all you must configure BGP router with @command{router bgp}
-command.  To configure BGP router, you need AS number.  AS number is an
-identification of autonomous system.  BGP protocol uses the AS number
-for detecting whether the BGP connection is internal one or external one.
-
-@deffn Command {router bgp @var{asn}} {}
-Enable a BGP protocol process with the specified @var{asn}.  After
-this statement you can input any @code{BGP Commands}.  You can not
-create different BGP process under different @var{asn} without
-specifying @code{multiple-instance} (@pxref{Multiple instance}).
-@end deffn
-
-@deffn Command {no router bgp @var{asn}} {}
-Destroy a BGP protocol process with the specified @var{asn}.
-@end deffn
-
-@deffn {BGP} {bgp router-id @var{A.B.C.D}} {}
-This command specifies the router-ID.  If @command{bgpd} connects to @command{zebra} it gets
-interface and address information.  In that case default router ID value
-is selected as the largest IP Address of the interfaces.  When
-@code{router zebra} is not enabled @command{bgpd} can't get interface information
-so @code{router-id} is set to 0.0.0.0.  So please set router-id by hand.
-@end deffn
-
-@menu
-* BGP distance::                
-* BGP decision process::        
-* BGP route flap dampening::      
-@end menu
-
-@node BGP distance
-@subsection BGP distance
-
-@deffn {BGP} {distance bgp <1-255> <1-255> <1-255>} {}
-This command change distance value of BGP.  Each argument is distance
-value for external routes, internal routes and local routes.
-@end deffn
-
-@deffn {BGP} {distance <1-255> @var{A.B.C.D/M}} {}
-@deffnx {BGP} {distance <1-255> @var{A.B.C.D/M} @var{word}} {}
-This command set distance value to 
-@end deffn
-
-@node BGP decision process
-@subsection BGP decision process
-
-The decision process Frr BGP uses to select routes is as follows:
-
-@table @asis
-@item 1. Weight check
-prefer higher local weight routes to lower routes.
-  
-@item 2. Local preference check
-prefer higher local preference routes to lower.
-
-@item 3. Local route check
-Prefer local routes (statics, aggregates, redistributed) to received routes.
-
-@item 4. AS path length check
-Prefer shortest hop-count AS_PATHs. 
-
-@item 5. Origin check
-Prefer the lowest origin type route.  That is, prefer IGP origin routes to
-EGP, to Incomplete routes. 
-
-@item 6. MED check
-Where routes with a MED were received from the same AS,
-prefer the route with the lowest MED. @xref{BGP MED}.
-
-@item 7. External check
-Prefer the route received from an external, eBGP peer
-over routes received from other types of peers.
-
-@item 8. IGP cost check
-Prefer the route with the lower IGP cost.
-
-@item 9. Multi-path check
-If multi-pathing is enabled, then check whether
-the routes not yet distinguished in preference may be considered equal. If
-@ref{bgp bestpath as-path multipath-relax} is set, all such routes are
-considered equal, otherwise routes received via iBGP with identical AS_PATHs
-or routes received from eBGP neighbours in the same AS are considered equal.
-
-@item 10 Already-selected external check
-
-Where both routes were received from eBGP peers, then prefer the route which
-is already selected.  Note that this check is not applied if @ref{bgp
-bestpath compare-routerid} is configured.  This check can prevent some cases
-of oscillation.
-
-@item 11. Router-ID check
-Prefer the route with the lowest @w{router-ID}.  If the
-route has an @w{ORIGINATOR_ID} attribute, through iBGP reflection, then that
-router ID is used, otherwise the @w{router-ID} of the peer the route was
-received from is used.
-
-@item 12. Cluster-List length check
-The route with the shortest cluster-list
-length is used.  The cluster-list reflects the iBGP reflection path the
-route has taken.
-
-@item 13. Peer address
-Prefer the route received from the peer with the higher
-transport layer address, as a last-resort tie-breaker.
-
-@end table
-
-@deffn {BGP} {bgp bestpath as-path confed} {}
-This command specifies that the length of confederation path sets and
-sequences should should be taken into account during the BGP best path
-decision process.
-@end deffn
-
-@deffn {BGP} {bgp bestpath as-path multipath-relax} {}
-@anchor{bgp bestpath as-path multipath-relax}
-This command specifies that BGP decision process should consider paths
-of equal AS_PATH length candidates for multipath computation. Without
-the knob, the entire AS_PATH must match for multipath computation.
-@end deffn
-
-@deffn {BGP} {bgp bestpath compare-routerid} {}
-@anchor{bgp bestpath compare-routerid}
-
-Ensure that when comparing routes where both are equal on most metrics,
-including local-pref, AS_PATH length, IGP cost, MED, that the tie is broken
-based on router-ID.
-
-If this option is enabled, then the already-selected check, where
-already selected eBGP routes are preferred, is skipped.
-
-If a route has an @w{ORIGINATOR_ID} attribute because it has been reflected,
-that @w{ORIGINATOR_ID} will be used.  Otherwise, the router-ID of the peer the
-route was received from will be used.
-
-The advantage of this is that the route-selection (at this point) will be
-more deterministic.  The disadvantage is that a few or even one lowest-ID
-router may attract all trafic to otherwise-equal paths because of this
-check.  It may increase the possibility of MED or IGP oscillation, unless
-other measures were taken to avoid these.  The exact behaviour will be
-sensitive to the iBGP and reflection topology.
-
-@end deffn
-
-
-@node BGP route flap dampening
-@subsection BGP route flap dampening
-
-@deffn {BGP} {bgp dampening @var{<1-45>} @var{<1-20000>} @var{<1-20000>} @var{<1-255>}} {}
-This command enables BGP route-flap dampening and specifies dampening parameters.
-
-@table @asis
-@item @asis{half-life}
-Half-life time for the penalty
-@item @asis{reuse-threshold}
-Value to start reusing a route
-@item @asis{suppress-threshold}
-Value to start suppressing a route
-@item @asis{max-suppress}
-Maximum duration to suppress a stable route
-@end table
-
-The route-flap damping algorithm is compatible with @cite{RFC2439}. The use of this command
-is not recommended nowadays, see @uref{http://www.ripe.net/ripe/docs/ripe-378,,RIPE-378}.
-@end deffn
-
-@node BGP MED
-@section BGP MED
-
-The BGP MED (Multi_Exit_Discriminator) attribute has properties which can
-cause subtle convergence problems in BGP.  These properties and problems
-have proven to be hard to understand, at least historically, and may still
-not be widely understood.  The following attempts to collect together and
-present what is known about MED, to help operators and Frr users in
-designing and configuring their networks.
-
-The BGP @acronym{MED, Multi_Exit_Discriminator} attribute is intended to
-allow one AS to indicate its preferences for its ingress points to another
-AS.  The MED attribute will not be propagated on to another AS by the
-receiving AS - it is `non-transitive' in the BGP sense.
-
-E.g., if AS X and AS Y have 2 different BGP peering points, then AS X
-might set a MED of 100 on routes advertised at one and a MED of 200 at the
-other.  When AS Y selects between otherwise equal routes to or via
-AS X, AS Y should prefer to take the path via the lower MED peering of 100 with
-AS X.  Setting the MED allows an AS to influence the routing taken to it
-within another, neighbouring AS.
-
-In this use of MED it is not really meaningful to compare the MED value on
-routes where the next AS on the paths differs.  E.g., if AS Y also had a
-route for some destination via AS Z in addition to the routes from AS X, and
-AS Z had also set a MED, it wouldn't make sense for AS Y to compare AS Z's
-MED values to those of AS X.  The MED values have been set by different
-administrators, with different frames of reference.
-
-The default behaviour of BGP therefore is to not compare MED values across
-routes received from different neighbouring ASes.  In Frr this is done by
-comparing the neighbouring, left-most AS in the received AS_PATHs of the
-routes and only comparing MED if those are the same.
-
-@c TeXInfo uses the old, non-UTF-8 capable, pdftex, and so 
-@c doesn't render TeX the unicode precedes character correctly in PDF, etc.
-@c Using a TeX code on the other hand doesn't work for non-TeX outputs
-@c (plaintext, e.g.). So, use an output-conditional macro.
-
-@iftex
-@macro mprec{}
-@math{\\prec}
-@end macro
-@end iftex
-
-@ifnottex
-@macro mprec{}
-@math{≺}
-@end macro
-@end ifnottex
-
-Unfortunately, this behaviour of MED, of sometimes being compared across
-routes and sometimes not, depending on the properties of those other routes,
-means MED can cause the order of preference over all the routes to be
-undefined.  That is, given routes A, B, and C, if A is preferred to B, and B
-is preferred to C, then a well-defined order should mean the preference is
-transitive (in the sense of orders @footnote{For some set of objects to have
-an order, there @emph{must} be some binary ordering relation that is defined
-for @emph{every} combination of those objects, and that relation @emph{must}
-be transitive.  I.e.@:, if the relation operator is @mprec{}, and if 
-a @mprec{} b and b @mprec{} c then that relation must carry over
-and it @emph{must} be that a @mprec{} c for the objects to have an
-order.  The ordering relation may allow for equality, i.e. 
-a @mprec{} b and b @mprec{} a may both be true amd imply that
-a and b are equal in the order and not distinguished by it, in
-which case the set has a partial order.  Otherwise, if there is an order,
-all the objects have a distinct place in the order and the set has a total
-order.}) and that A would be preferred to C.
-
-However, when MED is involved this need not be the case.  With MED it is
-possible that C is actually preferred over A.  So A is preferred to B, B is
-preferred to C, but C is preferred to A.  This can be true even where BGP
-defines a deterministic ``most preferred'' route out of the full set of
-A,B,C.  With MED, for any given set of routes there may be a
-deterministically preferred route, but there need not be any way to arrange
-them into any order of preference.  With unmodified MED, the order of
-preference of routes literally becomes undefined.
-
-That MED can induce non-transitive preferences over routes can cause issues. 
-Firstly, it may be perceived to cause routing table churn locally at
-speakers; secondly, and more seriously, it may cause routing instability in
-iBGP topologies, where sets of speakers continually oscillate between
-different paths.
-
-The first issue arises from how speakers often implement routing decisions. 
-Though BGP defines a selection process that will deterministically select
-the same route as best at any given speaker, even with MED, that process
-requires evaluating all routes together.  For performance and ease of
-implementation reasons, many implementations evaluate route preferences in a
-pair-wise fashion instead.  Given there is no well-defined order when MED is
-involved, the best route that will be chosen becomes subject to
-implementation details, such as the order the routes are stored in.  That
-may be (locally) non-deterministic, e.g.@: it may be the order the routes
-were received in.  
-
-This indeterminism may be considered undesirable, though it need not cause
-problems.  It may mean additional routing churn is perceived, as sometimes
-more updates may be produced than at other times in reaction to some event .
-
-This first issue can be fixed with a more deterministic route selection that
-ensures routes are ordered by the neighbouring AS during selection. 
-@xref{bgp deterministic-med}.  This may reduce the number of updates as
-routes are received, and may in some cases reduce routing churn.  Though, it
-could equally deterministically produce the largest possible set of updates
-in response to the most common sequence of received updates.
-
-A deterministic order of evaluation tends to imply an additional overhead of
-sorting over any set of n routes to a destination.  The implementation of
-deterministic MED in Frr scales significantly worse than most sorting
-algorithms at present, with the number of paths to a given destination. 
-That number is often low enough to not cause any issues, but where there are
-many paths, the deterministic comparison may quickly become increasingly
-expensive in terms of CPU.
-
-Deterministic local evaluation can @emph{not} fix the second, more major,
-issue of MED however.  Which is that the non-transitive preference of routes
-MED can cause may lead to routing instability or oscillation across multiple
-speakers in iBGP topologies.  This can occur with full-mesh iBGP, but is
-particularly problematic in non-full-mesh iBGP topologies that further
-reduce the routing information known to each speaker.  This has primarily
-been documented with iBGP route-reflection topologies.  However, any
-route-hiding technologies potentially could also exacerbate oscillation with
-MED.
-
-This second issue occurs where speakers each have only a subset of routes,
-and there are cycles in the preferences between different combinations of
-routes - as the undefined order of preference of MED allows - and the routes
-are distributed in a way that causes the BGP speakers to 'chase' those
-cycles.  This can occur even if all speakers use a deterministic order of
-evaluation in route selection.
-
-E.g., speaker 4 in AS A might receive a route from speaker 2 in AS X, and
-from speaker 3 in AS Y; while speaker 5 in AS A might receive that route
-from speaker 1 in AS Y.  AS Y might set a MED of 200 at speaker 1, and 100
-at speaker 3. I.e, using ASN:ID:MED to label the speakers:
-
-@example
-
-           /---------------\
- X:2------|--A:4-------A:5--|-Y:1:200
- Y:3:100--|-/               |
-           \---------------/
-
-@end example
-
-Assuming all other metrics are equal (AS_PATH, ORIGIN, 0 IGP costs), then
-based on the RFC4271 decision process speaker 4 will choose X:2 over
-Y:3:100, based on the lower ID of 2.  Speaker 4 advertises X:2 to speaker 5. 
-Speaker 5 will continue to prefer Y:1:200 based on the ID, and advertise
-this to speaker 4.  Speaker 4 will now have the full set of routes, and the
-Y:1:200 it receives from 5 will beat X:2, but when speaker 4 compares
-Y:1:200 to Y:3:100 the MED check now becomes active as the ASes match, and
-now Y:3:100 is preferred.  Speaker 4 therefore now advertises Y:3:100 to 5,
-which will also agrees that Y:3:100 is preferred to Y:1:200, and so
-withdraws the latter route from 4.  Speaker 4 now has only X:2 and Y:3:100,
-and X:2 beats Y:3:100, and so speaker 4 implicitly updates its route to
-speaker 5 to X:2.  Speaker 5 sees that Y:1:200 beats X:2 based on the ID,
-and advertises Y:1:200 to speaker 4, and the cycle continues.
-
-The root cause is the lack of a clear order of preference caused by how MED
-sometimes is and sometimes is not compared, leading to this cycle in the
-preferences between the routes:
-
-@example
-
-       /---> X:2 ---beats---> Y:3:100 --\
-      |                                  |
-      |                                  |
-       \---beats--- Y:1:200 <---beats---/
-
-@end example
-
-This particular type of oscillation in full-mesh iBGP topologies can  be
-avoided by speakers preferring already selected, external routes rather than
-choosing to update to new a route based on a post-MED metric (e.g. 
-router-ID), at the cost of a non-deterministic selection process.  Frr
-implements this, as do many other implementations, so long as it is not
-overridden by setting @ref{bgp bestpath compare-routerid}, and see also
-@ref{BGP decision process}, .
-
-However, more complex and insidious cycles of oscillation are possible with
-iBGP route-reflection, which are not so easily avoided.  These have been
-documented in various places.  See, e.g., @cite{McPherson, D.  and Gill, V. 
-and Walton, D., "Border Gateway Protocol (BGP) Persistent Route Oscillation
-Condition", IETF RFC3345}, and @cite{Flavel, A.  and M.  Roughan, "Stable
-and flexible iBGP", ACM SIGCOMM 2009}, and @cite{Griffin, T.  and G.  Wilfong, 
-"On the correctness of IBGP configuration", ACM SIGCOMM 2002} for concrete 
-examples and further references.
-
-There is as of this writing @emph{no} known way to use MED for its original
-purpose; @emph{and} reduce routing information in iBGP topologies;
-@emph{and} be sure to avoid the instability problems of MED due the
-non-transitive routing preferences it can induce; in general on arbitrary
-networks.
-
-There may be iBGP topology specific ways to reduce the instability risks,
-even while using MED, e.g.@: by constraining the reflection topology and by
-tuning IGP costs between route-reflector clusters, see RFC3345 for details. 
-In the near future, the Add-Path extension to BGP may also solve MED
-oscillation while still allowing MED to be used as intended, by distributing
-"best-paths per neighbour AS".  This would be at the cost of distributing at
-least as many routes to all speakers as a full-mesh iBGP would, if not more,
-while also imposing similar CPU overheads as the "Deterministic MED" feature
-at each Add-Path reflector.
-
-More generally, the instability problems that MED can introduce on more
-complex, non-full-mesh, iBGP topologies may be avoided either by:
-
-@itemize 
-
-@item
-Setting @ref{bgp always-compare-med}, however this allows MED to be compared
-across values set by different neighbour ASes, which may not produce
-coherent desirable results, of itself.
-
-@item 
-Effectively ignoring MED by setting MED to the same value (e.g.@: 0) using
-@ref{routemap set metric} on all received routes, in combination with
-setting @ref{bgp always-compare-med} on all speakers. This is the simplest
-and most performant way to avoid MED oscillation issues, where an AS is happy
-not to allow neighbours to inject this problematic metric.
-
-@end itemize
-
-As MED is evaluated after the AS_PATH length check, another possible use for
-MED is for intra-AS steering of routes with equal AS_PATH length, as an
-extension of the last case above.  As MED is evaluated before IGP metric,
-this can allow cold-potato routing to be implemented to send traffic to
-preferred hand-offs with neighbours, rather than the closest hand-off
-according to the IGP metric.
-
-Note that even if action is taken to address the MED non-transitivity
-issues, other oscillations may still be possible.  E.g., on IGP cost if
-iBGP and IGP topologies are at cross-purposes with each other - see the
-Flavel and Roughan paper above for an example.  Hence the guideline that the
-iBGP topology should follow the IGP topology.
-
-@deffn {BGP} {bgp deterministic-med} {}
-@anchor{bgp deterministic-med}
-
-Carry out route-selection in way that produces deterministic answers
-locally, even in the face of MED and the lack of a well-defined order of
-preference it can induce on routes.  Without this option the preferred route
-with MED may be determined largely by the order that routes were received
-in.
-
-Setting this option will have a performance cost that may be noticeable when
-there are many routes for each destination.  Currently in Frr it is
-implemented in a way that scales poorly as the number of routes per
-destination increases.
-
-The default is that this option is not set.
-@end deffn
-
-Note that there are other sources of indeterminism in the route selection
-process, specifically, the preference for older and already selected routes
-from eBGP peers, @xref{BGP decision process}.
-
-@deffn {BGP} {bgp always-compare-med} {}
-@anchor{bgp always-compare-med}
-
-Always compare the MED on routes, even when they were received from
-different neighbouring ASes.  Setting this option makes the order of
-preference of routes more defined, and should eliminate MED induced
-oscillations.
-
-If using this option, it may also be desirable to use @ref{routemap set
-metric} to set MED to 0 on routes received from external neighbours.
-
-This option can be used, together with @ref{routemap set metric} to use MED
-as an intra-AS metric to steer equal-length AS_PATH routes to, e.g., desired
-exit points.
-@end deffn
-
-
-
-@node BGP network
-@section BGP network
-
-@menu
-* BGP route::                   
-* Route Aggregation::           
-* Redistribute to BGP::         
-@end menu
-
-@node BGP route
-@subsection BGP route
-
-@deffn {BGP} {network @var{A.B.C.D/M}} {}
-This command adds the announcement network.
-@example
-@group
-router bgp 1
- address-family ipv4 unicast
-  network 10.0.0.0/8
- exit-address-family
-@end group
-@end example
-This configuration example says that network 10.0.0.0/8 will be
-announced to all neighbors.  Some vendors' routers don't advertise
-routes if they aren't present in their IGP routing tables; @code{bgpd}
-doesn't care about IGP routes when announcing its routes.
-@end deffn
-
-@deffn {BGP} {no network @var{A.B.C.D/M}} {}
-@end deffn
-
-@node Route Aggregation
-@subsection Route Aggregation
-
-@deffn {BGP} {aggregate-address @var{A.B.C.D/M}} {}
-This command specifies an aggregate address.
-@end deffn
-
-@deffn {BGP} {aggregate-address @var{A.B.C.D/M} as-set} {}
-This command specifies an aggregate address.  Resulting routes include
-AS set.
-@end deffn
-
-@deffn {BGP} {aggregate-address @var{A.B.C.D/M} summary-only} {}
-This command specifies an aggregate address.  Aggreated routes will
-not be announce.
-@end deffn
-
-@deffn {BGP} {no aggregate-address @var{A.B.C.D/M}} {}
-@end deffn
-
-@node Redistribute to BGP
-@subsection Redistribute to BGP
-
-@deffn {BGP} {redistribute kernel} {}
-Redistribute kernel route to BGP process.
-@end deffn
-
-@deffn {BGP} {redistribute static} {}
-Redistribute static route to BGP process.
-@end deffn
-
-@deffn {BGP} {redistribute connected} {}
-Redistribute connected route to BGP process.
-@end deffn
-
-@deffn {BGP} {redistribute rip} {}
-Redistribute RIP route to BGP process.
-@end deffn
-
-@deffn {BGP} {redistribute ospf} {}
-Redistribute OSPF route to BGP process.
-@end deffn
-
-@deffn {BGP} {redistribute vpn} {}
-Redistribute VNC routes to BGP process.
-@end deffn
-
-@deffn {BGP} {update-delay @var{max-delay}} {}
-@deffnx {BGP} {update-delay @var{max-delay} @var{establish-wait}} {}
-This feature is used to enable read-only mode on BGP process restart or when
-BGP process is cleared using 'clear ip bgp *'. When applicable, read-only mode
-would begin as soon as the first peer reaches Established status and a timer
-for max-delay seconds is started.
-
-During this mode BGP doesn't run any best-path or generate any updates to its
-peers. This mode continues until:
-1. All the configured peers, except the shutdown peers, have sent explicit EOR
-(End-Of-RIB) or an implicit-EOR. The first keep-alive after BGP has reached
-Established is considered an implicit-EOR.
-   If the establish-wait optional value is given, then BGP will wait for
-   peers to reach established from the begining of the update-delay till the
-   establish-wait period is over, i.e. the minimum set of established peers for
-   which EOR is expected would be peers established during the establish-wait
-   window, not necessarily all the configured neighbors.
-2. max-delay period is over.
-On hitting any of the above two conditions, BGP resumes the decision process
-and generates updates to its peers.
-
-Default max-delay is 0, i.e. the feature is off by default.
-@end deffn
-
-@deffn {BGP} {table-map @var{route-map-name}} {}
-This feature is used to apply a route-map on route updates from BGP to Zebra.
-All the applicable match operations are allowed, such as match on prefix,
-next-hop, communities, etc. Set operations for this attach-point are limited
-to metric and next-hop only. Any operation of this feature does not affect
-BGPs internal RIB.
-
-Supported for ipv4 and ipv6 address families. It works on multi-paths as well,
-however, metric setting is based on the best-path only.
-@end deffn
-
-@node BGP Peer
-@section BGP Peer
-
-@menu
-* Defining Peer::               
-* BGP Peer commands::           
-* Peer filtering::              
-@end menu
-
-@node Defining Peer
-@subsection Defining Peer
-
-@deffn {BGP} {neighbor @var{peer} remote-as @var{asn}} {}
-Creates a new neighbor whose remote-as is @var{asn}.  @var{peer}
-can be an IPv4 address or an IPv6 address.
-@example
-@group
-router bgp 1
- neighbor 10.0.0.1 remote-as 2
-@end group
-@end example
-In this case my router, in AS-1, is trying to peer with AS-2 at
-10.0.0.1.
-
-This command must be the first command used when configuring a neighbor.
-If the remote-as is not specified, @command{bgpd} will complain like this:
-@example
-can't find neighbor 10.0.0.1
-@end example
-@end deffn
-
-@node BGP Peer commands
-@subsection BGP Peer commands
-
-In a @code{router bgp} clause there are neighbor specific configurations
-required.
-
-@deffn {BGP} {neighbor @var{peer} shutdown} {}
-@deffnx {BGP} {no neighbor @var{peer} shutdown} {}
-Shutdown the peer.  We can delete the neighbor's configuration by
-@code{no neighbor @var{peer} remote-as @var{as-number}} but all
-configuration of the neighbor will be deleted.  When you want to
-preserve the configuration, but want to drop the BGP peer, use this
-syntax.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} ebgp-multihop} {}
-@deffnx {BGP} {no neighbor @var{peer} ebgp-multihop} {}
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} description ...} {}
-@deffnx {BGP} {no neighbor @var{peer} description ...} {}
-Set description of the peer.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} version @var{version}} {}
-Set up the neighbor's BGP version.  @var{version} can be @var{4},
-@var{4+} or @var{4-}.  BGP version @var{4} is the default value used for
-BGP peering.  BGP version @var{4+} means that the neighbor supports
-Multiprotocol Extensions for BGP-4.  BGP version @var{4-} is similar but
-the neighbor speaks the old Internet-Draft revision 00's Multiprotocol
-Extensions for BGP-4.  Some routing software is still using this
-version.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} interface @var{ifname}} {}
-@deffnx {BGP} {no neighbor @var{peer} interface @var{ifname}} {}
-When you connect to a BGP peer over an IPv6 link-local address, you 
-have to specify the @var{ifname} of the interface used for the 
-connection. To specify IPv4 session addresses, see the 
-@code{neighbor @var{peer} update-source} command below.
-
-This command is deprecated and may be removed in a future release. Its
-use should be avoided.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} next-hop-self [all]} {}
-@deffnx {BGP} {no neighbor @var{peer} next-hop-self [all]} {}
-This command specifies an announced route's nexthop as being equivalent
-to the address of the bgp router if it is learned via eBGP.
-If the optional keyword @code{all} is specified the modifiation is done
-also for routes learned via iBGP.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} update-source @var{<ifname|address>}} {}
-@deffnx {BGP} {no neighbor @var{peer} update-source} {}
-Specify the IPv4 source address to use for the @acronym{BGP} session to this
-neighbour, may be specified as either an IPv4 address directly or
-as an interface name (in which case the @command{zebra} daemon MUST be running
-in order for @command{bgpd} to be able to retrieve interface state).
-@example
-@group
-router bgp 64555
- neighbor foo update-source 192.168.0.1
- neighbor bar update-source lo0
-@end group
-@end example
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} default-originate} {}
-@deffnx {BGP} {no neighbor @var{peer} default-originate} {}
-@command{bgpd}'s default is to not announce the default route (0.0.0.0/0) even it
-is in routing table.  When you want to announce default routes to the
-peer, use this command.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} port @var{port}} {}
-@deffnx {BGP} {neighbor @var{peer} port @var{port}} {}
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} send-community} {}
-@deffnx {BGP} {neighbor @var{peer} send-community} {}
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} weight @var{weight}} {}
-@deffnx {BGP} {no neighbor @var{peer} weight @var{weight}} {}
-This command specifies a default @var{weight} value for the neighbor's
-routes.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} maximum-prefix @var{number}} {}
-@deffnx {BGP} {no neighbor @var{peer} maximum-prefix @var{number}} {}
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} local-as @var{as-number}} {}
-@deffnx {BGP} {neighbor @var{peer} local-as @var{as-number} no-prepend} {}
-@deffnx {BGP} {neighbor @var{peer} local-as @var{as-number} no-prepend replace-as} {}
-@deffnx {BGP} {no neighbor @var{peer} local-as} {}
-Specify an alternate AS for this BGP process when interacting with the
-specified peer.  With no modifiers, the specified local-as is prepended to
-the received AS_PATH when receiving routing updates from the peer, and
-prepended to the outgoing AS_PATH (after the process local AS) when
-transmitting local routes to the peer.
-
-If the no-prepend attribute is specified, then the supplied local-as is not
-prepended to the received AS_PATH.
-
-If the replace-as attribute is specified, then only the supplied local-as is
-prepended to the AS_PATH when transmitting local-route updates to this peer.
-
-Note that replace-as can only be specified if no-prepend is.
-
-This command is only allowed for eBGP peers.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} ttl-security hops @var{number}} {}
-@deffnx {BGP} {no neighbor @var{peer} ttl-security hops @var{number}} {}
-This command enforces Generalized TTL Security Mechanism (GTSM), as
-specified in RFC 5082. With this command, only neighbors that are the
-specified number of hops away will be allowed to become neighbors. This
-command is mututally exclusive with @command{ebgp-multihop}.
-@end deffn
-
-@node Peer filtering
-@subsection Peer filtering
-
-@deffn {BGP} {neighbor @var{peer} distribute-list @var{name} [in|out]} {}
-This command specifies a distribute-list for the peer.  @var{direct} is
-@samp{in} or @samp{out}.
-@end deffn
-
-@deffn {BGP command} {neighbor @var{peer} prefix-list @var{name} [in|out]} {}
-@end deffn
-
-@deffn {BGP command} {neighbor @var{peer} filter-list @var{name} [in|out]} {}
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} route-map @var{name} [in|out]} {}
-Apply a route-map on the neighbor.  @var{direct} must be @code{in} or
-@code{out}.
-@end deffn
-
-@deffn {BGP} {bgp route-reflector allow-outbound-policy} {}
-By default, attribute modification via route-map policy out is not reflected
-on reflected routes. This option allows the modifications to be reflected as
-well. Once enabled, it affects all reflected routes.
-@end deffn
-
-@c -----------------------------------------------------------------------
-@node BGP Peer Group
-@section BGP Peer Group
-
-@deffn {BGP} {neighbor @var{word} peer-group} {}
-This command defines a new peer group.
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} peer-group @var{word}} {}
-This command bind specific peer to peer group @var{word}.
-@end deffn
-
-@node BGP Address Family
-@section BGP Address Family
-
-Multiprotocol BGP enables BGP to carry routing information for multiple
-Network Layer protocols. BGP supports multiple Address Family
-Identifier (AFI), namely IPv4 and IPv6. Support is also provided for
-multiple sets of per-AFI information via Subsequent Address Family
-Identifiers (SAFI).  In addition to unicast information, VPN information
-@cite{RFC4364} and @cite{RFC4659}, and Encapsulation attribute
-@cite{RFC5512} is supported.
-
-@deffn {Command} {show ip bgp ipv4 vpn} {}
-@deffnx {Command} {show ipv6 bgp ipv6 vpn} {}
-Print active IPV4 or IPV6 routes advertised via the VPN SAFI.
-@end deffn
-
-@deffn {Command} {show bgp ipv4 vpn summary} {}
-@deffnx {Command} {show bgp ipv6 vpn summary} {}
-Print a summary of neighbor connections for the specified AFI/SAFI combination.
-@end deffn
-
-@c -----------------------------------------------------------------------
-@node Autonomous System
-@section Autonomous System
-
-The @acronym{AS,Autonomous System} number is one of the essential
-element of BGP.  BGP is a distance vector routing protocol, and the
-AS-Path framework provides distance vector metric and loop detection to
-BGP. @cite{RFC1930, Guidelines for creation, selection, and
-registration of an Autonomous System (AS)} provides some background on
-the concepts of an AS.
-
-The AS number is a two octet value, ranging in value from 1 to 65535.
-The AS numbers 64512 through 65535 are defined as private AS numbers. 
-Private AS numbers must not to be advertised in the global Internet.
-
-@menu
-* Display BGP Routes by AS Path::  
-* AS Path Access List::         
-* Using AS Path in Route Map::  
-* Private AS Numbers::          
-@end menu
-
-@node Display BGP Routes by AS Path
-@subsection Display BGP Routes by AS Path
-
-To show BGP routes which has specific AS path information @code{show
-ip bgp} command can be used.  
-
-@deffn Command {show bgp @{ipv4|ipv6@} regexp @var{line}} {}
-This commands displays BGP routes that matches a regular
-expression @var{line} (@pxref{BGP Regular Expressions}).
-@end deffn
-
-@node AS Path Access List
-@subsection AS Path Access List
-
-AS path access list is user defined AS path.
-
-@deffn {Command} {ip as-path access-list @var{word} @{permit|deny@} @var{line}} {}
-This command defines a new AS path access list.
-@end deffn
-
-@deffn {Command} {no ip as-path access-list @var{word}} {}
-@deffnx {Command} {no ip as-path access-list @var{word} @{permit|deny@} @var{line}} {}
-@end deffn
-
-@node Using AS Path in Route Map
-@subsection Using AS Path in Route Map
-
-@deffn {Route Map} {match as-path @var{word}} {}
-@end deffn
-
-@deffn {Route Map} {set as-path prepend @var{as-path}} {}
-Prepend the given string of AS numbers to the AS_PATH.
-@end deffn
-
-@deffn {Route Map} {set as-path prepend last-as @var{num}} {}
-Prepend the existing last AS number (the leftmost ASN) to the AS_PATH.
-@end deffn
-
-@node Private AS Numbers
-@subsection Private AS Numbers
-
-@c -----------------------------------------------------------------------
-@node BGP Communities Attribute
-@section BGP Communities Attribute
-
-BGP communities attribute is widely used for implementing policy
-routing.  Network operators can manipulate BGP communities attribute
-based on their network policy.  BGP communities attribute is defined
-in @cite{RFC1997, BGP Communities Attribute} and
-@cite{RFC1998, An Application of the BGP Community Attribute
-in Multi-home Routing}.  It is an optional transitive attribute,
-therefore local policy can travel through different autonomous system.
-
-Communities attribute is a set of communities values.  Each
-communities value is 4 octet long.  The following format is used to
-define communities value.
-
-@table @code
-@item AS:VAL
-This format represents 4 octet communities value.  @code{AS} is high
-order 2 octet in digit format.  @code{VAL} is low order 2 octet in
-digit format.  This format is useful to define AS oriented policy
-value.  For example, @code{7675:80} can be used when AS 7675 wants to
-pass local policy value 80 to neighboring peer.
-@item internet
-@code{internet} represents well-known communities value 0.
-@item no-export
-@code{no-export} represents well-known communities value @code{NO_EXPORT}@*
-@r{(0xFFFFFF01)}.  All routes carry this value must not be advertised
-to outside a BGP confederation boundary.  If neighboring BGP peer is
-part of BGP confederation, the peer is considered as inside a BGP
-confederation boundary, so the route will be announced to the peer.
-@item no-advertise
-@code{no-advertise} represents well-known communities value
-@code{NO_ADVERTISE}@*@r{(0xFFFFFF02)}.  All routes carry this value
-must not be advertise to other BGP peers.
-@item local-AS
-@code{local-AS} represents well-known communities value
-@code{NO_EXPORT_SUBCONFED} @r{(0xFFFFFF03)}.  All routes carry this
-value must not be advertised to external BGP peers.  Even if the
-neighboring router is part of confederation, it is considered as
-external BGP peer, so the route will not be announced to the peer.
-@end table
-
-  When BGP communities attribute is received, duplicated communities
-value in the communities attribute is ignored and each communities
-values are sorted in numerical order.
-  
-@menu
-* BGP Community Lists::         
-* Numbered BGP Community Lists::  
-* BGP Community in Route Map::  
-* Display BGP Routes by Community::  
-* Using BGP Communities Attribute::  
-@end menu
-
-@node BGP Community Lists
-@subsection BGP Community Lists
-
-  BGP community list is a user defined BGP communites attribute list.
-BGP community list can be used for matching or manipulating BGP
-communities attribute in updates.
-
-There are two types of community list.  One is standard community
-list and another is expanded community list.  Standard community list
-defines communities attribute.  Expanded community list defines
-communities attribute string with regular expression.  Standard
-community list is compiled into binary format when user define it.
-Standard community list will be directly compared to BGP communities
-attribute in BGP updates.  Therefore the comparison is faster than
-expanded community list.
-
-@deffn Command {ip community-list standard @var{name} @{permit|deny@} @var{community}} {}
-This command defines a new standard community list.  @var{community}
-is communities value.  The @var{community} is compiled into community
-structure.  We can define multiple community list under same name.  In
-that case match will happen user defined order.  Once the
-community list matches to communities attribute in BGP updates it
-return permit or deny by the community list definition.  When there is
-no matched entry, deny will be returned.  When @var{community} is
-empty it matches to any routes.
-@end deffn
-
-@deffn Command {ip community-list expanded @var{name} @{permit|deny@} @var{line}} {}
-This command defines a new expanded community list.  @var{line} is a
-string expression of communities attribute.  @var{line} can be a
-regular expression (@pxref{BGP Regular Expressions}) to match
-the communities attribute in BGP updates.
-@end deffn
-
-@deffn Command {no ip community-list @var{name}} {}
-@deffnx Command {no ip community-list standard @var{name}} {}
-@deffnx Command {no ip community-list expanded @var{name}} {}
-These commands delete community lists specified by @var{name}.  All of
-community lists shares a single name space.  So community lists can be
-removed simpley specifying community lists name.
-@end deffn
-
-@deffn {Command} {show ip community-list} {}
-@deffnx {Command} {show ip community-list @var{name}} {}
-This command displays current community list information.  When
-@var{name} is specified the specified community list's information is
-shown.
-
-@example
-# show ip community-list 
-Named Community standard list CLIST
-    permit 7675:80 7675:100 no-export
-    deny internet
-Named Community expanded list EXPAND
-    permit :
-
-# show ip community-list CLIST
-Named Community standard list CLIST
-    permit 7675:80 7675:100 no-export
-    deny internet
-@end example
-@end deffn
-
-@node Numbered BGP Community Lists
-@subsection Numbered BGP Community Lists
-
-When number is used for BGP community list name, the number has
-special meanings.  Community list number in the range from 1 and 99 is
-standard community list.  Community list number in the range from 100
-to 199 is expanded community list.  These community lists are called
-as numbered community lists.  On the other hand normal community lists
-is called as named community lists.
-
-@deffn Command {ip community-list <1-99> @{permit|deny@} @var{community}} {}
-This command defines a new community list.  <1-99> is standard
-community list number.  Community list name within this range defines
-standard community list.  When @var{community} is empty it matches to
-any routes.
-@end deffn
-
-@deffn Command {ip community-list <100-199> @{permit|deny@} @var{community}} {}
-This command defines a new community list.  <100-199> is expanded
-community list number.  Community list name within this range defines
-expanded community list.
-@end deffn
-
-@deffn Command {ip community-list @var{name} @{permit|deny@} @var{community}} {}
-When community list type is not specifed, the community list type is
-automatically detected.  If @var{community} can be compiled into
-communities attribute, the community list is defined as a standard
-community list.  Otherwise it is defined as an expanded community
-list.  This feature is left for backward compability.  Use of this
-feature is not recommended.
-@end deffn
-
-@node BGP Community in Route Map
-@subsection BGP Community in Route Map
-
-In Route Map (@pxref{Route Map}), we can match or set BGP
-communities attribute.  Using this feature network operator can
-implement their network policy based on BGP communities attribute.
-
-Following commands can be used in Route Map.
-
-@deffn {Route Map} {match community @var{word}} {}
-@deffnx {Route Map} {match community @var{word} exact-match} {}
-This command perform match to BGP updates using community list
-@var{word}.  When the one of BGP communities value match to the one of
-communities value in community list, it is match.  When
-@code{exact-match} keyword is spcified, match happen only when BGP
-updates have completely same communities value specified in the
-community list.
-@end deffn
-
-@deffn {Route Map} {set community none} {}
-@deffnx {Route Map} {set community @var{community}} {}
-@deffnx {Route Map} {set community @var{community} additive} {}
-This command manipulate communities value in BGP updates.  When
-@code{none} is specified as communities value, it removes entire
-communities attribute from BGP updates.  When @var{community} is not
-@code{none}, specified communities value is set to BGP updates.  If
-BGP updates already has BGP communities value, the existing BGP
-communities value is replaced with specified @var{community} value.
-When @code{additive} keyword is specified, @var{community} is appended
-to the existing communities value.
-@end deffn
-
-@deffn {Route Map} {set comm-list @var{word} delete} {}
-This command remove communities value from BGP communities attribute.
-The @var{word} is community list name.  When BGP route's communities
-value matches to the community list @var{word}, the communities value
-is removed.  When all of communities value is removed eventually, the
-BGP update's communities attribute is completely removed.
-@end deffn
-
-@node Display BGP Routes by Community
-@subsection Display BGP Routes by Community
-
-To show BGP routes which has specific BGP communities attribute,
-@code{show bgp @{ipv4|ipv6@}} command can be used. The
-@var{community} and @var{community-list} subcommand can be used.
-
-@deffn Command {show bgp @{ipv4|ipv6@} community} {}
-@deffnx Command {show bgp @{ipv4|ipv6@} community @var{community}} {}
-@deffnx Command {show bgp @{ipv4|ipv6@} community @var{community} exact-match} {}
-@code{show bgp @{ipv4|ipv6@} community} displays BGP routes which has communities
-attribute. Where the address family can be IPv4 or IPv6 among others. When
-@var{community} is specified, BGP routes that matches @var{community} value is
-displayed. For this command, @code{internet} keyword can't be used for
-@var{community} value. When @code{exact-match} is specified, it display only
-routes that have an exact match.
-@end deffn
-
-@deffn Command {show bgp @{ipv4|ipv6@} community-list @var{word}} {}
-@deffnx Command {show bgp @{ipv4|ipv6@} community-list @var{word} exact-match} {}
-This commands display BGP routes for the address family specified that matches
-community list @var{word}. When @code{exact-match} is specified, display only
-routes that have an exact match.
-@end deffn
-
-@node Using BGP Communities Attribute
-@subsection Using BGP Communities Attribute
-
-Following configuration is the most typical usage of BGP communities
-attribute.  AS 7675 provides upstream Internet connection to AS 100.
-When following configuration exists in AS 7675, AS 100 networks
-operator can set local preference in AS 7675 network by setting BGP
-communities attribute to the updates.
-
-@example
-router bgp 7675
- neighbor 192.168.0.1 remote-as 100
- address-family ipv4 unicast
-  neighbor 192.168.0.1 route-map RMAP in
- exit-address-family
-!
-ip community-list 70 permit 7675:70
-ip community-list 70 deny
-ip community-list 80 permit 7675:80
-ip community-list 80 deny
-ip community-list 90 permit 7675:90
-ip community-list 90 deny
-!
-route-map RMAP permit 10
- match community 70
- set local-preference 70
-!
-route-map RMAP permit 20
- match community 80
- set local-preference 80
-!
-route-map RMAP permit 30
- match community 90
- set local-preference 90
-@end example
-
-Following configuration announce 10.0.0.0/8 from AS 100 to AS 7675.
-The route has communities value 7675:80 so when above configuration
-exists in AS 7675, announced route's local preference will be set to
-value 80.
-
-@example
-router bgp 100
- network 10.0.0.0/8
- neighbor 192.168.0.2 remote-as 7675
- address-family ipv4 unicast
-  neighbor 192.168.0.2 route-map RMAP out
- exit-address-family
-!
-ip prefix-list PLIST permit 10.0.0.0/8
-!
-route-map RMAP permit 10
- match ip address prefix-list PLIST
- set community 7675:80
-@end example
-
-Following configuration is an example of BGP route filtering using
-communities attribute.  This configuration only permit BGP routes
-which has BGP communities value 0:80 or 0:90.  Network operator can
-put special internal communities value at BGP border router, then
-limit the BGP routes announcement into the internal network.
-
-@example
-router bgp 7675
- neighbor 192.168.0.1 remote-as 100
- address-family ipv4 unicast
-  neighbor 192.168.0.1 route-map RMAP in
- exit-address-family
-!
-ip community-list 1 permit 0:80 0:90
-!
-route-map RMAP permit in
- match community 1
-@end example
-
-Following exmaple filter BGP routes which has communities value 1:1.
-When there is no match community-list returns deny.  To avoid
-filtering all of routes, we need to define permit any at last.
-
-@example
-router bgp 7675
- neighbor 192.168.0.1 remote-as 100
- address-family ipv4 unicast
-  neighbor 192.168.0.1 route-map RMAP in
- exit-address-family
-!
-ip community-list standard FILTER deny 1:1
-ip community-list standard FILTER permit
-!
-route-map RMAP permit 10
- match community FILTER
-@end example
-
-Communities value keyword @code{internet} has special meanings in
-standard community lists.  In below example @code{internet} act as
-match any.  It matches all of BGP routes even if the route does not
-have communities attribute at all.  So community list @code{INTERNET}
-is same as above example's @code{FILTER}.
-
-@example
-ip community-list standard INTERNET deny 1:1
-ip community-list standard INTERNET permit internet
-@end example
-
-Following configuration is an example of communities value deletion.
-With this configuration communities value 100:1 and 100:2 is removed
-from BGP updates.  For communities value deletion, only @code{permit}
-community-list is used.  @code{deny} community-list is ignored.
-
-@example
-router bgp 7675
- neighbor 192.168.0.1 remote-as 100
- address-family ipv4 unicast
-  neighbor 192.168.0.1 route-map RMAP in
- exit-address-family
-!
-ip community-list standard DEL permit 100:1 100:2
-!
-route-map RMAP permit 10
- set comm-list DEL delete
-@end example
-
-@c -----------------------------------------------------------------------
-@node BGP Extended Communities Attribute
-@section BGP Extended Communities Attribute
-
-BGP extended communities attribute is introduced with MPLS VPN/BGP
-technology.  MPLS VPN/BGP expands capability of network infrastructure
-to provide VPN functionality.  At the same time it requires a new
-framework for policy routing.  With BGP Extended Communities Attribute
-we can use Route Target or Site of Origin for implementing network
-policy for MPLS VPN/BGP.
-
-BGP Extended Communities Attribute is similar to BGP Communities
-Attribute.  It is an optional transitive attribute.  BGP Extended
-Communities Attribute can carry multiple Extended Community value.
-Each Extended Community value is eight octet length.
-
-BGP Extended Communities Attribute provides an extended range
-compared with BGP Communities Attribute.  Adding to that there is a
-type field in each value to provides community space structure.
-
-There are two format to define Extended Community value.  One is AS
-based format the other is IP address based format.
-
-@table @code
-@item AS:VAL
-This is a format to define AS based Extended Community value.
-@code{AS} part is 2 octets Global Administrator subfield in Extended
-Community value.  @code{VAL} part is 4 octets Local Administrator
-subfield.  @code{7675:100} represents AS 7675 policy value 100.
-@item IP-Address:VAL
-This is a format to define IP address based Extended Community value.
-@code{IP-Address} part is 4 octets Global Administrator subfield.
-@code{VAL} part is 2 octets Local Administrator subfield.
-@code{10.0.0.1:100} represents 
-@end table
-
-@menu
-* BGP Extended Community Lists::  
-* BGP Extended Communities in Route Map::  
-@end menu
-
-@node BGP Extended Community Lists
-@subsection BGP Extended Community Lists
-
-Expanded Community Lists is a user defined BGP Expanded Community
-Lists.
-
-@deffn Command {ip extcommunity-list standard @var{name} @{permit|deny@} @var{extcommunity}} {}
-This command defines a new standard extcommunity-list.
-@var{extcommunity} is extended communities value.  The
-@var{extcommunity} is compiled into extended community structure.  We
-can define multiple extcommunity-list under same name.  In that case
-match will happen user defined order.  Once the extcommunity-list
-matches to extended communities attribute in BGP updates it return
-permit or deny based upon the extcommunity-list definition.  When
-there is no matched entry, deny will be returned.  When
-@var{extcommunity} is empty it matches to any routes.
-@end deffn
-
-@deffn Command {ip extcommunity-list expanded @var{name} @{permit|deny@} @var{line}} {}
-This command defines a new expanded extcommunity-list.  @var{line} is
-a string expression of extended communities attribute.  @var{line} can
-be a regular expression (@pxref{BGP Regular Expressions}) to match an
-extended communities attribute in BGP updates.
-@end deffn
-
-@deffn Command {no ip extcommunity-list @var{name}} {}
-@deffnx Command {no ip extcommunity-list standard @var{name}} {}
-@deffnx Command {no ip extcommunity-list expanded @var{name}} {}
-These commands delete extended community lists specified by
-@var{name}.  All of extended community lists shares a single name
-space.  So extended community lists can be removed simpley specifying
-the name.
-@end deffn
-
-@deffn {Command} {show ip extcommunity-list} {}
-@deffnx {Command} {show ip extcommunity-list @var{name}} {}
-This command displays current extcommunity-list information.  When
-@var{name} is specified the community list's information is shown.
-
-@example
-# show ip extcommunity-list 
-@end example
-@end deffn
-
-@node BGP Extended Communities in Route Map
-@subsection BGP Extended Communities in Route Map
-
-@deffn {Route Map} {match extcommunity @var{word}} {}
-@end deffn
-
-@deffn {Route Map} {set extcommunity rt @var{extcommunity}} {}
-This command set Route Target value.
-@end deffn
-
-@deffn {Route Map} {set extcommunity soo @var{extcommunity}} {}
-This command set Site of Origin value.
-@end deffn
-
-@c -----------------------------------------------------------------------
-@node BGP Large Communities Attribute
-@section BGP Large Communities Attribute
-
-The BGP Large Communities attribute was introduced in Feb 2017 with
-@cite{RFC8092, BGP Large Communities Attribute}.
-
-The BGP Large Communities Attribute is similar to the BGP Communities
-Attribute except that it has 3 components instead of two and each of
-which are 4 octets in length. Large Communities bring additional
-functionality and convenience over traditional communities, specifically
-the fact that the @code{GLOBAL} part below is now 4 octets wide allowing
-AS4 operators seamless use.
-
-@table @code
-@item GLOBAL:LOCAL1:LOCAL2
-This is the format to define Large Community values. Referencing
-@cite{RFC8195, Use of BGP Large Communities} the values are commonly
-referred to as follows.
-The @code{GLOBAL} part is a 4 octet Global Administrator field, common
-use of this field is the operators AS number.
-The @code{LOCAL1} part is a 4 octet Local Data Part 1 subfield referred
-to as a function.
-The @code{LOCAL2} part is a 4 octet Local Data Part 2 field and referred
-to as the parameter subfield. @code{65551:1:10} represents AS 65551
-function 1 and parameter 10.
-The referenced RFC above gives some guidelines on recommended usage.
-@end table
-
-@menu
-* BGP Large Community Lists::  
-* BGP Large Communities in Route Map::  
-@end menu
-
-@node BGP Large Community Lists
-@subsection BGP Large Community Lists
-
-Two types of large community lists are supported, namely @code{standard} and
-@code{expanded}.
-
-@deffn Command {ip large-community-list standard @var{name} @{permit|deny@} @var{large-community}} {}
-This command defines a new standard large-community-list.
-@var{large-community} is the Large Community value. We
-can add multiple large communities under same name. In that case
-the match will happen in the user defined order. Once the large-community-list
-matches the Large Communities attribute in BGP updates it will return
-permit or deny based upon the large-community-list definition.  When
-there is no matched entry, a deny will be returned.  When @var{large-community}
-is empty it matches any routes.
-@end deffn
-
-@deffn Command {ip large-community-list expanded @var{name} @{permit|deny@} @var{line}} {}
-This command defines a new expanded large-community-list. Where @var{line} is
-a string matching expression, it will be compared to the entire Large Communities
-attribute as a string, with each large-community in order from lowest to highest.
-@var{line} can also be a regular expression which matches this Large
-Community attribute.
-@end deffn
-
-@deffn Command {no ip large-community-list @var{name}} {}
-@deffnx Command {no ip large-community-list standard @var{name}} {}
-@deffnx Command {no ip large-community-list expanded @var{name}} {}
-These commands delete Large Community lists specified by
-@var{name}. All Large Community lists share a single namespace.
-This means Large Community lists can be removed by simply specifying the name.
-@end deffn
-
-@deffn {Command} {show ip large-community-list} {}
-@deffnx {Command} {show ip large-community-list @var{name}} {}
-This command display current large-community-list information.  When
-@var{name} is specified the community list information is shown.
-@end deffn
-
-@deffn {Command} {show ip bgp large-community-info} {}
-This command displays the current large communities in use.
-@end deffn
-
-@node BGP Large Communities in Route Map
-@subsection BGP Large Communities in Route Map
-
-@deffn {Route Map} {match large-community @var{line}} {}
-Where @var{line} can be a simple string to match, or a regular expression.
-It is very important to note that this match occurs on the entire
-large-community string as a whole, where each large-community is ordered
-from lowest to highest.
-@end deffn
-
-@deffn {Route Map} {set large-community @var{large-community}} {}
-@deffnx {Route Map} {set large-community @var{large-community} @var{large-community}} {}
-@deffnx {Route Map} {set large-community @var{large-community} additive} {}
-These commands are used for setting large-community values. The first
-command will overwrite any large-communities currently present.
-The second specifies two large-communities, which overwrites the current
-large-community list. The third will add a large-community value without
-overwriting other values. Multiple large-community values can be specified.
-@end deffn
-
-@c -----------------------------------------------------------------------
-
-@node Displaying BGP information
-@section Displaying BGP information
-
-@menu
-* Showing BGP information::                 
-* Other BGP commands::            
-@end menu
-
-@node Showing BGP information
-@subsection Showing BGP information
-
-@deffn {Command} {show ip bgp} {}
-@deffnx {Command} {show ip bgp @var{A.B.C.D}} {}
-@deffnx {Command} {show ip bgp @var{X:X::X:X}} {}
-This command displays BGP routes.  When no route is specified it
-display all of IPv4 BGP routes.
-@end deffn
-
-@example
-BGP table version is 0, local router ID is 10.1.1.1
-Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
-Origin codes: i - IGP, e - EGP, ? - incomplete
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*> 1.1.1.1/32       0.0.0.0                  0         32768 i
-
-Total number of prefixes 1
-@end example
-
-@deffn {Command} {show ip bgp regexp @var{line}} {}
-This command displays BGP routes using AS path regular expression
-(@pxref{BGP Regular Expressions}).
-@end deffn
-
-@deffn Command {show ip bgp community @var{community}} {}
-@deffnx Command {show ip bgp community @var{community} exact-match} {}
-This command displays BGP routes using @var{community} (@pxref{Display
-BGP Routes by Community}).
-@end deffn
-
-@deffn Command {show ip bgp community-list @var{word}} {}
-@deffnx Command {show ip bgp community-list @var{word} exact-match} {}
-This command displays BGP routes using community list (@pxref{Display
-BGP Routes by Community}).
-@end deffn
-
-@deffn {Command} {show bgp @{ipv4|ipv6@} summary} {}
-Show a bgp peer summary for the specified address family.
-@end deffn
-
-@deffn {Command} {show bgp @{ipv4|ipv6@} neighbor [@var{peer}]} {}
-This command shows information on a specific BGP @var{peer}.
-@end deffn
-
-@deffn {Command} {show bgp @{ipv4|ipv6@} dampening dampened-paths} {}
-Display paths suppressed due to dampening.
-@end deffn
-
-@deffn {Command} {show bgp @{ipv4|ipv6@} dampening flap-statistics} {}
-Display flap statistics of routes.
-@end deffn
-
-@node Other BGP commands
-@subsection Other BGP commands
-
-@deffn {Command} {clear bgp @{ipv4|ipv6@} *} {}
-Clear all address family peers.
-@end deffn
-
-@deffn {Command} {clear bgp @{ipv4|ipv6@} @var{peer}} {}
-Clear peers which have addresses of X.X.X.X
-@end deffn
-
-@deffn {Command} {clear bgp @{ipv4|ipv6@} @var{peer} soft in} {}
-Clear peer using soft reconfiguration.
-@end deffn
-
-@deffn {Command} {show debug} {}
-@end deffn
-
-@deffn {Command} {debug event} {}
-@end deffn
-
-@deffn {Command} {debug update} {}
-@end deffn
-
-@deffn {Command} {debug keepalive} {}
-@end deffn
-
-@deffn {Command} {no debug event} {}
-@end deffn
-
-@deffn {Command} {no debug update} {}
-@end deffn
-
-@deffn {Command} {no debug keepalive} {}
-@end deffn
-
-@node Capability Negotiation
-@section Capability Negotiation
-
-When adding IPv6 routing information exchange feature to BGP.  There
-were some proposals.  @acronym{IETF,Internet Engineering Task Force}
-@acronym{IDR, Inter Domain Routing} @acronym{WG, Working group} adopted
-a proposal called Multiprotocol Extension for BGP.  The specification
-is described in @cite{RFC2283}.  The protocol does not define new protocols. 
-It defines new attributes to existing BGP.  When it is used exchanging
-IPv6 routing information it is called BGP-4+.  When it is used for
-exchanging multicast routing information it is called MBGP.
-
-@command{bgpd} supports Multiprotocol Extension for BGP.  So if remote
-peer supports the protocol, @command{bgpd} can exchange IPv6 and/or
-multicast routing information.
-
-Traditional BGP did not have the feature to detect remote peer's
-capabilities, e.g. whether it can handle prefix types other than IPv4
-unicast routes.  This was a big problem using Multiprotocol Extension
-for BGP to operational network.  @cite{RFC2842, Capabilities
-Advertisement with BGP-4} adopted a feature called Capability
-Negotiation. @command{bgpd} use this Capability Negotiation to detect
-the remote peer's capabilities.  If the peer is only configured as IPv4
-unicast neighbor, @command{bgpd} does not send these Capability
-Negotiation packets (at least not unless other optional BGP features
-require capability negotation).
-
-By default, Frr will bring up peering with minimal common capability
-for the both sides.  For example, local router has unicast and
-multicast capabilitie and remote router has unicast capability.  In
-this case, the local router will establish the connection with unicast
-only capability. When there are no common capabilities, Frr sends
-Unsupported Capability error and then resets the connection.
-
-If you want to completely match capabilities with remote peer.  Please
-use @command{strict-capability-match} command.
-  
-@deffn {BGP} {neighbor @var{peer} strict-capability-match} {}
-@deffnx {BGP} {no neighbor @var{peer} strict-capability-match} {}
-Strictly compares remote capabilities and local capabilities.  If capabilities
-are different, send Unsupported Capability error then reset connection.
-@end deffn
-
-You may want to disable sending Capability Negotiation OPEN message
-optional parameter to the peer when remote peer does not implement
-Capability Negotiation.  Please use @command{dont-capability-negotiate}
-command to disable the feature.
-
-@deffn {BGP} {neighbor @var{peer} dont-capability-negotiate} {}
-@deffnx {BGP} {no neighbor @var{peer} dont-capability-negotiate} {}
-Suppress sending Capability Negotiation as OPEN message optional
-parameter to the peer.  This command only affects the peer is configured
-other than IPv4 unicast configuration.
-@end deffn
-
-When remote peer does not have capability negotiation feature, remote
-peer will not send any capabilities at all.  In that case, bgp
-configures the peer with configured capabilities.
-
-You may prefer locally configured capabilities more than the negotiated
-capabilities even though remote peer sends capabilities.  If the peer
-is configured by @command{override-capability}, @command{bgpd} ignores
-received capabilities then override negotiated capabilities with
-configured values.
-
-@deffn {BGP} {neighbor @var{peer} override-capability} {}
-@deffnx {BGP} {no neighbor @var{peer} override-capability} {}
-Override the result of Capability Negotiation with local configuration.
-Ignore remote peer's capability value.
-@end deffn
-
-@node Route Reflector
-@section Route Reflector
-
-@deffn {BGP} {bgp cluster-id @var{a.b.c.d}} {}
-@end deffn
-
-@deffn {BGP} {neighbor @var{peer} route-reflector-client} {}
-@deffnx {BGP} {no neighbor @var{peer} route-reflector-client} {}
-@end deffn
-
-@node Route Server
-@section Route Server
-
-At an Internet Exchange point, many ISPs are connected to each other by
-external BGP peering.  Normally these external BGP connection are done by
-@samp{full mesh} method.  As with internal BGP full mesh formation,
-this method has a scaling problem.
-
-This scaling problem is well known.  Route Server is a method to resolve
-the problem.  Each ISP's BGP router only peers to Route Server.  Route
-Server serves as BGP information exchange to other BGP routers.  By
-applying this method, numbers of BGP connections is reduced from
-O(n*(n-1)/2) to O(n).
-
-Unlike normal BGP router, Route Server must have several routing tables
-for managing different routing policies for each BGP speaker.  We call the
-routing tables as different @code{view}s.  @command{bgpd} can work as
-normal BGP router or Route Server or both at the same time.
-
-@menu
-* Multiple instance::           
-* BGP instance and view::       
-* Routing policy::              
-* Viewing the view::            
-@end menu
-
-@node Multiple instance
-@subsection Multiple instance
-
-To enable multiple view function of @code{bgpd}, you must turn on
-multiple instance feature beforehand.
-
-@deffn {Command} {bgp multiple-instance} {}
-Enable BGP multiple instance feature.  After this feature is enabled,
-you can make multiple BGP instances or multiple BGP views.
-@end deffn
-
-@deffn {Command} {no bgp multiple-instance} {}
-Disable BGP multiple instance feature.  You can not disable this feature
-when BGP multiple instances or views exist.
-@end deffn
-
-When you want to make configuration more Cisco like one, 
-
-@deffn {Command} {bgp config-type cisco} {}
-Cisco compatible BGP configuration output.
-@end deffn
-
-When bgp config-type cisco is specified, 
-
-``no synchronization'' is displayed.
-``no auto-summary'' is displayed.
-
-``network'' and ``aggregate-address'' argument is displayed as
-``A.B.C.D M.M.M.M''
-
-Frr: network 10.0.0.0/8
-Cisco: network 10.0.0.0
-
-Frr: aggregate-address 192.168.0.0/24
-Cisco: aggregate-address 192.168.0.0 255.255.255.0
-
-Community attribute handling is also different.  If there is no
-configuration is specified community attribute and extended community
-attribute are sent to neighbor.  When user manually disable the
-feature community attribute is not sent to the neighbor.  In case of
-@command{bgp config-type cisco} is specified, community attribute is not
-sent to the neighbor by default.  To send community attribute user has
-to specify @command{neighbor A.B.C.D send-community} command.
-
-@example
-!
-router bgp 1
- neighbor 10.0.0.1 remote-as 1
- address-family ipv4 unicast
-  no neighbor 10.0.0.1 send-community
- exit-address-family
-!
-router bgp 1
- neighbor 10.0.0.1 remote-as 1
- address-family ipv4 unicast
-  neighbor 10.0.0.1 send-community
- exit-address-family
-!
-@end example
-
-@deffn {Command} {bgp config-type zebra} {}
-Frr style BGP configuration.  This is default.
-@end deffn
-
-@node BGP instance and view
-@subsection BGP instance and view
-
-BGP instance is a normal BGP process.  The result of route selection
-goes to the kernel routing table.  You can setup different AS at the
-same time when BGP multiple instance feature is enabled.
-
-@deffn {Command} {router bgp @var{as-number}} {}
-Make a new BGP instance.  You can use arbitrary word for the @var{name}.
-@end deffn
-
-@example
-@group
-bgp multiple-instance
-!
-router bgp 1
- neighbor 10.0.0.1 remote-as 2
- neighbor 10.0.0.2 remote-as 3
-!
-router bgp 2
- neighbor 10.0.0.3 remote-as 4
- neighbor 10.0.0.4 remote-as 5
-@end group
-@end example
-
-BGP view is almost same as normal BGP process. The result of
-route selection does not go to the kernel routing table.  BGP view is
-only for exchanging BGP routing information.
-
-@deffn {Command} {router bgp @var{as-number} view @var{name}} {}
-Make a new BGP view.  You can use arbitrary word for the @var{name}.  This
-view's route selection result does not go to the kernel routing table.
-@end deffn
-
-With this command, you can setup Route Server like below.
-
-@example
-@group
-bgp multiple-instance
-!
-router bgp 1 view 1
- neighbor 10.0.0.1 remote-as 2
- neighbor 10.0.0.2 remote-as 3
-!
-router bgp 2 view 2
- neighbor 10.0.0.3 remote-as 4
- neighbor 10.0.0.4 remote-as 5
-@end group
-@end example
-
-@node Routing policy
-@subsection Routing policy
-
-You can set different routing policy for a peer.  For example, you can
-set different filter for a peer.
-
-@example
-@group
-bgp multiple-instance
-!
-router bgp 1 view 1
- neighbor 10.0.0.1 remote-as 2
- address-family ipv4 unicast
-  neighbor 10.0.0.1 distribute-list 1 in
- exit-address-family
-!
-router bgp 1 view 2
- neighbor 10.0.0.1 remote-as 2
- address-family ipv4 unicast
-  neighbor 10.0.0.1 distribute-list 2 in
- exit-address-family
-@end group
-@end example
-
-This means BGP update from a peer 10.0.0.1 goes to both BGP view 1 and view
-2.  When the update is inserted into view 1, distribute-list 1 is
-applied.  On the other hand, when the update is inserted into view 2,
-distribute-list 2 is applied.
-
-@node Viewing the view
-@subsection Viewing the view
-
-To display routing table of BGP view, you must specify view name.
-
-@deffn {Command} {show ip bgp view @var{name}} {}
-Display routing table of BGP view @var{name}.
-@end deffn
-
-@node BGP Regular Expressions
-@section BGP Regular Expressions
-
-BGP regular expressions are based on @code{POSIX 1003.2} regular
-expressions. The following description is just a quick subset of the
-@code{POSIX} regular expressions. Adding to that, the special character
-'_' is added.
-
-@table @code
-@item .
-Matches any single character.
-@item *
-Matches 0 or more occurrences of pattern.
-@item +
-Matches 1 or more occurrences of pattern.
-@item ?
-Match 0 or 1 occurrences of pattern.
-@item ^
-Matches the beginning of the line.
-@item $
-Matches the end of the line.
-@item _
-Character @code{_} has special meanings in BGP regular expressions.
-It matches to space and comma , and AS set delimiter @{ and @} and AS
-confederation delimiter @code{(} and @code{)}.  And it also matches to
-the beginning of the line and the end of the line.  So @code{_} can be
-used for AS value boundaries match. This character technically evaluates
-to @code{(^|[,@{@}() ]|$)}.
-@end table
-
-@node How to set up a 6-Bone connection
-@section How to set up a 6-Bone connection
-
-
-@example
-@group
-zebra configuration 
-=================== 
-!  
-! Actually there is no need to configure zebra 
-!
-
-bgpd configuration
-==================
-!
-! This means that routes go through zebra and into the kernel.
-!
-router zebra
-!
-! MP-BGP configuration
-!
-router bgp 7675
- bgp router-id 10.0.0.1
- neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 remote-as @var{as-number}
-!
- address-family ipv6
- network 3ffe:506::/32
- neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 activate
- neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 route-map set-nexthop out
- neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 remote-as @var{as-number}
- neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 route-map set-nexthop out
- exit-address-family
-!
-ipv6 access-list all permit any
-!
-! Set output nexthop address.
-!
-route-map set-nexthop permit 10
- match ipv6 address all
- set ipv6 nexthop global 3ffe:1cfa:0:2:2c0:4fff:fe68:a225
- set ipv6 nexthop local fe80::2c0:4fff:fe68:a225
-!
-! logfile FILENAME is obsolete.  Please use log file FILENAME
-
-log file bgpd.log
-!
-@end group
-@end example
-
-@node Dump BGP packets and table
-@section Dump BGP packets and table
-
-@deffn Command {dump bgp all @var{path} [@var{interval}]} {}
-@deffnx Command {dump bgp all-et @var{path} [@var{interval}]} {}
-@deffnx Command {no dump bgp all [@var{path}] [@var{interval}]} {}
-Dump all BGP packet and events to @var{path} file.
-If @var{interval} is set, a new file will be created for echo @var{interval} of seconds.
-The path @var{path} can be set with date and time formatting (strftime).
-The type ‘all-et’ enables support for Extended Timestamp Header (@pxref{Packet Binary Dump Format}).
-(@pxref{Packet Binary Dump Format})
-@end deffn 
-
-@deffn Command {dump bgp updates @var{path} [@var{interval}]} {}
-@deffnx Command {dump bgp updates-et @var{path} [@var{interval}]} {}
-@deffnx Command {no dump bgp updates [@var{path}] [@var{interval}]} {}
-Dump only BGP updates messages to @var{path} file.
-If @var{interval} is set, a new file will be created for echo @var{interval} of seconds.
-The path @var{path} can be set with date and time formatting (strftime).
-The type ‘updates-et’ enables support for Extended Timestamp Header (@pxref{Packet Binary Dump Format}).
-@end deffn
-
-@deffn Command {dump bgp routes-mrt @var{path}} {}
-@deffnx Command {dump bgp routes-mrt @var{path} @var{interval}} {}
-@deffnx Command {no dump bgp route-mrt [@var{path}] [@var{interval}]} {}
-Dump whole BGP routing table to @var{path}.  This is heavy process.
-The path @var{path} can be set with date and time formatting (strftime).
-If @var{interval} is set, a new file will be created for echo @var{interval} of seconds.
-@end deffn
-
-Note: the interval variable can also be set using hours and minutes: 04h20m00.
-
-
-@node BGP Configuration Examples
-@section BGP Configuration Examples
-
-Example of a session to an upstream, advertising only one prefix to it.
-
-@example
-router bgp 64512
- bgp router-id 10.236.87.1
- neighbor upstream peer-group
- neighbor upstream remote-as 64515
- neighbor upstream capability dynamic
- neighbor 10.1.1.1 peer-group upstream
- neighbor 10.1.1.1 description ACME ISP
-
- address-family ipv4 unicast
-  network 10.236.87.0/24
-  neighbor upstream prefix-list pl-allowed-adv out
- exit-address-family
-!
-ip prefix-list pl-allowed-adv seq 5 permit 82.195.133.0/25
-ip prefix-list pl-allowed-adv seq 10 deny any
-
-@end example
-
-A more complex example. With upstream, peer and customer sessions.
-Advertising global prefixes and NO_EXPORT prefixes and providing
-actions for customer routes based on community values. Extensive use of
-route-maps and the 'call' feature to support selective advertising of
-prefixes. This example is intended as guidance only, it has NOT been
-tested and almost certainly containts silly mistakes, if not serious
-flaws.
-
-@example
-router bgp 64512
- bgp router-id 10.236.87.1
- neighbor upstream capability dynamic
- neighbor cust capability dynamic
- neighbor peer capability dynamic
- neighbor 10.1.1.1 remote-as 64515
- neighbor 10.1.1.1 peer-group upstream
- neighbor 10.2.1.1 remote-as 64516
- neighbor 10.2.1.1 peer-group upstream
- neighbor 10.3.1.1 remote-as 64517
- neighbor 10.3.1.1 peer-group cust-default
- neighbor 10.3.1.1 description customer1
- neighbor 10.4.1.1 remote-as 64518
- neighbor 10.4.1.1 peer-group cust
- neighbor 10.4.1.1 description customer2
- neighbor 10.5.1.1 remote-as 64519
- neighbor 10.5.1.1 peer-group peer
- neighbor 10.5.1.1 description peer AS 1
- neighbor 10.6.1.1 remote-as 64520
- neighbor 10.6.1.1 peer-group peer
- neighbor 10.6.1.1 description peer AS 2
-
- address-family ipv4 unicast
-  network 10.123.456.0/24
-  network 10.123.456.128/25 route-map rm-no-export
-  neighbor upstream route-map rm-upstream-out out
-  neighbor cust route-map rm-cust-in in
-  neighbor cust route-map rm-cust-out out
-  neighbor cust send-community both
-  neighbor peer route-map rm-peer-in in
-  neighbor peer route-map rm-peer-out out
-  neighbor peer send-community both
-  neighbor 10.3.1.1 prefix-list pl-cust1-network in
-  neighbor 10.4.1.1 prefix-list pl-cust2-network in
-  neighbor 10.5.1.1 prefix-list pl-peer1-network in
-  neighbor 10.6.1.1 prefix-list pl-peer2-network in
- exit-address-family
-!
-ip prefix-list pl-default permit 0.0.0.0/0
-!
-ip prefix-list pl-upstream-peers permit 10.1.1.1/32
-ip prefix-list pl-upstream-peers permit 10.2.1.1/32
-!
-ip prefix-list pl-cust1-network permit 10.3.1.0/24
-ip prefix-list pl-cust1-network permit 10.3.2.0/24
-!
-ip prefix-list pl-cust2-network permit 10.4.1.0/24
-!
-ip prefix-list pl-peer1-network permit 10.5.1.0/24
-ip prefix-list pl-peer1-network permit 10.5.2.0/24
-ip prefix-list pl-peer1-network permit 192.168.0.0/24
-!
-ip prefix-list pl-peer2-network permit 10.6.1.0/24
-ip prefix-list pl-peer2-network permit 10.6.2.0/24
-ip prefix-list pl-peer2-network permit 192.168.1.0/24
-ip prefix-list pl-peer2-network permit 192.168.2.0/24
-ip prefix-list pl-peer2-network permit 172.16.1/24
-!
-ip as-path access-list asp-own-as permit ^$
-ip as-path access-list asp-own-as permit _64512_
-!
-! #################################################################
-! Match communities we provide actions for, on routes receives from
-! customers. Communities values of <our-ASN>:X, with X, have actions:
-!
-! 100 - blackhole the prefix
-! 200 - set no_export
-! 300 - advertise only to other customers
-! 400 - advertise only to upstreams
-! 500 - set no_export when advertising to upstreams
-! 2X00 - set local_preference to X00
-!
-! blackhole the prefix of the route
-ip community-list standard cm-blackhole permit 64512:100
-!
-! set no-export community before advertising
-ip community-list standard cm-set-no-export permit 64512:200
-!
-! advertise only to other customers
-ip community-list standard cm-cust-only permit 64512:300
-!
-! advertise only to upstreams
-ip community-list standard cm-upstream-only permit 64512:400
-!
-! advertise to upstreams with no-export
-ip community-list standard cm-upstream-noexport permit 64512:500
-!
-! set local-pref to least significant 3 digits of the community
-ip community-list standard cm-prefmod-100 permit 64512:2100
-ip community-list standard cm-prefmod-200 permit 64512:2200
-ip community-list standard cm-prefmod-300 permit 64512:2300
-ip community-list standard cm-prefmod-400 permit 64512:2400
-ip community-list expanded cme-prefmod-range permit 64512:2...
-!
-! Informational communities
-!
-! 3000 - learned from upstream
-! 3100 - learned from customer
-! 3200 - learned from peer
-!
-ip community-list standard cm-learnt-upstream permit 64512:3000
-ip community-list standard cm-learnt-cust permit 64512:3100
-ip community-list standard cm-learnt-peer permit 64512:3200
-!
-! ###################################################################
-! Utility route-maps
-!
-! These utility route-maps generally should not used to permit/deny
-! routes, i.e. they do not have meaning as filters, and hence probably
-! should be used with 'on-match next'. These all finish with an empty
-! permit entry so as not interfere with processing in the caller.
-!
-route-map rm-no-export permit 10
- set community additive no-export
-route-map rm-no-export permit 20
-!
-route-map rm-blackhole permit 10
- description blackhole, up-pref and ensure it cant escape this AS
- set ip next-hop 127.0.0.1
- set local-preference 10
- set community additive no-export
-route-map rm-blackhole permit 20
-!
-! Set local-pref as requested
-route-map rm-prefmod permit 10
- match community cm-prefmod-100
- set local-preference 100
-route-map rm-prefmod permit 20
- match community cm-prefmod-200
- set local-preference 200
-route-map rm-prefmod permit 30
- match community cm-prefmod-300
- set local-preference 300
-route-map rm-prefmod permit 40
- match community cm-prefmod-400
- set local-preference 400
-route-map rm-prefmod permit 50
-!
-! Community actions to take on receipt of route.
-route-map rm-community-in permit 10
- description check for blackholing, no point continuing if it matches.
- match community cm-blackhole
- call rm-blackhole
-route-map rm-community-in permit 20
- match community cm-set-no-export
- call rm-no-export
- on-match next
-route-map rm-community-in permit 30
- match community cme-prefmod-range
- call rm-prefmod
-route-map rm-community-in permit 40
-!
-! #####################################################################
-! Community actions to take when advertising a route.
-! These are filtering route-maps, 
-!
-! Deny customer routes to upstream with cust-only set.
-route-map rm-community-filt-to-upstream deny 10
- match community cm-learnt-cust
- match community cm-cust-only
-route-map rm-community-filt-to-upstream permit 20
-!
-! Deny customer routes to other customers with upstream-only set.
-route-map rm-community-filt-to-cust deny 10
- match community cm-learnt-cust
- match community cm-upstream-only
-route-map rm-community-filt-to-cust permit 20
-!
-! ###################################################################
-! The top-level route-maps applied to sessions. Further entries could
-! be added obviously..
-!
-! Customers
-route-map rm-cust-in permit 10
- call rm-community-in
- on-match next
-route-map rm-cust-in permit 20
- set community additive 64512:3100
-route-map rm-cust-in permit 30
-!
-route-map rm-cust-out permit 10
- call rm-community-filt-to-cust
- on-match next
-route-map rm-cust-out permit 20
-!
-! Upstream transit ASes
-route-map rm-upstream-out permit 10
- description filter customer prefixes which are marked cust-only
- call rm-community-filt-to-upstream
- on-match next
-route-map rm-upstream-out permit 20
- description only customer routes are provided to upstreams/peers
- match community cm-learnt-cust
-!
-! Peer ASes
-! outbound policy is same as for upstream
-route-map rm-peer-out permit 10
- call rm-upstream-out
-!
-route-map rm-peer-in permit 10
- set community additive 64512:3200
-@end example
-
-@include rpki.texi
diff --git a/doc/cli.md b/doc/cli.md
deleted file mode 100644 (file)
index 723237e..0000000
+++ /dev/null
@@ -1,557 +0,0 @@
-FRR Command Line Interface
-==========================
-
-Definition Grammar
-------------------
-
-This is a reference for the syntax used when defining new CLI commands.  An
-example definition is:
-
-```
-DEFUN (command_name,
-       command_name_cmd,
--->    "example <command|line [interface]> DEFINITION...",
-       <..doc strings..>)
-```
-
-The arrowed part is the definition string.
-
-Explicit syntax rules in Flex and Bison may be found in lib/command_lex.l and
-lib/command_parse.y, respectively. If you can read BNF and regex those will be
-more useful than this document.
-
-If the parser is throwing syntax or other errors and you can't figure out why,
-it's unlikely to be a bug in the parser. If the error message is not useful,
-please file a bug for a better error message. If all else fails, read the token
-definitions in the lexer source and the Bison BNF in the parser source.
-
-Characters allowed in each token type:
-
-Tokens
-------
-* `WORD`        -- A token that begins with +, -, or a lowercase letter. It is
-                   an unchanging part of the command and will only match itself.
-                   Example: "show ip bgp", every token is a WORD.
-* `IPV4`        -- 'A.B.C.D', matches an IPv4 address.
-* `IPV6`        -- 'X:X::X:X', matches an IPv6 address.
-* `IPV4_PREFIX` -- 'A.B.C.D/M', matches an IPv4 prefix in CIDR notation.
-* `IPV6_PREFIX` -- 'X:X::X:X/M', matches an IPv6 prefix in CIDR notation.
-* `MAC`         -- 'M:A:C', matches a 48-bit mac address
-* `MAC_PREFIX`  -- 'M:A:C/M', matches a 48-bit mac address with a mask
-* `VARIABLE`    -- Begins with a capital letter. Matches any input.
-* `RANGE`       -- Numeric range delimited by parentheses, e.g. (-100 - 100) or
-                   (10-20). Will only match numbers in the range.
-
-Rules
------
-* `<angle|brackets>`  -- Contain sequences of tokens separated by pipes and
-                       provide mutual exclusion.  Sequences may contain
-                       `<mutual|exclusion>` but not as the first token.
-                       Disallowed: `"example <<a|b> c|d>"`
-                       Allowed:   `"example <a c|b c|d>"`
-* `[square brackets]` -- Contains sequences of tokens that are optional (can be
-                       omitted).  `[<a|b>]` can be shortened to `[a|b]`.
-* `{curly|braces}`    -- similar to angle brackets, but instead of mutual
-                       exclusion, curly braces indicate that one or more of the
-                       pipe-separated sequences may be provided in any order.
-* `VARIADICS...`      -- Any token which accepts input (so anything except WORD)
-                       and that occurs as the last token of a line may be
-                       followed by an ellipsis, which indicates that input
-                       matching the token may be repeated an unlimited number
-                       of times.
-* `$name`             -- Specify a variable name for the preceding token. See
-                       "Variable Names" below.
-
-Some general notes:
-
-* Options are allowed at the beginning of the command. The developer is
-  entreated to use these extremely sparingly. They are most useful for
-  implementing the 'no' form of configuration commands. Please think carefully
-  before using them for anything else. There is usually a better solution, even
-  if it is just separating out the command definition into separate ones.
-
-* The developer should judiciously apply separation of concerns when defining
-  CLI. CLI definitions for two unrelated or vaguely related commands or
-  configuration items should be defined in separate commands. Clarity is
-  preferred over LOC (within reason).
-
-* The maximum number of space-separated tokens that can be entered is presently
-  limited to 256. Please keep this limit in mind when implementing new CLI.
-
-Variable Names
---------------
-The parser tries to fill the "varname" field on each token.  This can happen
-either manually or automatically.  Manual specifications work by appending
-`"$name"` after the input specifier:
-
-```
-foo bar$cmd WORD$name A.B.C.D$ip
-```
-
-Note that you can also assign variable names to fixed input tokens, this can
-be useful if multiple commands share code.  You can also use "$name" after a
-multiple-choice option:
-
-```
-foo bar <A.B.C.D|X:X::X:X>$addr [optionA|optionB]$mode
-```
-
-The variable name is in this case assigned to the last token in each of the
-branches.
-
-Automatic assignment of variable names works by applying the following rules:
-
-- manual names always have priority
-- a "[no]" at the beginning receives "no" as varname on the "no" token
-- VARIABLE tokens whose text is not "WORD" or "NAME" receive a cleaned lowercase
-  version of the token text as varname, e.g. "ROUTE-MAP" becomes "route_map".
-- other variable tokens (i.e. everything except "fixed") receive the text of
-  the preceding fixed token as varname, if one can be found.  E.g.:
-  "ip route A.B.C.D/M INTERFACE" assigns "route" to the "A.B.C.D/M" token.
-
-These rules should make it possible to avoid manual varname assignment in 90%
-of the cases.
-
-DEFPY
------
-
-`DEFPY(...)` is an enhanced version of `DEFUN()` which is preprocessed by
-` python/clidef.py`.  The python script parses the command definition string,
-extracts variable names and types, and generates a C wrapper function that
-parses the variables and passes them on.  This means that in the CLI function
-body, you will receive additional parameters with appropriate types.
-
-This is best explained by an example:
-
-```
-DEFPY(func, func_cmd, "[no] foo bar A.B.C.D (0-99)$num", "...help...")
-
-=>
-
-func(self, vty, argc, argv,     /* standard CLI arguments */
-
-        const char *no,         /* unparsed "no" */
-        struct in_addr bar,     /* parsed IP address */
-        const char *bar_str,    /* unparsed IP address */
-        long num,               /* parsed num */
-        const char *num_str)    /* unparsed num */
-```
-
-Note that as documented in the previous section, "bar" is automatically
-applied as variable name for "A.B.C.D".  The python code then detects this
-is an IP address argument and generates code to parse it into a
-`struct in_addr`, passing it in `bar`.  The raw value is passed in `bar_str`.
-The range/number argument works in the same way with the explicitly given
-variable name.
-
-### Type rules
-
-| Token(s)                 | Type        | Value if omitted by user |
-|--------------------------|-------------|--------------------------|
-| `A.B.C.D`                | `struct in_addr`             | 0.0.0.0 |
-| `X:X::X:X`               | `struct in6_addr`            | ::      |
-| `A.B.C.D + X:X::X:X`     | `const union sockunion *`    | NULL    |
-| `A.B.C.D/M`              | `const struct prefix_ipv4 *` | NULL    |
-| `X:X::X:X/M`             | `const struct prefix_ipv6 *` | NULL    |
-| `A.B.C.D/M + X:X::X:X/M` | `const struct prefix *`      | NULL    |
-| `(0-9)`                  | `long`                       | 0       |
-| `VARIABLE`               | `const char *`               | NULL    |
-| `word`                   | `const char *`               | NULL    |
-| _all other_              | `const char *`               | NULL    |
-
-Note the following details:
-
-* not all parameters are pointers, some are passed as values.
-* when the type is not `const char *`, there will be an extra `_str` argument
-  with type `const char *`.
-* you can give a variable name not only to `VARIABLE` tokens but also to
-  `word` tokens (e.g. constant words).  This is useful if some parts of a
-  command are optional.  The type will be `const char *`.
-* `[no]` will be passed as `const char *no`.
-* pointers will be NULL when the argument is optional and the user did not
-  use it.
-* if a parameter is not a pointer, but is optional and the user didn't use it,
-  the default value will be passed.  Check the `_str` argument if you need to
-  determine whether the parameter was omitted.
-* if the definition contains multiple parameters with the same variable name,
-  they will be collapsed into a single function parameter.  The python code
-  will detect if the types are compatible (i.e. IPv4 + IPv6 variantes) and
-  choose a corresponding C type.
-* the standard DEFUN parameters (self, vty, argc, argv) are still present and
-  can be used.  A DEFUN can simply be **edited into a DEFPY without further
-  changes and it will still work**;  this allows easy forward migration.
-* a file may contain both DEFUN and DEFPY statements.
-
-### Getting a parameter dump
-
-The clidef.py script can be called to get a list of DEFUNs/DEFPYs with
-the parameter name/type list:
-
-```
-lib/clippy python/clidef.py --all-defun --show lib/plist.c > /dev/null
-```
-
-The generated code is printed to stdout, the info dump to stderr.  The
-`--all-defun` argument will make it process DEFUN blocks as well as DEFPYs,
-which is useful prior to converting some DEFUNs.  **The dump does not list
-the `_str` arguments** to keep the output shorter.
-
-Note that the clidef.py script cannot be run with python directly, it needs
-to be run with _clippy_ since the latter makes the CLI parser available.
-
-### Include & Makefile requirements
-
-A source file that uses DEFPY needs to include the `_clippy.c` file **before
-all DEFPY statements**:
-
-```
-/* GPL header */
-#include ...
-
-...
-
-#include "daemon/filename_clippy.c"
-
-DEFPY(...)
-DEFPY(...)
-
-install_element(...)
-```
-
-This dependency needs to be marked in Makefile.am:  (there is no ordering
-requirement)
-
-```
-include ../common.am
-
-# ...
-
-# if linked into a LTLIBRARY (.la/.so):
-filename.lo: filename_clippy.c
-
-# if linked into an executable or static library (.a):
-filename.o: filename_clippy.c
-```
-
-Doc Strings
------------
-Each token in a command definition should be documented with a brief doc
-string that informs a user of the meaning and/or purpose of the subsequent
-command tree. These strings are provided as the last parameter to DEFUN macros,
-concatenated together and separated by an escaped newline ('\n'). These are
-best explained by example.
-
-```
-DEFUN (config_terminal,
-       config_terminal_cmd,
-       "configure terminal",
-       "Configuration from vty interface\n"
-       "Configuration terminal\n")
-```
-
-The last parameter is split into two lines for readability. Two newline
-delimited doc strings are present, one for each token in the command. The
-second string documents the functionality of the 'terminal' command in the
-'configure' tree.
-
-Note that the first string, for 'configure' does not contain documentation for
-'terminal'. This is because the CLI is best envisioned as a tree, with tokens
-defining branches. An imaginary 'start' token is the root of every command in a
-CLI node. Each subsequent written token descends into a subtree, so the
-documentation for that token ideally summarizes all the functionality contained
-in the subtree.
-
-A consequence of this structure is that the developer must be careful to use
-the same doc strings when defining multiple commands that are part of the same
-tree. Commands which share prefixes must share the same doc strings for those
-prefixes. On startup the parser will generate warnings if it notices
-inconsistent doc strings. Behavior is undefined; the same token may show up
-twice in completions, with different doc strings, or it may show up once with a
-random doc string. Parser warnings should be heeded and fixed to avoid
-confusing users.
-
-The number of doc strings provided must be equal to the amount of tokens
-present in the command definition, read left to right, ignoring any special
-constructs.
-
-In the examples below, each arrowed token needs a doc string.
-
-```
-  "show ip bgp"
-   ^    ^  ^
-
-  "command <foo|bar> [example]"
-   ^        ^   ^     ^
-```
-
-Data Structures
----------------
-On startup, the CLI parser sequentially parses each command string definition
-and constructs a directed graph with each token forming a node. This graph is
-the basis of the entire CLI system. It is used to match user input in order to
-generate command completions and match commands to functions.
-
-There is one graph per CLI node (not the same as a graph node in the CLI
-graph). The CLI node struct keeps a reference to its graph (see lib/command.h).
-
-While most of the graph maintains the form of a tree, special constructs
-outlined in the Rules section introduce some quirks. <>, [] and {} form
-self-contained 'subgraphs'. Each subgraph is a tree except that all of the
-'leaves' actually share a child node. This helps with minimizing graph size and
-debugging.
-
-As an example, the subgraph generated by <foo|bar> looks like this:
-
-                      .
-                      .
-                      |
-                 +----+---+
-           +--- -+  FORK  +----+
-           |     +--------+    |
-        +--v---+            +--v---+
-        | foo  |            | bar  |
-        +--+---+            +--+---+
-           |      +------+     |
-           +------> JOIN <-----+
-                  +---+--+
-                      |
-                      .
-                      .
-
-FORK and JOIN nodes are plumbing nodes that don't correspond to user input.
-They're necessary in order to deduplicate these constructs where applicable.
-
-Options follow the same form, except that there is an edge from the FORK node
-to the JOIN node.
-
-Keywords follow the same form, except that there is an edge from JOIN to FORK.
-Because of this the CLI graph cannot be called acyclic. There is special logic
-in the input matching code that keeps a stack of paths already taken through
-the node in order to disallow following the same path more than once.
-
-Variadics are a bit special; they have an edge back to themselves, which allows
-repeating the same input indefinitely.
-
-The leaves of the graph are nodes that have no out edges. These nodes are
-special; their data section does not contain a token, as most nodes do, or
-NULL, as in FORK/JOIN nodes, but instead has a pointer to a cmd_element. All
-paths through the graph that terminate on a leaf are guaranteed to be defined
-by that command. When a user enters a complete command, the command matcher
-tokenizes the input and executes a DFS on the CLI graph. If it is
-simultaneously able to exhaust all input (one input token per graph node), and
-then find exactly one leaf connected to the last node it reaches, then the
-input has matched the corresponding command and the command is executed. If it
-finds more than one node, then the command is ambiguous (more on this in
-deduplication). If it cannot exhaust all input, the command is unknown. If it
-exhausts all input but does not find an edge node, the command is incomplete.
-
-The parser uses an incremental strategy to build the CLI graph for a node. Each
-command is parsed into its own graph, and then this graph is merged into the
-overall graph. During this merge step, the parser makes a best-effort attempt
-to remove duplicate nodes. If it finds a node in the overall graph that is
-equal to a node in the corresponding position in the command graph, it will
-intelligently merge the properties from the node in the command graph into the
-already-existing node. Subgraphs are also checked for isomorphism and merged
-where possible. The definition of whether two nodes are 'equal' is based on the
-equality of some set of token properties; read the parser source for the most
-up-to-date definition of equality.
-
-When the parser is unable to deduplicate some complicated constructs, this
-can result in two identical paths through separate parts of the graph. If
-this occurs and the user enters input that matches these paths, they will
-receive an 'ambiguous command' error and will be unable to execute the command.
-Most of the time the parser can detect and warn about duplicate commands, but
-it will not always be able to do this. Hence care should be taken before
-defining a new command to ensure it is not defined elsewhere.
-
-
-Command handlers
-----------------
-The block that follows a CLI definition is executed when a user enters input
-that matches the definition. Its function signature looks like this:
-
-int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]);
-
-The first argument is the command definition struct. The last argument is an
-ordered array of tokens that correspond to the path taken through the graph,
-and the argument just prior to that is the length of the array.
-
-The arrangement of the token array has changed from the prior incarnation of
-the CLI system. In the old system, missing arguments were padded with NULLs so
-that the same parts of a command would show up at the same indices regardless
-of what was entered. The new system does not perform such padding and therefore
-it is generally _incorrect_ to assume consistent indices in this array. As a
-simple example:
-
-Command definition:
-```
-  command [foo] <bar|baz>
-```
-
-User enters:
-```
-  command foo bar
-```
-
-Array:
-```
-  [0] -> command
-  [1] -> foo
-  [2] -> bar
-```
-
-User enters:
-```
-  command baz
-```
-
-Array:
-```
-  [0] -> command
-  [1] -> baz
-```
-
-
-
-Command abbreviation & matching priority
-----------------------------------------
-As in the prior implementation, it is possible for users to elide parts of
-tokens when the CLI matcher does not need them to make an unambiguous match.
-This is best explained by example.
-
-Command definitions:
-```
-  command dog cow
-  command dog crow
-```
-
-User input:
-```
-  c d c         -> ambiguous command
-  c d co        -> match "command dog cow"
-```
-
-In the new implementation, this functionality has improved. Where previously
-the parser would stop at the first ambiguous token, it will now look ahead and
-attempt to disambiguate based on tokens later on in the input string.
-
-Command definitions:
-```
-  show ip bgp A.B.C.D
-  show ipv6 bgp X:X::X:X
-```
-
-User enters:
-```
-  s i b 4.3.2.1         -> match "show ip bgp A.B.C.D"
-  s i b ::e0            -> match "show ipv6 bgp X:X::X:X"
-```
-
-Previously both of these commands would be ambiguous since 'i' does not
-explicitly select either 'ip' or 'ipv6'. However, since the user later provides
-a token that matches only one of the commands (an IPv4 or IPv6 address) the
-parser is able to look ahead and select the appropriate command. This has some
-implications for parsing the argv*[] that is passed to the command handler.
-
-Now consider a command definition such as:
-```
-  command <foo|VAR>
-```
-
-'foo' only matches the string 'foo', but 'VAR' matches any input, including
-'foo'. Who wins? In situations like this the matcher will always choose the
-'better' match, so 'foo' will win.
-
-Consider also:
-```
-  show <ip|ipv6> foo
-```
-
-User input:
-```
-  show ip foo
-```
-
-'ip' partially matches 'ipv6' but exactly matches 'ip', so 'ip' will win.
-
-
-struct cmd_token
-----------------
-
-```
-/* Command token struct. */
-struct cmd_token
-{
-  enum cmd_token_type type;     // token type
-  u_char attr;                  // token attributes
-  bool allowrepeat;             // matcher allowed to match token repetitively?
-
-  char *text;                   // token text
-  char *desc;                   // token description
-  long long min, max;           // for ranges
-  char *arg;                    // user input that matches this token
-  char *varname;                // variable name
-};
-```
-
-This struct is used in the CLI graph to match input against. It is also used to
-pass user input to command handler functions, as it is frequently useful for
-handlers to have access to that information. When a command is matched, the
-sequence of cmd_tokens that form the matching path are duplicated and placed in
-order into argv*[]. Before this happens the ->arg field is set to point at the
-snippet of user input that matched it.
-
-For most nontrivial commands the handler function will need to determine which
-of the possible matching inputs was entered. Previously this was done by
-looking at the first few characters of input. This is now considered an
-anti-pattern and should be avoided. Instead, the ->type or ->text fields for
-this logic. The ->type field can be used when the possible inputs differ in
-type. When the possible types are the same, use the ->text field. This field
-has the full text of the corresponding token in the definition string and using
-it makes for much more readable code. An example is helpful.
-
-Command definition:
-```
-  command <(1-10)|foo|BAR>
-```
-
-In this example, the user may enter any one of:
-  * an integer between 1 and 10
-  * "foo"
-  * anything at all
-
-If the user enters "command f", then:
-
-```
-argv[1]->type == WORD_TKN
-argv[1]->arg  == "f"
-argv[1]->text == "foo"
-```
-
-Range tokens have some special treatment; a token with ->type == RANGE_TKN will
-have the ->min and ->max fields set to the bounding values of the range.
-
-
-Permutations
-------------
-Finally, it is sometimes useful to check all the possible combinations of input
-that would match an arbitrary definition string. There is a tool in tools/
-called 'permutations' that reads CLI definition strings on stdin and prints out
-all matching input permutations. It also dumps a text representation of the
-graph, which is more useful for debugging than anything else. It looks like
-this:
-
-```
-$ ./permutations "show [ip] bgp [<view|vrf> WORD]"
-
-show ip bgp view WORD
-show ip bgp vrf WORD
-show ip bgp
-show bgp view WORD
-show bgp vrf WORD
-show bgp
-```
-
-This functionality is also built into VTY/VTYSH; the 'list permutations'
-command will list all possible matching input permutations in the current CLI
-node.
diff --git a/doc/code/.gitignore b/doc/code/.gitignore
deleted file mode 100644 (file)
index 0505537..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/_templates
-/_build
-!/Makefile
diff --git a/doc/code/Makefile b/doc/code/Makefile
deleted file mode 100644 (file)
index 056b78e..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS    =
-SPHINXBUILD   = sphinx-build
-PAPER         =
-BUILDDIR      = _build
-
-# User-friendly check for sphinx-build
-ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
-endif
-
-# Internal variables.
-PAPEROPT_a4     = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help
-help:
-       @echo "Please use \`make <target>' where <target> is one of"
-       @echo "  html       to make standalone HTML files"
-       @echo "  dirhtml    to make HTML files named index.html in directories"
-       @echo "  singlehtml to make a single large HTML file"
-       @echo "  pickle     to make pickle files"
-       @echo "  json       to make JSON files"
-       @echo "  htmlhelp   to make HTML files and a HTML help project"
-       @echo "  qthelp     to make HTML files and a qthelp project"
-       @echo "  applehelp  to make an Apple Help Book"
-       @echo "  devhelp    to make HTML files and a Devhelp project"
-       @echo "  epub       to make an epub"
-       @echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-       @echo "  latexpdf   to make LaTeX files and run them through pdflatex"
-       @echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
-       @echo "  text       to make text files"
-       @echo "  man        to make manual pages"
-       @echo "  texinfo    to make Texinfo files"
-       @echo "  info       to make Texinfo files and run them through makeinfo"
-       @echo "  gettext    to make PO message catalogs"
-       @echo "  changes    to make an overview of all changed/added/deprecated items"
-       @echo "  xml        to make Docutils-native XML files"
-       @echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
-       @echo "  linkcheck  to check all external links for integrity"
-       @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
-       @echo "  coverage   to run coverage check of the documentation (if enabled)"
-
-.PHONY: clean
-clean:
-       rm -rf $(BUILDDIR)/*
-
-.PHONY: html
-html:
-       $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
-       @echo
-       @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-.PHONY: dirhtml
-dirhtml:
-       $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
-       @echo
-       @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-.PHONY: singlehtml
-singlehtml:
-       $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
-       @echo
-       @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-.PHONY: pickle
-pickle:
-       $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
-       @echo
-       @echo "Build finished; now you can process the pickle files."
-
-.PHONY: json
-json:
-       $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
-       @echo
-       @echo "Build finished; now you can process the JSON files."
-
-.PHONY: htmlhelp
-htmlhelp:
-       $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
-       @echo
-       @echo "Build finished; now you can run HTML Help Workshop with the" \
-             ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-.PHONY: qthelp
-qthelp:
-       $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
-       @echo
-       @echo "Build finished; now you can run "qcollectiongenerator" with the" \
-             ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
-       @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FRR.qhcp"
-       @echo "To view the help file:"
-       @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FRR.qhc"
-
-.PHONY: applehelp
-applehelp:
-       $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
-       @echo
-       @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
-       @echo "N.B. You won't be able to view it unless you put it in" \
-             "~/Library/Documentation/Help or install it in your application" \
-             "bundle."
-
-.PHONY: devhelp
-devhelp:
-       $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
-       @echo
-       @echo "Build finished."
-       @echo "To view the help file:"
-       @echo "# mkdir -p $$HOME/.local/share/devhelp/FRR"
-       @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FRR"
-       @echo "# devhelp"
-
-.PHONY: epub
-epub:
-       $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
-       @echo
-       @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-.PHONY: latex
-latex:
-       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-       @echo
-       @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
-       @echo "Run \`make' in that directory to run these through (pdf)latex" \
-             "(use \`make latexpdf' here to do that automatically)."
-
-.PHONY: latexpdf
-latexpdf:
-       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-       @echo "Running LaTeX files through pdflatex..."
-       $(MAKE) -C $(BUILDDIR)/latex all-pdf
-       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-.PHONY: latexpdfja
-latexpdfja:
-       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-       @echo "Running LaTeX files through platex and dvipdfmx..."
-       $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
-       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-.PHONY: text
-text:
-       $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
-       @echo
-       @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-.PHONY: man
-man:
-       $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
-       @echo
-       @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-.PHONY: texinfo
-texinfo:
-       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
-       @echo
-       @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
-       @echo "Run \`make' in that directory to run these through makeinfo" \
-             "(use \`make info' here to do that automatically)."
-
-.PHONY: info
-info:
-       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
-       @echo "Running Texinfo files through makeinfo..."
-       make -C $(BUILDDIR)/texinfo info
-       @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
-.PHONY: gettext
-gettext:
-       $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
-       @echo
-       @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
-.PHONY: changes
-changes:
-       $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
-       @echo
-       @echo "The overview file is in $(BUILDDIR)/changes."
-
-.PHONY: linkcheck
-linkcheck:
-       $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
-       @echo
-       @echo "Link check complete; look for any errors in the above output " \
-             "or in $(BUILDDIR)/linkcheck/output.txt."
-
-.PHONY: doctest
-doctest:
-       $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
-       @echo "Testing of doctests in the sources finished, look at the " \
-             "results in $(BUILDDIR)/doctest/output.txt."
-
-.PHONY: coverage
-coverage:
-       $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
-       @echo "Testing of coverage in the sources finished, look at the " \
-             "results in $(BUILDDIR)/coverage/python.txt."
-
-.PHONY: xml
-xml:
-       $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
-       @echo
-       @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
-
-.PHONY: pseudoxml
-pseudoxml:
-       $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
-       @echo
-       @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/doc/code/conf.py b/doc/code/conf.py
deleted file mode 100644 (file)
index 38be7f2..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# FRR documentation build configuration file, created by
-# sphinx-quickstart on Tue Jan 31 16:00:52 2017.
-#
-# This file is execfile()d with the current directory set to its
-# containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys
-import os
-import re
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-
-# -- General configuration ------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = ['sphinx.ext.todo']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix(es) of source filenames.
-# You can specify multiple suffix as a list of string:
-# source_suffix = ['.rst', '.md']
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'FRR'
-copyright = u'2017, FRR'
-author = u'FRR'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-
-# The short X.Y version.
-version = u'?.?'
-# The full version, including alpha/beta/rc tags.
-release = u'?.?-?'
-
-val = re.compile('^S\["([^"]+)"\]="(.*)"$')
-with open('../../config.status', 'r') as cfgstatus:
-    for ln in cfgstatus.readlines():
-        m = val.match(ln)
-        if m is None: continue
-        if m.group(1) == 'PACKAGE_VERSION':
-            release = m.group(2)
-            version = release.split('-')[0]
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#
-# This is also used if you do content translation via gettext catalogs.
-# Usually you set "language" from the command line for these cases.
-language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all
-# documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-# If true, `todo` and `todoList` produce output, else they produce nothing.
-todo_include_todos = True
-
-
-# -- Options for HTML output ----------------------------------------------
-
-# The theme to use for HTML and HTML Help pages.  See the documentation for
-# a list of builtin themes.
-html_theme = 'sphinx_rtd_theme'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further.  For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-#html_extra_path = []
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it.  The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Language to be used for generating the HTML full-text search index.
-# Sphinx supports the following languages:
-#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
-#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
-#html_search_language = 'en'
-
-# A dictionary with options for the search language support, empty by default.
-# Now only 'ja' uses this config value
-#html_search_options = {'type': 'default'}
-
-# The name of a javascript file (relative to the configuration directory) that
-# implements a search results scorer. If empty, the default will be used.
-#html_search_scorer = 'scorer.js'
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'FRRdoc'
-
-# -- Options for LaTeX output ---------------------------------------------
-
-latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
-
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
-
-# Latex figure (float) alignment
-#'figure_align': 'htbp',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-#  author, documentclass [howto, manual, or own class]).
-latex_documents = [
-    (master_doc, 'FRR.tex', u'FRR Documentation',
-     u'FRR', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output ---------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
-    (master_doc, 'frr', u'FRR Documentation',
-     [author], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-
-# -- Options for Texinfo output -------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-#  dir menu entry, description, category)
-texinfo_documents = [
-    (master_doc, 'FRR', u'FRR Documentation',
-     author, 'FRR', 'One line description of project.',
-     'Miscellaneous'),
-]
-
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
-
-# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
diff --git a/doc/code/hooks.rst b/doc/code/hooks.rst
deleted file mode 100644 (file)
index 0afa297..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-.. highlight:: c
-
-Hooks
-=====
-
-Libfrr provides type-safe subscribable hook points where other pieces of
-code can add one or more callback functions.  "type-safe" in this case
-applies to the function pointers used for subscriptions.  The
-implementations checks (at compile-time) wheter a callback to be added has
-the appropriate function signature (parameters) for the hook.
-
-Example:
-
-.. code-block:: c
-     :caption: mydaemon.h
-
-     #include "hook.h"
-     DECLARE_HOOK(some_update_event, (struct eventinfo *info), (info))
-
-.. code-block:: c
-     :caption: mydaemon.c
-
-     #include "mydaemon.h"
-     DEFINE_HOOK(some_update_event, (struct eventinfo *info), (info))
-     ...
-     hook_call(some_update_event, info);
-
-.. code-block:: c
-     :caption: mymodule.c
-
-     #include "mydaemon.h"
-     static int event_handler(struct eventinfo *info);
-     ...
-     hook_register(some_update_event, event_handler);
-
-Do not use parameter names starting with "hook", these can collide with
-names used by the hook code itself.
-
-
-Return values
--------------
-
-Callbacks to be placed on hooks always return "int" for now;  hook_call will
-sum up the return values from each called function.  (The default is 0 if no
-callbacks are registered.)
-
-There are no pre-defined semantics for the value, in most cases it is
-ignored.  For success/failure indication, 0 should be success, and
-handlers should make sure to only return 0 or 1 (not -1 or other values).
-
-There is no built-in way to abort executing a chain after a failure of one
-of the callbacks.  If this is needed, the hook can use an extra
-``bool *aborted`` argument.
-
-
-Priorities
-----------
-
-Hooks support a "priority" value for ordering registered calls
-relative to each other.  The priority is a signed integer where lower
-values are called earlier.  There are also "Koohs", which is hooks with
-reverse priority ordering (for cleanup/deinit hooks, so you can use the
-same priority value).
-
-Recommended priority value ranges are:
-
-======================== ===================================================
-Range                    Usage
------------------------- ---------------------------------------------------
- -999 ...     0 ...  999 main executable / daemon, or library
-
--1999 ... -1000          modules registering calls that should run before
-                         the daemon's bits
-
-1000 ... 1999            modules' calls that should run after daemon's
-                         (includes default value: 1000)
-======================== ===================================================
-
-Note: the default value is 1000, based on the following 2 expectations:
-
-- most hook_register() usage will be in loadable modules
-- usage of hook_register() in the daemon itself may need relative ordering
-  to itself, making an explicit value the expected case
-
-The priority value is passed as extra argument on hook_register_prio() /
-hook_register_arg_prio().  Whether a hook runs in reverse is determined
-solely by the code defining / calling the hook.  (DECLARE_KOOH is actually
-the same thing as DECLARE_HOOK, it's just there to make it obvious.)
-
-
-Definition
-----------
-
-.. c:macro:: DECLARE_HOOK(name, arglist, passlist)
-.. c:macro:: DECLARE_KOOH(name, arglist, passlist)
-
-   :param name: Name of the hook to be defined
-   :param arglist: Function definition style parameter list in braces.
-   :param passlist: List of the same parameters without their types.
-
-   Note:  the second and third macro args must be the hook function's
-   parameter list, with the same names for each parameter.  The second
-   macro arg is with types (used for defining things), the third arg is
-   just the names (used for passing along parameters).
-
-   This macro must be placed in a header file;  this header file must be
-   included to register a callback on the hook.
-
-   Examples:
-
-   .. code-block:: c
-
-      DECLARE_HOOK(foo, (), ())
-      DECLARE_HOOK(bar, (int arg), (arg))
-      DECLARE_HOOK(baz, (const void *x, in_addr_t y), (x, y))
-
-.. c:macro:: DEFINE_HOOK(name, arglist, passlist)
-
-   Implements an hook.  Each ``DECLARE_HOOK`` must have be accompanied by
-   exactly one ``DEFINE_HOOK``, which needs to be placed in a source file.
-   **The hook can only be called from this source file.**  This is intentional
-   to avoid overloading and/or misusing hooks for distinct purposes.
-
-   The compiled source file will include a global symbol with the name of the
-   hook prefixed by `_hook_`.  Trying to register a callback for a hook that
-   doesn't exist will therefore result in a linker error, or a module
-   load-time error for dynamic modules.
-
-.. c:macro:: DEFINE_KOOH(name, arglist, passlist)
-
-   Same as ``DEFINE_HOOK``, but the sense of priorities / order of callbacks
-   is reversed.  This should be used for cleanup hooks.
-
-.. c:function:: int hook_call(name, ...)
-
-   Calls the specified named hook.  Parameters to the hook are passed right
-   after the hook name, e.g.:
-
-   .. code-block:: c
-
-      hook_call(foo);
-      hook_call(bar, 0);
-      hook_call(baz, NULL, INADDR_ANY);
-
-   Returns the sum of return values from all callbacks.  The ``DEFINE_HOOK``
-   statement for the hook must be placed in the file before any ``hook_call``
-   use of the hook.
-
-
-Callback registration
----------------------
-
-.. c:function:: void hook_register(name, int (*callback)(...))
-.. c:function:: void hook_register_prio(name, int priority, int (*callback)(...))
-.. c:function:: void hook_register_arg(name, int (*callback)(void *arg, ...), void *arg)
-.. c:function:: void hook_register_arg_prio(name, int priority, int (*callback)(void *arg, ...), void *arg)
-
-   Register a callback with an hook.  If the caller needs to pass an extra
-   argument to the callback, the _arg variant can be used and the extra
-   parameter will be passed as first argument to the callback.  There is no
-   typechecking for this argument.
-
-   The priority value is used as described above.  The variants without a
-   priority parameter use 1000 as priority value.
-
-.. c:function:: void hook_unregister(name, int (*callback)(...))
-.. c:function:: void hook_unregister_arg(name, int (*callback)(void *arg, ...), void *arg)
-
-   Removes a previously registered callback from a hook.  Note that there
-   is no _prio variant of these calls.  The priority value is only used during
-   registration.
diff --git a/doc/code/index.rst b/doc/code/index.rst
deleted file mode 100644 (file)
index 79647d0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Welcome to FRR's documentation!
-===============================
-
-Contents:
-
-.. toctree::
-   :maxdepth: 2
-
-   library
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
diff --git a/doc/code/library.rst b/doc/code/library.rst
deleted file mode 100644 (file)
index dd46021..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-libfrr library facilities
-=========================
-
-.. toctree::
-   :maxdepth: 2
-
-   memtypes
-   hooks
-
-
diff --git a/doc/code/memtypes.rst b/doc/code/memtypes.rst
deleted file mode 100644 (file)
index 62d211e..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-.. highlight:: c
-
-Memtypes
-========
-
-FRR includes wrappers arround ``malloc()`` and ``free()`` that count the number
-of objects currently allocated, for each of a defined ``MTYPE``.
-
-To this extent, there are `memory groups` and `memory types`.  Each memory
-type must belong to a memory group, this is used just to provide some basic
-structure.
-
-Example:
-
-.. code-block:: c
-     :caption: mydaemon.h
-
-     DECLARE_MGROUP(MYDAEMON)
-     DECLARE_MTYPE(MYNEIGHBOR)
-
-.. code-block:: c
-     :caption: mydaemon.c
-
-     DEFINE_MGROUP(      MYDAEMON, "My daemon's memory")
-     DEFINE_MTYPE(       MYDAEMON, MYNEIGHBOR,     "Neighbor entry")
-     DEFINE_MTYPE_STATIC(MYDAEMON, MYNEIGHBORNAME, "Neighbor name")
-
-     struct neigh *neighbor_new(const char *name)
-     {
-        struct neigh *n = XMALLOC(MYNEIGHBOR, sizeof(*n));
-        n->name = XSTRDUP(MYNEIGHBORNAME, name);
-        return n;
-     }
-
-     void neighbor_free(struct neigh *n)
-     {
-        XFREE(MYNEIGHBORNAME, n->name);
-        XFREE(MYNEIGHBOR, n);
-     }
-
-
-Definition
-----------
-
-.. c:macro:: DECLARE_MGROUP(name)
-
-   This macro forward-declares a memory group and should be placed in a
-   ``.h`` file.  It expands to an ``extern struct memgroup`` statement.
-
-.. c:macro:: DEFINE_MGROUP(mname, description)
-
-   Defines/implements a memory group.  Must be placed into exactly one ``.c``
-   file (multiple inclusion will result in a link-time symbol conflict).
-
-   Contains additional logic (constructor and destructor) to register the
-   memory group in a global list.
-
-.. c:macro:: DECLARE_MTYPE(name)
-
-   Forward-declares a memory type and makes ``MTYPE_name`` available for use.
-   Note that the ``MTYPE_`` prefix must not be included in the name, it is
-   automatically prefixed.
-
-   ``MTYPE_name`` is created as a `static const` symbol, i.e. a compile-time
-   constant.  It refers to an ``extern struct memtype _mt_name``, where `name`
-   is replaced with the actual name.
-
-.. c:macro:: DEFINE_MTYPE(group, name, description)
-
-   Define/implement a memory type, must be placed into exactly one ``.c``
-   file (multiple inclusion will result in a link-time symbol conflict).
-
-   Like ``DEFINE_MGROUP``, this contains actual code to register the MTYPE
-   under its group.
-
-.. c:macro:: DEFINE_MTYPE_STATIC(group, name, description)
-
-   Same as ``DEFINE_MTYPE``, but the ``DEFINE_MTYPE_STATIC`` variant places
-   the C ``static`` keyword on the definition, restricting the MTYPE's
-   availability to the current source file.  This should be appropriate in
-   >80% of cases.
-
-   .. todo::
-   
-      Daemons currently have ``daemon_memory.[ch]`` files listing all of
-      their MTYPEs.  This is not how it should be, most of these types
-      should be moved into the appropriate files where they are used.
-      Only a few MTYPEs should remain non-static after that.
-
-
-Usage
------
-
-.. c:function:: void *XMALLOC(struct memtype *mtype, size_t size)
-
-.. c:function:: void *XCALLOC(struct memtype *mtype, size_t size)
-
-.. c:function:: void *XSTRDUP(struct memtype *mtype, size_t size)
-
-   Allocation wrappers for malloc/calloc/realloc/strdup, taking an extra
-   mtype parameter.
-
-.. c:function:: void *XREALLOC(struct memtype *mtype, void *ptr, size_t size)
-
-   Wrapper around realloc() with MTYPE tracking.  Note that ``ptr`` may
-   be NULL, in which case the function does the same as XMALLOC (regardless
-   of whether the system realloc() supports this.)
-
-.. c:function:: void XFREE(struct memtype *mtype, void *ptr)
-
-   Wrapper around free(), again taking an extra mtype parameter.  This is
-   actually a macro, with the following additional properties:
-
-   - the macro contains ``ptr = NULL``
-   - if ptr is NULL, no operation is performed (as is guaranteed by system
-     implementations.)  Do not surround XFREE with ``if (ptr != NULL)``
-     checks.
diff --git a/doc/defines.texi.in b/doc/defines.texi.in
deleted file mode 100644 (file)
index b2af89e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-@c -*- texinfo -*-
-@c @configure_input@
-
-@c Set variables
-@set PACKAGE_NAME @PACKAGE_NAME@
-@set PACKAGE_TARNAME @PACKAGE_TARNAME@
-@set PACKAGE_STRING @PACKAGE_STRING@
-@set PACKAGE_URL @PACKAGE_URL@
-@set PACKAGE_VERSION @PACKAGE_VERSION@
-@set AUTHORS Kunihiro Ishiguro, et al.
-@set COPYRIGHT_YEAR 1999-2005
-@set COPYRIGHT_STR Copyright @copyright{} @value{COPYRIGHT_YEAR} @value{AUTHORS}
-
-@c These may vary with installation environment.
-@set INSTALL_PREFIX_ETC @CFG_SYSCONF@
-@set INSTALL_PREFIX_SBIN @CFG_SBIN@
-@set INSTALL_PREFIX_STATE @CFG_STATE@
-@set INSTALL_PREFIX_MODULES @CFG_MODULE@
-@set INSTALL_USER @enable_user@
-@set INSTALL_GROUP @enable_group@
-@set INSTALL_VTY_GROUP @enable_vty_group@
diff --git a/doc/dev-modules.md b/doc/dev-modules.md
deleted file mode 100644 (file)
index 87bc963..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# Module and Hook support (developer docs)
-
-## What it does
-
-It uses `dlopen()` to load DSOs at startup.
-
-
-## Limitations
-
-* can't load, unload, or reload during runtime.  This just needs some work
-  and can probably be done in the future.
-* doesn't fix any of the "things need to be changed in the code in the library"
-  issues.  Most prominently, you can't add a CLI node because CLI nodes are
-  listed in the library...
-* if your module crashes, the daemon crashes.  Should be obvious.
-* **does not provide a stable API or ABI**.  Your module must match a version
-  of FRR and you may have to update it frequently to match changes.
-* **does not create a license boundary**.  Your module will need to link
-  libzebra and include header files from the daemons, meaning it will be
-  GPL-encumbered.
-
-
-## Installation
-
-Look for `moduledir` in `configure.ac`, default is normally
-`/usr/lib64/frr/modules` but depends on `--libdir` / `--prefix`.
-
-The daemon's name is prepended when looking for a module, e.g. "snmp" tries
-to find "zebra_snmp" first when used in zebra.  This is just to make it nicer
-for the user, with the snmp module having the same name everywhere.
-
-Modules can be packaged separately from FRR.  The SNMP and FPM modules are
-good candidates for this because they have dependencies (net-snmp / protobuf)
-that are not FRR dependencies.  However, any distro packages should have an
-"exact-match" dependency onto the FRR package.  Using a module from a
-different FRR version will probably blow up nicely.
-
-For snapcraft (and during development), modules can be loaded with full path
-(e.g. -M `$SNAP/lib/frr/modules/zebra_snmp.so`).  Note that libtool puts output
-files in the .libs directory, so during development you have to use
-`./zebra -M .libs/zebra_snmp.so`.
-
-
-## Creating a module
-
-... best to look at the existing SNMP or FPM modules.
-
-Basic boilerplate:
-
-```
-#include "hook.h"
-#include "module.h"
-
-static int
-module_init (void)
-{
-  hook_register(frr_late_init, module_late_init);
-  return 0;
-}
-
-FRR_MODULE_SETUP(
-       .name = "my module",
-       .version = "0.0",
-       .description = "my module",
-       .init = module_init,
-)
-```
-
-The `frr_late_init` hook will be called after the daemon has finished its
-other startup and is about to enter the main event loop;  this is the best
-place for most initialisation.
-
-
-## Compiler & Linker magic
-
-There's a `THIS_MODULE` (like in the Linux kernel), which uses `visibility`
-attributes to restrict it to the current module.  If you get a linker error
-with `_frrmod_this_module`, there is some linker SNAFU.  This shouldn't be
-possible, though one way to get it would be to not include libzebra (which
-provides a fallback definition for the symbol).
-
-libzebra and the daemons each have their own `THIS_MODULE`, as do all loadable
-modules.  In any other libraries (e.g. `libfrrsnmp`), `THIS_MODULE` will use
-the definition in libzebra;  same applies if the main executable doesn't use
-`FRR_DAEMON_INFO` (e.g. all testcases).
-
-The deciding factor here is "what dynamic linker unit are you using the symbol
-from."  If you're in a library function and want to know who called you, you
-can't use `THIS_MODULE` (because that'll just tell you you're in the library).
-Put a macro around your function that adds `THIS_MODULE` in the *caller's
-code calling your function*.
-
-The idea is to use this in the future for module unloading.  Hooks already
-remember which module they were installed by, as groundwork for a function
-that removes all of a module's installed hooks.
-
-There's also the `frr_module` symbol in modules, pretty much a standard entry
-point for loadable modules.
-
-
-## Hooks
-
-Hooks are just points in the code where you can register your callback to
-be called.  The parameter list is specific to the hook point.  Since there is
-no stable API, the hook code has some extra type safety checks making sure
-you get a compiler warning when the hook parameter list doesn't match your
-callback.  Don't ignore these warnings.
-
-
-## Relation to MTYPE macros
-
-The MTYPE macros, while primarily designed to decouple MTYPEs from the library
-and beautify the code, also work very nicely with loadable modules -- both
-constructors and destructors are executed when loading/unloading modules.
-
-This means there is absolutely no change required to MTYPEs, you can just use
-them in a module and they will even clean up themselves when we implement
-module unloading and an unload happens.  In fact, it's impossible to create
-a bug where unloading fails to de-register a MTYPE.
diff --git a/doc/developer/.gitignore b/doc/developer/.gitignore
new file mode 100644 (file)
index 0000000..0505537
--- /dev/null
@@ -0,0 +1,3 @@
+/_templates
+/_build
+!/Makefile
diff --git a/doc/developer/BGP-TypeCode b/doc/developer/BGP-TypeCode
new file mode 100644 (file)
index 0000000..b321807
--- /dev/null
@@ -0,0 +1,24 @@
+
+                BGP-4[+] UPDATE Attribute TypeCode list
+
+  Value  Attribute            References
+=========================================================================
+    1    ORIGIN               [RFC 4271]
+    2    AS_PATH              [RFC 4271]
+    3    NEXT_HOP             [RFC 4271]
+    4    MULTI_EXIT_DISC      [RFC 4271]
+    5    LOCAL_PREF           [RFC 4271]
+    6    ATOMIC_AGGREGATE     [RFC 4271]
+    7    AGGREGATOR           [RFC 4271]
+    8    COMMUNITIES          [RFC 1997]
+    9    ORIGINATOR_ID        [RFC 4456]
+   10    CLUSTER_LIST         [RFC 4456]
+   11    DPA                  [draft-ietf-idr-bgp-dpa-05.txt(expired)]
+   12    ADVERTISER           [RFC 1863]
+   13    RCID_PATH            [RFC 1863]
+   14    MP_REACH_NLRI        [RFC 4760]
+   15    MP_UNREACH_NLRI      [RFC 4760]
+   16    EXT_COMMUNITIES      [RFC 4360]
+   17    AS4_PATH             [RFC 4893]
+   18    AS4_AGGREGATOR       [RFC 4893]
+=========================================================================
diff --git a/doc/developer/Building_FRR_on_Alpine.rst b/doc/developer/Building_FRR_on_Alpine.rst
new file mode 100644 (file)
index 0000000..27718bd
--- /dev/null
@@ -0,0 +1,47 @@
+Building FRR dev packages on Alpine Linux from Git Source
+=========================================================
+
+For building Alpine Linux dev packages, we use docker.
+
+Install docker 17.05 or later
+-----------------------------
+
+Depending on your host, there are different ways of installing
+docker.  Refer to the documentation here for instructions on how
+to install a free version of docker: https://www.docker.com/community-edition
+
+Work with sources
+-----------------
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+
+Build apk packages
+------------------
+
+    ./docker/alpine/build.sh
+
+This will put the apk packages in:
+
+    ./docker/pkgs/apk/x86_64/
+
+Usage
+-----
+
+To add the packages to a docker image, create a Dockerfile in ./docker/pkgs:
+
+    FROM alpine:3.7
+    RUN mkdir -p /pkgs
+    ADD apk/ /pkgs/
+    RUN apk add --no-cache --allow-untrusted /pkgs/x86_64/*.apk
+
+And build a docker image:
+
+    docker build --rm --force-rm -t alpine-dev-pkgs:latest docker/pkgs
+
+And run the image:
+
+    docker run -it --rm alpine-dev-pkgs:latest /bin/sh
+
+Currently, we only package the raw daemons and example files, so, you'll
+need to run the daemons by hand (or, better, orchestrate in the Dockerfile).
diff --git a/doc/developer/Building_FRR_on_CentOS6.rst b/doc/developer/Building_FRR_on_CentOS6.rst
new file mode 100644 (file)
index 0000000..1c53ea6
--- /dev/null
@@ -0,0 +1,255 @@
+CentOS 6
+========================================
+
+(As an alternative to this installation, you may prefer to create a FRR
+rpm package yourself and install that package instead. See instructions
+in redhat/README.rpm\_build.md on how to build a rpm package)
+
+Instructions are tested with ``CentOS 6.8`` on ``x86_64`` platform
+
+Warning:
+--------
+``CentOS 6`` is very old and not fully supported by the FRR community
+anymore. Building FRR takes multiple manual steps to update the build
+system with newer packages than what's available from the archives.
+However, the built packages can still be installed afterwards on
+a standard ``CentOS 6`` without any special packages.
+
+Support for CentOS 6 is now on a best-effort base by the community.
+
+CentOS 6 restrictions:
+----------------------
+
+-  PIMd is not supported on ``CentOS 6``. Upgrade to ``CentOS 7`` if
+   PIMd is needed
+-  MPLS is not supported on ``CentOS 6``. MPLS requires Linux Kernel 4.5
+   or higher (LDP can be built, but may have limited use without MPLS)
+-  Zebra is unable to detect what bridge/vrf an interface is associcated
+   with (IFLA\_INFO\_SLAVE\_KIND does not exist in the kernel headers,
+   you can use a newer kernel + headers to get this functionality)
+-  frr\_reload.py will not work, as this requires Python 2.7, and CentOS
+   6 only has 2.6. You can install Python 2.7 via IUS, but it won't work
+   properly unless you compile and install the ipaddr package for it.
+-  Building the package requires Sphinx >= 1.1. Only a non-standard
+   package provides a newer sphinx and requires manual installation
+   (see below)
+
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    sudo yum install git autoconf automake libtool make gawk \
+      readline-devel texinfo net-snmp-devel groff pkgconfig \
+      json-c-devel pam-devel flex epel-release perl-XML-LibXML \
+      c-ares-devel
+
+Install newer version of bison (CentOS 6 package source is too old) from
+CentOS 7
+
+::
+
+    sudo yum install rpm-build
+    curl -O http://vault.centos.org/7.0.1406/os/Source/SPackages/bison-2.7-4.el7.src.rpm
+    rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm
+    sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm
+    rm -rf rpmbuild
+
+Install newer version of autoconf and automake (Package versions are too
+old)
+
+::
+
+    curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
+    tar xvf autoconf-2.69.tar.gz
+    cd autoconf-2.69
+    ./configure --prefix=/usr
+    make
+    sudo make install
+    cd ..
+
+    curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
+    tar xvf automake-1.15.tar.gz
+    cd automake-1.15
+    ./configure --prefix=/usr
+    make
+    sudo make install
+    cd ..
+
+Install ``Python 2.7`` in parallel to default 2.6. Make sure you've
+install EPEL (``epel-release`` as above). Then install current
+``python27``, ``python27-devel`` and ``pytest``
+
+::
+
+    sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
+    sudo rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
+    sudo yum install python27 python27-pip python27-devel
+    sudo pip2.7 install pytest
+
+Please note that ``CentOS 6`` needs to keep python pointing to version
+2.6 for ``yum`` to keep working, so don't create a symlink for python2.7
+to python
+
+Install newer ``Sphinx-Build`` based on ``Python 2.7``
+
+Create a new repo ``/etc/yum.repos.d/puias6.repo`` with the following contents:
+
+::
+
+    ### Name: RPM Repository for RHEL 6 - PUIAS (used for Sphinx-Build)
+    ### URL: http://springdale.math.ias.edu/data/puias/computational
+    [puias-computational]
+    name = RPM Repository for RHEL 6 - Sphinx-Build
+    baseurl = http://springdale.math.ias.edu/data/puias/computational/$releasever/$basearch
+    #mirrorlist =
+    enabled = 1
+    protect = 0
+    gpgkey =
+    gpgcheck = 0
+
+Update rpm database & Install newer sphinx
+
+::
+
+    sudo yum update
+    sudo yum install python27-sphinx
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -r -g 85 frrvt
+    sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
+      -c "FRR FRRouting suite" -d /var/run/frr frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    ./configure \
+        --bindir=/usr/bin \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --libdir=/usr/lib/frr \
+        --libexecdir=/usr/lib/frr \
+        --localstatedir=/var/run/frr \
+        --with-moduledir=/usr/lib/frr/modules \
+        --disable-pimd \
+        --enable-snmp=agentx \
+        --enable-multipath=64 \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvt \
+        --enable-rtadv \
+        --disable-exampledir \
+        --enable-watchfrr \
+        --disable-ldpd \
+        --enable-fpm \
+        --enable-nhrpd \
+        --enable-eigrpd \
+        --enable-babeld \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make SPHINXBUILD=sphinx-build2.7
+    make check PYTHON=/usr/bin/python2.7 SPHINXBUILD=sphinx-build2.7
+    sudo make SPHINXBUILD=sphinx-build2.7 install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /var/log/frr
+    sudo mkdir /etc/frr
+    sudo touch /etc/frr/zebra.conf
+    sudo touch /etc/frr/bgpd.conf
+    sudo touch /etc/frr/ospfd.conf
+    sudo touch /etc/frr/ospf6d.conf
+    sudo touch /etc/frr/isisd.conf
+    sudo touch /etc/frr/ripd.conf
+    sudo touch /etc/frr/ripngd.conf
+    sudo touch /etc/frr/nhrpd.conf
+    sudo touch /etc/frr/eigrpd.conf
+    sudo touch /etc/frr/babeld.conf
+    sudo chown -R frr:frr /etc/frr/
+    sudo touch /etc/frr/vtysh.conf
+    sudo chown frr:frrvt /etc/frr/vtysh.conf
+    sudo chmod 640 /etc/frr/*.conf
+
+Install daemon config file
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -p -m 644 redhat/daemons /etc/frr/
+    sudo chown frr:frr /etc/frr/daemons
+
+Edit /etc/frr/daemons as needed to select the required daemons
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
+Enable the daemons as required by changing the value to ``yes``
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Edit ``/etc/sysctl.conf`` and set the following values (ignore the other
+settings)
+
+::
+
+    # Controls IP packet forwarding
+    net.ipv4.ip_forward = 1
+    net.ipv6.conf.all.forwarding=1
+
+    # Controls source route verification
+    net.ipv4.conf.default.rp_filter = 0
+
+Load the modifed sysctl's on the system:
+
+::
+
+    sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
+
+Add init.d startup files
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -p -m 755 redhat/frr.init /etc/init.d/frr
+    sudo chkconfig --add frr
+
+Enable frr daemon at startup
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo chkconfig frr on
+
+Start FRR manually (or reboot)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo /etc/init.d/frr start
diff --git a/doc/developer/Building_FRR_on_CentOS7.rst b/doc/developer/Building_FRR_on_CentOS7.rst
new file mode 100644 (file)
index 0000000..9807543
--- /dev/null
@@ -0,0 +1,169 @@
+CentOS 7
+========================================
+
+(As an alternative to this installation, you may prefer to create a FRR
+rpm package yourself and install that package instead. See instructions
+in redhat/README.rpm\_build.md on how to build a rpm package)
+
+CentOS 7 restrictions:
+----------------------
+
+-  MPLS is not supported on ``CentOS 7`` with default kernel. MPLS
+   requires Linux Kernel 4.5 or higher (LDP can be built, but may have
+   limited use without MPLS)
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    sudo yum install git autoconf automake libtool make gawk \
+      readline-devel texinfo net-snmp-devel groff pkgconfig \
+      json-c-devel pam-devel bison flex pytest c-ares-devel \
+      perl-XML-LibXML python-devel systemd-devel python-sphinx
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -r -g 85 frrvt
+    sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
+      -c "FRR FRRouting suite" -d /var/run/frr frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    ./configure \
+        --bindir=/usr/bin \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --libdir=/usr/lib/frr \
+        --libexecdir=/usr/lib/frr \
+        --localstatedir=/var/run/frr \
+        --with-moduledir=/usr/lib/frr/modules \
+        --enable-pimd \
+        --enable-snmp=agentx \
+        --enable-multipath=64 \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvt \
+        --enable-rtadv \
+       --enable-systemd=yes \
+        --disable-exampledir \
+        --enable-watchfrr \
+        --disable-ldpd \
+        --enable-fpm \
+        --enable-nhrpd \
+        --enable-eigrpd \
+        --enable-babeld \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make
+    make check
+    sudo make install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /var/log/frr
+    sudo mkdir /etc/frr
+    sudo touch /etc/frr/zebra.conf
+    sudo touch /etc/frr/bgpd.conf
+    sudo touch /etc/frr/ospfd.conf
+    sudo touch /etc/frr/ospf6d.conf
+    sudo touch /etc/frr/isisd.conf
+    sudo touch /etc/frr/ripd.conf
+    sudo touch /etc/frr/ripngd.conf
+    sudo touch /etc/frr/pimd.conf
+    sudo touch /etc/frr/nhrpd.conf
+    sudo touch /etc/frr/eigrpd.conf
+    sudo touch /etc/frr/babeld.conf
+    sudo chown -R frr:frr /etc/frr/
+    sudo touch /etc/frr/vtysh.conf
+    sudo chown frr:frrvt /etc/frr/vtysh.conf
+    sudo chmod 640 /etc/frr/*.conf
+
+Install daemon config file
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -p -m 644 redhat/daemons /etc/frr/
+    sudo chown frr:frr /etc/frr/daemons
+
+Edit /etc/frr/daemons as needed to select the required daemons
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
+Enable the daemons as required by changing the value to ``yes``
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
+following content:
+
+::
+
+    # Sysctl for routing
+    #
+    # Routing: We need to forward packets
+    net.ipv4.conf.all.forwarding=1
+    net.ipv6.conf.all.forwarding=1
+
+Load the modifed sysctl's on the system:
+
+::
+
+    sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
+
+Install frr Service and redhat init files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
+    sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
+
+Register the systemd files
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo systemctl preset frr.service
+
+Enable required frr at startup
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo systemctl enable frr
+
+Reboot or start FRR manually
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo systemctl start frr
diff --git a/doc/developer/Building_FRR_on_Debian8.rst b/doc/developer/Building_FRR_on_Debian8.rst
new file mode 100644 (file)
index 0000000..36ed0c4
--- /dev/null
@@ -0,0 +1,156 @@
+Debian 8
+========================================
+
+Debian 8 restrictions:
+----------------------
+
+-  MPLS is not supported on ``Debian 8`` with default kernel. MPLS
+   requires Linux Kernel 4.5 or higher (LDP can be built, but may have
+   limited use without MPLS)
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    sudo apt-get install git autoconf automake libtool make gawk \
+       libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
+       python-pip libc-ares-dev python3-dev python3-sphinx
+
+Install newer pytest (>3.0) from pip
+
+::
+
+    sudo pip install pytest
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo addgroup --system --gid 92 frr
+    sudo addgroup --system --gid 85 frrvty
+    sudo adduser --system --ingroup frr --home /var/run/frr/ \
+       --gecos "FRR suite" --shell /bin/false frr
+    sudo usermod -a -G frrvty frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    ./configure \
+        --enable-exampledir=/usr/share/doc/frr/examples/ \
+        --localstatedir=/var/run/frr \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --enable-vtysh \
+        --enable-isisd \
+        --enable-pimd \
+        --enable-watchfrr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --enable-ldpd \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make
+    make check
+    sudo make install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -m 755 -o frr -g frr -d /var/log/frr
+    sudo install -m 775 -o frr -g frrvty -d /etc/frr
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
+    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
+other settings)
+
+::
+
+    # Uncomment the next line to enable packet forwarding for IPv4
+    net.ipv4.ip_forward=1
+
+    # Uncomment the next line to enable packet forwarding for IPv6
+    #  Enabling this option disables Stateless Address Autoconfiguration
+    #  based on Router Advertisements for this host
+    net.ipv6.conf.all.forwarding=1
+
+**Reboot** or use ``sysctl -p`` to apply the same config to the running
+system
+
+Troubleshooting
+~~~~~~~~~~~~~~~
+
+**Local state directory**
+
+The local state directory must exist and have the correct permissions
+applied for the frrouting daemons to start. In the above ./configure
+example the local state directory is set to /var/run/frr
+(--localstatedir=/var/run/frr) Debian considers /var/run/frr to be
+temporary and this is removed after a reboot.
+
+When using a different local state directory you need to create the new
+directory and change the ownership to the frr user, for example:
+
+::
+
+    mkdir /var/opt/frr
+    chown frr /var/opt/frr
+
+**Shared library error**
+
+If you try and start any of the frrouting daemons you may see the below
+error due to the frrouting shared library directory not being found:
+
+::
+
+    ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
+
+The fix is to add the following line to /etc/ld.so.conf which will
+continue to reference the library directory after the system reboots. To
+load the library directory path immediately run the ldconfig command
+after adding the line to the file eg:
+
+::
+
+    echo include /usr/local/lib >> /etc/ld.so.conf
+    ldconfig
diff --git a/doc/developer/Building_FRR_on_Debian9.rst b/doc/developer/Building_FRR_on_Debian9.rst
new file mode 100644 (file)
index 0000000..a1aa632
--- /dev/null
@@ -0,0 +1,131 @@
+Debian 9
+========================================
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    sudo apt-get install git autoconf automake libtool make \
+      libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
+      python-pip libc-ares-dev python3-dev python-pytest python3-sphinx
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo addgroup --system --gid 92 frr
+    sudo addgroup --system --gid 85 frrvty
+    sudo adduser --system --ingroup frr --home /var/opt/frr/ \
+       --gecos "FRR suite" --shell /bin/false frr
+    sudo usermod -a -G frrvty frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    git checkout stable/3.0
+    ./bootstrap.sh
+    ./configure \
+        --enable-exampledir=/usr/share/doc/frr/examples/ \
+        --localstatedir=/var/opt/frr \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --enable-vtysh \
+        --enable-isisd \
+        --enable-pimd \
+        --enable-watchfrr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --enable-ldpd \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make
+    make check
+    sudo make install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -m 755 -o frr -g frr -d /var/log/frr
+    sudo install -m 755 -o frr -g frr -d /var/opt/frr
+    sudo install -m 775 -o frr -g frrvty -d /etc/frr
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
+    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
+other settings)
+
+::
+
+    # Uncomment the next line to enable packet forwarding for IPv4
+    net.ipv4.ip_forward=1
+
+    # Uncomment the next line to enable packet forwarding for IPv6
+    #  Enabling this option disables Stateless Address Autoconfiguration
+    #  based on Router Advertisements for this host
+    net.ipv6.conf.all.forwarding=1
+
+**Reboot** or use ``sysctl -p`` to apply the same config to the running
+system
+
+Troubleshooting
+---------------
+
+Shared library error
+~~~~~~~~~~~~~~~~~~~~
+
+If you try and start any of the frrouting daemons you may see the below
+error due to the frrouting shared library directory not being found:
+
+::
+
+   ./zebra: error while loading shared libraries: libfrr.so.0: cannot open
+   shared object file: No such file or directory
+
+The fix is to add the following line to /etc/ld.so.conf which will
+continue to reference the library directory after the system reboots. To
+load the library directory path immediately run the ldconfig command
+after adding the line to the file eg:
+
+::
+
+   echo include /usr/local/lib >> /etc/ld.so.conf
+   ldconfig
diff --git a/doc/developer/Building_FRR_on_Fedora24.rst b/doc/developer/Building_FRR_on_Fedora24.rst
new file mode 100644 (file)
index 0000000..ed81d3f
--- /dev/null
@@ -0,0 +1,177 @@
+Fedora 24
+=========================================
+
+(As an alternative to this installation, you may prefer to create a FRR
+rpm package yourself and install that package instead. See instructions
+in redhat/README.rpm\_build.md on how to build a rpm package)
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    sudo dnf install git autoconf automake libtool make gawk \
+      readline-devel texinfo net-snmp-devel groff pkgconfig \
+      json-c-devel pam-devel perl-XML-LibXML pytest bison flex \
+      c-ares-devel python3-devel python3-sphinx
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -r -g 85 frrvt
+    sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
+      -c "FRR FRRouting suite" -d /var/run/frr frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    ./configure \
+        --bindir=/usr/bin \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --libdir=/usr/lib/frr \
+        --libexecdir=/usr/lib/frr \
+        --localstatedir=/var/run/frr \
+        --with-moduledir=/usr/lib/frr/modules \
+        --enable-pimd \
+        --enable-snmp=agentx \
+        --enable-multipath=64 \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvt \
+        --enable-rtadv \
+        --disable-exampledir \
+        --enable-watchfrr \
+        --enable-ldpd \
+        --enable-fpm \
+        --enable-nhrpd \
+        --enable-eigrpd \
+        --enable-babeld \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make
+    make check
+    sudo make install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /var/log/frr
+    sudo mkdir /etc/frr
+    sudo touch /etc/frr/zebra.conf
+    sudo touch /etc/frr/bgpd.conf
+    sudo touch /etc/frr/ospfd.conf
+    sudo touch /etc/frr/ospf6d.conf
+    sudo touch /etc/frr/isisd.conf
+    sudo touch /etc/frr/ripd.conf
+    sudo touch /etc/frr/ripngd.conf
+    sudo touch /etc/frr/pimd.conf
+    sudo touch /etc/frr/ldpd.conf
+    sudo touch /etc/frr/nhrpd.conf
+    sudo touch /etc/frr/eigrpd.conf
+    sudo touch /etc/frr/babeld.conf
+    sudo chown -R frr:frr /etc/frr/
+    sudo touch /etc/frr/vtysh.conf
+    sudo chown frr:frrvt /etc/frr/vtysh.conf
+    sudo chmod 640 /etc/frr/*.conf
+
+Install daemon config file
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -p -m 644 redhat/daemons /etc/frr/
+    sudo chown frr:frr /etc/frr/daemons
+
+Edit /etc/frr/daemons as needed to select the required daemons
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
+Enable the daemons as required by changing the value to ``yes``
+
+Enable IP & IPv6 forwarding (and MPLS)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
+following content: (Please make sure to list all interfaces with
+required MPLS similar to ``net.mpls.conf.eth0.input=1``)
+
+::
+
+    # Sysctl for routing
+    #
+    # Routing: We need to forward packets
+    net.ipv4.conf.all.forwarding=1
+    net.ipv6.conf.all.forwarding=1
+    #
+    # Enable MPLS Label processing on all interfaces
+    net.mpls.conf.eth0.input=1
+    net.mpls.conf.eth1.input=1
+    net.mpls.conf.eth2.input=1
+    net.mpls.platform_labels=100000
+
+Load the modifed sysctl's on the system:
+
+::
+
+    sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
+
+Create a new file ``/etc/modules-load.d/mpls.conf`` with the following
+content:
+
+::
+
+    # Load MPLS Kernel Modules
+    mpls-router
+    mpls-iptunnel
+
+And load the kernel modules on the running system:
+
+::
+
+    sudo modprobe mpls-router mpls-iptunnel
+
+Install frr Service and redhat init files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
+    sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
+
+Enable required frr at startup
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo systemctl enable frr
+
+Reboot or start FRR manually
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo systemctl start frr
diff --git a/doc/developer/Building_FRR_on_FreeBSD10.rst b/doc/developer/Building_FRR_on_FreeBSD10.rst
new file mode 100644 (file)
index 0000000..ccbe8c5
--- /dev/null
@@ -0,0 +1,109 @@
+FreeBSD 10
+==========================================
+
+FreeBSD 10 restrictions:
+------------------------
+
+-  MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel
+   (4.5 or higher). LDP can be built, but may have limited use without
+   MPLS
+
+Install required packages
+-------------------------
+
+Add packages: (Allow the install of the package managment tool if this
+is first package install and asked)
+
+::
+
+    pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
+        bison flex py27-pytest c-ares python3 py-sphinx
+
+Make sure there is no /usr/bin/flex preinstalled (and use the newly
+installed in /usr/local/bin): (FreeBSD frequently provides a older flex
+as part of the base OS which takes preference in path)
+
+::
+
+    rm -f /usr/bin/flex
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr group and user
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    pw groupadd frr -g 101
+    pw groupadd frrvty -g 102
+    pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
+        -d /usr/local/etc/frr -s /usr/sbin/nologin
+
+(You may prefer different options on configure statement. These are just
+an example)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    export MAKE=gmake
+    export LDFLAGS="-L/usr/local/lib"
+    export CPPFLAGS="-I/usr/local/include"
+    ./configure \
+        --sysconfdir=/usr/local/etc/frr \
+        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
+        --localstatedir=/var/run/frr \
+        --prefix=/usr/local \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    gmake
+    gmake check
+    sudo gmake install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /usr/local/etc/frr
+    sudo touch /usr/local/etc/frr/zebra.conf
+    sudo touch /usr/local/etc/frr/bgpd.conf
+    sudo touch /usr/local/etc/frr/ospfd.conf
+    sudo touch /usr/local/etc/frr/ospf6d.conf
+    sudo touch /usr/local/etc/frr/isisd.conf
+    sudo touch /usr/local/etc/frr/ripd.conf
+    sudo touch /usr/local/etc/frr/ripngd.conf
+    sudo touch /usr/local/etc/frr/pimd.conf
+    sudo chown -R frr:frr /usr/local/etc/frr
+    sudo touch /usr/local/etc/frr/vtysh.conf
+    sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
+    sudo chmod 640 /usr/local/etc/frr/*.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add the following lines to the end of ``/etc/sysctl.conf``:
+
+::
+
+    # Routing: We need to forward packets
+    net.inet.ip.forwarding=1
+    net.inet6.ip6.forwarding=1
+
+**Reboot** or use ``sysctl`` to apply the same config to the running
+system
diff --git a/doc/developer/Building_FRR_on_FreeBSD11.rst b/doc/developer/Building_FRR_on_FreeBSD11.rst
new file mode 100644 (file)
index 0000000..214fdbf
--- /dev/null
@@ -0,0 +1,109 @@
+FreeBSD 11
+==========================================
+
+FreeBSD 11 restrictions:
+------------------------
+
+-  MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel
+   (4.5 or higher). LDP can be built, but may have limited use without
+   MPLS
+
+Install required packages
+-------------------------
+
+Add packages: (Allow the install of the package managment tool if this
+is first package install and asked)
+
+::
+
+    pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
+        bison flex py27-pytest c-ares python3 py-sphinx
+
+Make sure there is no /usr/bin/flex preinstalled (and use the newly
+installed in /usr/local/bin): (FreeBSD frequently provides a older flex
+as part of the base OS which takes preference in path)
+
+::
+
+    rm -f /usr/bin/flex
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr group and user
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    pw groupadd frr -g 101
+    pw groupadd frrvty -g 102
+    pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
+        -d /usr/local/etc/frr -s /usr/sbin/nologin
+
+(You may prefer different options on configure statement. These are just
+an example)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    export MAKE=gmake
+    export LDFLAGS="-L/usr/local/lib"
+    export CPPFLAGS="-I/usr/local/include"
+    ./configure \
+        --sysconfdir=/usr/local/etc/frr \
+        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
+        --localstatedir=/var/run/frr \
+        --prefix=/usr/local \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    gmake
+    gmake check
+    sudo gmake install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /usr/local/etc/frr
+    sudo touch /usr/local/etc/frr/zebra.conf
+    sudo touch /usr/local/etc/frr/bgpd.conf
+    sudo touch /usr/local/etc/frr/ospfd.conf
+    sudo touch /usr/local/etc/frr/ospf6d.conf
+    sudo touch /usr/local/etc/frr/isisd.conf
+    sudo touch /usr/local/etc/frr/ripd.conf
+    sudo touch /usr/local/etc/frr/ripngd.conf
+    sudo touch /usr/local/etc/frr/pimd.conf
+    sudo chown -R frr:frr /usr/local/etc/frr
+    sudo touch /usr/local/etc/frr/vtysh.conf
+    sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
+    sudo chmod 640 /usr/local/etc/frr/*.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add the following lines to the end of ``/etc/sysctl.conf``:
+
+::
+
+    # Routing: We need to forward packets
+    net.inet.ip.forwarding=1
+    net.inet6.ip6.forwarding=1
+
+**Reboot** or use ``sysctl`` to apply the same config to the running
+system
diff --git a/doc/developer/Building_FRR_on_FreeBSD9.rst b/doc/developer/Building_FRR_on_FreeBSD9.rst
new file mode 100644 (file)
index 0000000..909b3a8
--- /dev/null
@@ -0,0 +1,122 @@
+FreeBSD 9
+=========================================
+
+FreeBSD 9 restrictions:
+-----------------------
+
+-  MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel
+   (4.5 or higher). LDP can be built, but may have limited use without
+   MPLS
+
+Install required packages
+-------------------------
+
+Add packages: (Allow the install of the package managment tool if this
+is first package install and asked)
+
+::
+
+    pkg install -y git autoconf automake libtool gmake gawk \
+        pkgconf texinfo json-c bison flex py27-pytest c-ares \
+        python3 py-sphinx
+
+Make sure there is no /usr/bin/flex preinstalled (and use the newly
+installed in /usr/local/bin): (FreeBSD frequently provides a older flex
+as part of the base OS which takes preference in path)
+
+::
+
+    rm -f /usr/bin/flex
+
+For building with clang (instead of gcc), upgrade clang from 3.4 default
+to 3.6 *This is needed to build FreeBSD packages as well - for packages
+clang is default* (Clang 3.4 as shipped with FreeBSD 9 crashes during
+compile)
+
+::
+
+    pkg install clang36
+    pkg delete clang34
+    mv /usr/bin/clang /usr/bin/clang34
+    ln -s /usr/local/bin/clang36 /usr/bin/clang
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr group and user
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    pw groupadd frr -g 101
+    pw groupadd frrvty -g 102
+    pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
+        -d /usr/local/etc/frr -s /usr/sbin/nologin
+
+(You may prefer different options on configure statement. These are just
+an example)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    export MAKE=gmake
+    export LDFLAGS="-L/usr/local/lib"
+    export CPPFLAGS="-I/usr/local/include"
+    ./configure \
+        --sysconfdir=/usr/local/etc/frr \
+        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
+        --localstatedir=/var/run/frr \
+        --prefix=/usr/local \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    gmake
+    gmake check
+    sudo gmake install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /usr/local/etc/frr
+    sudo touch /usr/local/etc/frr/zebra.conf
+    sudo touch /usr/local/etc/frr/bgpd.conf
+    sudo touch /usr/local/etc/frr/ospfd.conf
+    sudo touch /usr/local/etc/frr/ospf6d.conf
+    sudo touch /usr/local/etc/frr/isisd.conf
+    sudo touch /usr/local/etc/frr/ripd.conf
+    sudo touch /usr/local/etc/frr/ripngd.conf
+    sudo touch /usr/local/etc/frr/pimd.conf
+    sudo chown -R frr:frr /usr/local/etc/frr
+    sudo touch /usr/local/etc/frr/vtysh.conf
+    sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
+    sudo chmod 640 /usr/local/etc/frr/*.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add the following lines to the end of ``/etc/sysctl.conf``:
+
+::
+
+    # Routing: We need to forward packets
+    net.inet.ip.forwarding=1
+    net.inet6.ip6.forwarding=1
+
+**Reboot** or use ``sysctl`` to apply the same config to the running
+system
diff --git a/doc/developer/Building_FRR_on_LEDE-OpenWRT.rst b/doc/developer/Building_FRR_on_LEDE-OpenWRT.rst
new file mode 100644 (file)
index 0000000..b9ee9c5
--- /dev/null
@@ -0,0 +1,108 @@
+OpenWRT/LEDE
+=============================================
+
+-  for the moment because of cross compile problems, master is not
+   supported, only up to 3.0
+-  LDP can't be built because of missing Perl-XML-LibXML in OpenWRT/LEDE
+   tree
+
+Prepare build environment
+-------------------------
+
+https://lede-project.org/docs/guide-developer/install-buildsystem
+
+for
+
+Ubuntu 12.04LTS:
+
+::
+
+    sudo apt-get install build-essential subversion git-core \
+       libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc \
+       libxml-parser-perl mercurial bzr ecj cvs unzip python3-sphinx
+
+Ubuntu 64bit:
+
+::
+
+    sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev \
+       gawk gcc-multilib flex git-core gettext libssl-dev python3-sphinx
+
+Debian 8 Jessie:
+
+::
+
+    sudo apt-get install build-essential libncurses5-dev gawk git subversion \
+       libssl-dev gettext unzip zlib1g-dev file python python3-sphinx
+
+Debian 9 Stretch:
+
+::
+
+    sudo apt-get install build-essential libncurses5-dev gawk git subversion \
+       libssl-dev gettext zlib1g-dev python3-sphinx
+
+Centos x86-64 (some packages require EPEL):
+
+::
+
+    yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex \
+       ncurses-devel zlib-devel zlib-static make patch unzip glibc glibc-devel \
+       perl-ExtUtils-MakeMaker glibc-static quilt ncurses-libs sed sdcc bison \
+       intltool sharutils wget git-core openssl-devel xz python-sphinx
+
+Fedora 24 - 64Bit:
+
+::
+
+    dnf install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext git-core \
+       unzip ncurses-devel ncurses-compat-libs zlib-devel zlib-static make \
+       flex patch perl-ExtUtils-MakeMaker perl-Thread-Queue glibc glibc-devel \
+       glibc-static quilt sed sdcc intltool sharutils bison wget openssl-devel \
+       python3-sphinx
+
+Get LEDE Sources (from Git)
+---------------------------
+
+LEDE and OpenWRT is planned to remerge and won't cover the similar
+OpenWRT build As normal user: git clone
+https://git.lede-project.org/source.git lede cd lede ./scripts/feeds
+update -a ./scripts/feeds install -a cd feeds/routing git pull origin
+pull/319/head ln -s ../../../feeds/routing/frr/
+../../package/feeds/routing/ cd ../.. make menuconfig
+
+Select the needed target then select needed packages in Network ->
+Routing and Redirection -> frr, exit and save
+
+::
+
+    make or make package/frr/compile
+
+It may be possible that on first build ``make package/frr/compile`` not
+to work and it may be needed to run a ``make`` for the entire build
+envronment, add V=s for debugging
+
+Work with sources
+-----------------
+
+To update the rc1 version or add other options, the Makefile is found in
+feeds/routing/frr
+
+edit: PKG\_VERSION:= PKG\_SOURCE\_VERSION:=
+
+Usage
+-----
+
+Edit ``/usr/sbin/frr.init`` and add/remove the daemons name in section
+DAEMONS= or don't install unneded packages For example: zebra bgpd ldpd
+isisd nhrpd ospfd ospf6d pimd ripd ripngd
+
+Enable the serivce
+~~~~~~~~~~~~~~~~~~
+
+-  service frr enable
+
+Start the service
+~~~~~~~~~~~~~~~~~
+
+-  service frr start
diff --git a/doc/developer/Building_FRR_on_NetBSD6.rst b/doc/developer/Building_FRR_on_NetBSD6.rst
new file mode 100644 (file)
index 0000000..ce5c580
--- /dev/null
@@ -0,0 +1,147 @@
+NetBSD 6
+========================================
+
+NetBSD 6 restrictions:
+----------------------
+
+-  MPLS is not supported on ``NetBSD``. MPLS requires a Linux Kernel
+   (4.5 or higher). LDP can be built, but may have limited use without
+   MPLS
+
+Install required packages
+-------------------------
+
+Configure Package location:
+
+::
+
+    PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
+    export PKG_PATH
+
+Add packages:
+
+::
+
+    sudo pkg_add git autoconf automake libtool gmake gawk openssl \
+       pkg-config json-c python27 py27-test python35 py-sphinx
+
+Install SSL Root Certificates (for git https access):
+
+::
+
+    sudo pkg_add mozilla-rootcerts
+    sudo touch /etc/openssl/openssl.cnf
+    sudo mozilla-rootcerts install
+
+Select default Python and py.test
+
+::
+
+    sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
+    sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -g 93 frrvty
+    sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
+        -d /nonexistent -s /sbin/nologin frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    MAKE=gmake
+    export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
+    export CPPFLAGS="-I/usr/pkg/include"
+    ./configure \
+        --sysconfdir=/usr/pkg/etc/frr \
+        --enable-exampledir=/usr/pkg/share/examples/frr \
+        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
+        --localstatedir=/var/run/frr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    gmake
+    gmake check
+    sudo gmake install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /var/log/frr
+    sudo mkdir /usr/pkg/etc/frr
+    sudo touch /usr/pkg/etc/frr/zebra.conf
+    sudo touch /usr/pkg/etc/frr/bgpd.conf
+    sudo touch /usr/pkg/etc/frr/ospfd.conf
+    sudo touch /usr/pkg/etc/frr/ospf6d.conf
+    sudo touch /usr/pkg/etc/frr/isisd.conf
+    sudo touch /usr/pkg/etc/frr/ripd.conf
+    sudo touch /usr/pkg/etc/frr/ripngd.conf
+    sudo touch /usr/pkg/etc/frr/pimd.conf
+    sudo chown -R frr:frr /usr/pkg/etc/frr
+    sudo touch /usr/local/etc/frr/vtysh.conf
+    sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
+    sudo chmod 640 /usr/pkg/etc/frr/*.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add the following lines to the end of ``/etc/sysctl.conf``:
+
+::
+
+    # Routing: We need to forward packets
+    net.inet.ip.forwarding=1
+    net.inet6.ip6.forwarding=1
+
+**Reboot** or use ``sysctl`` to apply the same config to the running
+system
+
+Install rc.d init files
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    cp pkgsrc/*.sh /etc/rc.d/
+    chmod 555 /etc/rc.d/*.sh
+
+Enable FRR processes
+~~~~~~~~~~~~~~~~~~~~
+
+(Enable the required processes only)
+
+::
+
+    echo "zebra=YES" >> /etc/rc.conf
+    echo "bgpd=YES" >> /etc/rc.conf
+    echo "ospfd=YES" >> /etc/rc.conf
+    echo "ospf6d=YES" >> /etc/rc.conf
+    echo "isisd=YES" >> /etc/rc.conf
+    echo "ripngd=YES" >> /etc/rc.conf
+    echo "ripd=YES" >> /etc/rc.conf
+    echo "pimd=YES" >> /etc/rc.conf
diff --git a/doc/developer/Building_FRR_on_NetBSD7.rst b/doc/developer/Building_FRR_on_NetBSD7.rst
new file mode 100644 (file)
index 0000000..eaaf87f
--- /dev/null
@@ -0,0 +1,137 @@
+NetBSD 7
+========================================
+
+NetBSD 7 restrictions:
+----------------------
+
+-  MPLS is not supported on ``NetBSD``. MPLS requires a Linux Kernel
+   (4.5 or higher). LDP can be built, but may have limited use without
+   MPLS
+
+Install required packages
+-------------------------
+
+::
+
+    sudo pkgin install git autoconf automake libtool gmake gawk openssl \
+       pkg-config json-c python27 py27-test python35 py-sphinx
+
+Install SSL Root Certificates (for git https access):
+
+::
+
+    sudo pkgin install mozilla-rootcerts
+    sudo touch /etc/openssl/openssl.cnf
+    sudo mozilla-rootcerts install
+
+Select default Python and py.test
+
+::
+
+    sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
+    sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -g 93 frrvty
+    sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
+        -d /nonexistent -s /sbin/nologin frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    MAKE=gmake
+    export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
+    export CPPFLAGS="-I/usr/pkg/include"
+    ./configure \
+        --sysconfdir=/usr/pkg/etc/frr \
+        --enable-exampledir=/usr/pkg/share/examples/frr \
+        --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
+        --localstatedir=/var/run/frr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    gmake
+    gmake check
+    sudo gmake install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo mkdir /usr/pkg/etc/frr
+    sudo touch /usr/pkg/etc/frr/zebra.conf
+    sudo touch /usr/pkg/etc/frr/bgpd.conf
+    sudo touch /usr/pkg/etc/frr/ospfd.conf
+    sudo touch /usr/pkg/etc/frr/ospf6d.conf
+    sudo touch /usr/pkg/etc/frr/isisd.conf
+    sudo touch /usr/pkg/etc/frr/ripd.conf
+    sudo touch /usr/pkg/etc/frr/ripngd.conf
+    sudo touch /usr/pkg/etc/frr/pimd.conf
+    sudo chown -R frr:frr /usr/pkg/etc/frr
+    sudo touch /usr/local/etc/frr/vtysh.conf
+    sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
+    sudo chmod 640 /usr/pkg/etc/frr/*.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add the following lines to the end of ``/etc/sysctl.conf``:
+
+::
+
+    # Routing: We need to forward packets
+    net.inet.ip.forwarding=1
+    net.inet6.ip6.forwarding=1
+
+**Reboot** or use ``sysctl`` to apply the same config to the running
+system
+
+Install rc.d init files
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    cp pkgsrc/*.sh /etc/rc.d/
+    chmod 555 /etc/rc.d/*.sh
+
+Enable FRR processes
+~~~~~~~~~~~~~~~~~~~~
+
+(Enable the required processes only)
+
+::
+
+    echo "zebra=YES" >> /etc/rc.conf
+    echo "bgpd=YES" >> /etc/rc.conf
+    echo "ospfd=YES" >> /etc/rc.conf
+    echo "ospf6d=YES" >> /etc/rc.conf
+    echo "isisd=YES" >> /etc/rc.conf
+    echo "ripngd=YES" >> /etc/rc.conf
+    echo "ripd=YES" >> /etc/rc.conf
+    echo "pimd=YES" >> /etc/rc.conf
diff --git a/doc/developer/Building_FRR_on_OmniOS.rst b/doc/developer/Building_FRR_on_OmniOS.rst
new file mode 100644 (file)
index 0000000..0eb2b9f
--- /dev/null
@@ -0,0 +1,146 @@
+OmniOS (OpenSolaris)
+====================================================
+
+OmniOS restrictions:
+--------------------
+
+-  MPLS is not supported on ``OmniOS`` or ``Solaris``. MPLS requires a
+   Linux Kernel (4.5 or higher). LDP can be built, but may have limited
+   use without MPLS
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    routeadm -e ipv4-forwarding
+    routeadm -e ipv6-forwarding
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    pkg install \
+      developer/build/autoconf \
+      developer/build/automake \
+      developer/lexer/flex \
+      developer/parser/bison \
+      developer/object-file \
+      developer/linker \
+      developer/library/lint \
+      developer/build/gnu-make \
+      developer/gcc51 \
+      library/idnkit \
+      library/idnkit/header-idnkit \
+      system/header \
+      system/library/math/header-math \
+      git libtool gawk pkg-config
+
+Add additional Solaris packages:
+
+::
+
+    pkgadd -d http://get.opencsw.org/now
+    /opt/csw/bin/pkgutil -U
+    /opt/csw/bin/pkgutil -y -i texinfo
+    /opt/csw/bin/pkgutil -y -i perl
+    /opt/csw/bin/pkgutil -y -i libjson_c_dev
+    /opt/csw/bin/pkgutil -y -i python27 py_pip python27_dev
+
+Add libjson to Solaris equivalent of ld.so.conf
+
+::
+
+    crle -l /opt/csw/lib -u
+
+Add pytest:
+
+::
+
+    pip install pytest
+
+Install Sphinx:::
+
+   pip install sphinx
+
+Select Python 2.7 as default (required for pytest)
+
+::
+
+    rm -f /usr/bin/python
+    ln -s /opt/csw/bin/python2.7 /usr/bin/python
+
+Fix PATH for all users and non-interactive sessions. Edit
+``/etc/default/login`` and add the following default PATH:
+
+::
+
+    PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
+
+Edit ``~/.profile`` and add the following default PATH:
+
+::
+
+    PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr group and user
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 93 frr
+    sudo groupadd -g 94 frrvty
+    sudo useradd -g 93 -u 93 -G frrvty -c "FRR suite" \
+        -d /nonexistent -s /bin/false frr
+
+(You may prefer different options on configure statement. These are just
+an example)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    export MAKE=gmake
+    export LDFLAGS="-L/opt/csw/lib"
+    export CPPFLAGS="-I/opt/csw/include"
+    export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig
+    ./configure \
+        --sysconfdir=/etc/frr \
+        --enable-exampledir=/usr/share/doc/frr/examples/ \
+        --localstatedir=/var/run/frr \
+        --sbindir=/usr/lib/frr \
+        --enable-vtysh \
+        --enable-watchfrr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    gmake
+    gmake check
+    sudo gmake install
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    routeadm -e ipv4-forwarding
+    routeadm -e ipv6-forwarding
diff --git a/doc/developer/Building_FRR_on_OpenBSD6.rst b/doc/developer/Building_FRR_on_OpenBSD6.rst
new file mode 100644 (file)
index 0000000..8950488
--- /dev/null
@@ -0,0 +1,169 @@
+OpenBSD 6
+=========================================
+
+Install required packages
+-------------------------
+
+Configure PKG\_PATH
+
+::
+
+    export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/
+
+Add packages:
+
+::
+
+    pkg_add git autoconf-2.69p2 automake-1.15p0 libtool bison
+    pkg_add gmake gawk dejagnu openssl json-c py-test py-sphinx
+
+Select Python2.7 as default (required for pytest)
+
+::
+
+    ln -s /usr/local/bin/python2.7 /usr/local/bin/python
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr group and user
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    groupadd -g 525 _frr
+    groupadd -g 526 _frrvty
+    useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \
+        -d /nonexistent -s /sbin/nologin _frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    export AUTOCONF_VERSION="2.69"
+    export AUTOMAKE_VERSION="1.15"
+    ./bootstrap.sh
+    export LDFLAGS="-L/usr/local/lib"
+    export CPPFLAGS="-I/usr/local/include"
+    ./configure \
+        --sysconfdir=/etc/frr \
+        --localstatedir=/var/frr \
+        --enable-pimd \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=_frr \
+        --enable-group=_frr \
+        --enable-vty-group=_frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    gmake
+    gmake check
+    doas gmake install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    doas mkdir /var/frr
+    doas chown _frr:_frr /var/frr
+    doas chmod 755 /var/frr
+    doas mkdir /etc/frr
+    doas touch /etc/frr/zebra.conf
+    doas touch /etc/frr/bgpd.conf
+    doas touch /etc/frr/ospfd.conf
+    doas touch /etc/frr/ospf6d.conf
+    doas touch /etc/frr/isisd.conf
+    doas touch /etc/frr/ripd.conf
+    doas touch /etc/frr/ripngd.conf
+    doas touch /etc/frr/pimd.conf
+    doas touch /etc/frr/ldpd.conf
+    doas touch /etc/frr/nhrpd.conf
+    doas chown -R _frr:_frr /etc/frr
+    doas touch /etc/frr/vtysh.conf
+    doas chown -R _frr:_frrvty /etc/frr/vtysh.conf
+    doas chmod 750 /etc/frr
+    doas chmod 640 /etc/frr/*.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add the following lines to the end of ``/etc/rc.conf``:
+
+::
+
+    net.inet6.ip6.forwarding=1      # 1=Permit forwarding of IPv6 packets
+    net.inet6.ip6.mforwarding=1     # 1=Permit forwarding of IPv6 multicast packets
+    net.inet6.ip6.multipath=1       # 1=Enable IPv6 multipath routing
+
+**Reboot** to apply the config to the system
+
+Enable MPLS Forwarding
+~~~~~~~~~~~~~~~~~~~~~~
+
+To enable MPLS forwarding on a given interface, use the following
+command:
+
+::
+
+    doas ifconfig em0 mpls
+
+Alternatively, to make MPLS forwarding persistent across reboots, add
+the "mpls" keyword in the hostname.\* files of the desired interfaces.
+Example:
+
+::
+
+    cat /etc/hostname.em0
+    inet 10.0.1.1 255.255.255.0 mpls
+
+Install rc.d init files
+~~~~~~~~~~~~~~~~~~~~~~~
+
+(create them in /etc/rc.d - no example are included at this time with
+FRR source)
+
+Example (for zebra - store as ``/etc/rc.d/frr_zebra.sh``)
+
+::
+
+    #!/bin/sh
+    #
+    # $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $
+
+    daemon="/usr/local/sbin/zebra -d"
+
+    . /etc/rc.d/rc.subr
+
+    rc_cmd $1
+
+Enable FRR processes
+~~~~~~~~~~~~~~~~~~~~
+
+(Enable the required processes only)
+
+::
+
+    echo "frr_zebra=YES" >> /etc/rc.conf
+    echo "frr_bgpd=YES" >> /etc/rc.conf
+    echo "frr_ospfd=YES" >> /etc/rc.conf
+    echo "frr_ospf6d=YES" >> /etc/rc.conf
+    echo "frr_isisd=YES" >> /etc/rc.conf
+    echo "frr_ripngd=YES" >> /etc/rc.conf
+    echo "frr_ripd=YES" >> /etc/rc.conf
+    echo "frr_pimd=YES" >> /etc/rc.conf
+    echo "frr_ldpd=YES" >> /etc/rc.conf
diff --git a/doc/developer/Building_FRR_on_Ubuntu1204.rst b/doc/developer/Building_FRR_on_Ubuntu1204.rst
new file mode 100644 (file)
index 0000000..68e476f
--- /dev/null
@@ -0,0 +1,187 @@
+Ubuntu 12.04LTS
+===============================================
+
+-  MPLS is not supported on ``Ubuntu 12.04`` with default kernel. MPLS
+   requires Linux Kernel 4.5 or higher (LDP can be built, but may have
+   limited use without MPLS) For an updated Ubuntu Kernel, see
+   http://kernel.ubuntu.com/~kernel-ppa/mainline/
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    apt-get install git autoconf automake libtool make gawk libreadline-dev \
+       texinfo libpam0g-dev dejagnu libjson0-dev pkg-config libpam0g-dev \
+       libjson0-dev flex python-pip libc-ares-dev python3-dev python3-sphinx
+
+Install newer bison from 14.04 package source (Ubuntu 12.04 package
+source is too old)
+
+::
+
+    mkdir builddir
+    cd builddir
+    wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc
+    wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2
+    wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz
+    tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2
+    cd bison-3.0.2.dfsg/
+    tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz
+    sudo apt-get build-dep bison
+    debuild -b -uc -us
+    cd ..
+    sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb
+    cd ..
+    rm -rf builddir
+
+Install newer version of autoconf and automake:
+
+::
+
+    wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
+    tar xvf autoconf-2.69.tar.gz
+    cd autoconf-2.69
+    ./configure --prefix=/usr
+    make
+    sudo make install
+    cd ..
+
+    wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
+    tar xvf automake-1.15.tar.gz
+    cd automake-1.15
+    ./configure --prefix=/usr
+    make
+    sudo make install
+    cd ..
+
+Install pytest:
+
+::
+
+    pip install pytest
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -r -g 85 frrvty
+    sudo adduser --system --ingroup frr --home /var/run/frr/ \
+       --gecos "FRR suite" --shell /sbin/nologin frr
+    sudo usermod -a -G frrvty frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    ./configure \
+        --prefix=/usr \
+        --enable-exampledir=/usr/share/doc/frr/examples/ \
+        --localstatedir=/var/run/frr \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --enable-pimd \
+        --enable-watchfrr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make
+    make check
+    sudo make install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -m 755 -o frr -g frr -d /var/log/frr
+    sudo install -m 775 -o frr -g frrvty -d /etc/frr
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
+    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
+other settings)
+
+::
+
+    # Uncomment the next line to enable packet forwarding for IPv4
+    net.ipv4.ip_forward=1
+
+    # Uncomment the next line to enable packet forwarding for IPv6
+    #  Enabling this option disables Stateless Address Autoconfiguration
+    #  based on Router Advertisements for this host
+    net.ipv6.conf.all.forwarding=1
+
+**Reboot** or use ``sysctl -p`` to apply the same config to the running
+system
+
+Install the init.d service
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -m 755 tools/frr /etc/init.d/frr
+    sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
+    sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
+    sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
+
+Enable daemons
+~~~~~~~~~~~~~~
+
+| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
+  those daemons you want to start by systemd.
+| For example.
+
+::
+
+    zebra=yes
+    bgpd=yes
+    ospfd=yes
+    ospf6d=yes
+    ripd=yes
+    ripngd=yes
+    isisd=yes
+
+Start the init.d service
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+-  /etc/init.d/frr start
+-  use ``/etc/init.d/frr status`` to check its status.
diff --git a/doc/developer/Building_FRR_on_Ubuntu1404.rst b/doc/developer/Building_FRR_on_Ubuntu1404.rst
new file mode 100644 (file)
index 0000000..10944cb
--- /dev/null
@@ -0,0 +1,139 @@
+Ubuntu 14.04LTS
+===============================================
+
+-  MPLS is not supported on ``Ubuntu 14.04`` with default kernel. MPLS
+   requires Linux Kernel 4.5 or higher (LDP can be built, but may have
+   limited use without MPLS) For an updated Ubuntu Kernel, see
+   http://kernel.ubuntu.com/~kernel-ppa/mainline/
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    apt-get install git autoconf automake libtool make gawk libreadline-dev \
+       texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
+       python-pytest libc-ares-dev python3-dev python3-sphinx
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -r -g 85 frrvty
+    sudo adduser --system --ingroup frr --home /var/run/frr/ \
+       --gecos "FRR suite" --shell /sbin/nologin frr
+    sudo usermod -a -G frrvty frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    ./configure \
+        --prefix=/usr \
+        --enable-exampledir=/usr/share/doc/frr/examples/ \
+        --localstatedir=/var/run/frr \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --enable-pimd \
+        --enable-watchfrr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --enable-ldpd \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make
+    make check
+    sudo make install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -m 755 -o frr -g frr -d /var/log/frr
+    sudo install -m 775 -o frr -g frrvty -d /etc/frr
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
+    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
+
+Enable IP & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
+other settings)
+
+::
+
+    # Uncomment the next line to enable packet forwarding for IPv4
+    net.ipv4.ip_forward=1
+
+    # Uncomment the next line to enable packet forwarding for IPv6
+    #  Enabling this option disables Stateless Address Autoconfiguration
+    #  based on Router Advertisements for this host
+    net.ipv6.conf.all.forwarding=1
+
+**Reboot** or use ``sysctl -p`` to apply the same config to the running
+system ### Install the init.d service
+
+::
+
+    sudo install -m 755 tools/frr /etc/init.d/frr
+    sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
+    sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
+    sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
+
+Enable daemons
+~~~~~~~~~~~~~~
+
+| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
+  those daemons you want to start by systemd.
+| For example.
+
+::
+
+    zebra=yes
+    bgpd=yes
+    ospfd=yes
+    ospf6d=yes
+    ripd=yes
+    ripngd=yes
+    isisd=yes
+
+Start the init.d service
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+-  /etc/init.d/frr start
+-  use ``/etc/init.d/frr status`` to check its status.
diff --git a/doc/developer/Building_FRR_on_Ubuntu1604.rst b/doc/developer/Building_FRR_on_Ubuntu1604.rst
new file mode 100644 (file)
index 0000000..9c296f8
--- /dev/null
@@ -0,0 +1,176 @@
+Ubuntu 16.04LTS
+===============================================
+
+-  MPLS is not supported on ``Ubuntu 16.04`` with default kernel. MPLS
+   requires Linux Kernel 4.5 or higher (LDP can be built, but may have
+   limited use without MPLS) For an updated Ubuntu Kernel, see
+   http://kernel.ubuntu.com/~kernel-ppa/mainline/
+
+Install required packages
+-------------------------
+
+Add packages:
+
+::
+
+    apt-get install git autoconf automake libtool make gawk libreadline-dev \
+       texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
+       python-pytest libc-ares-dev python3-dev libsystemd-dev python-ipaddr \
+       python3-sphinx
+
+Get FRR, compile it and install it (from Git)
+---------------------------------------------
+
+**This assumes you want to build and install FRR from source and not
+using any packages**
+
+Add frr groups and user
+~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo groupadd -g 92 frr
+    sudo groupadd -r -g 85 frrvty
+    sudo adduser --system --ingroup frr --home /var/run/frr/ \
+       --gecos "FRR suite" --shell /sbin/nologin frr
+    sudo usermod -a -G frrvty frr
+
+Download Source, configure and compile it
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(You may prefer different options on configure statement. These are just
+an example.)
+
+::
+
+    git clone https://github.com/frrouting/frr.git frr
+    cd frr
+    ./bootstrap.sh
+    ./configure \
+        --prefix=/usr \
+        --enable-exampledir=/usr/share/doc/frr/examples/ \
+        --localstatedir=/var/run/frr \
+        --sbindir=/usr/lib/frr \
+        --sysconfdir=/etc/frr \
+        --enable-pimd \
+        --enable-watchfrr \
+        --enable-ospfclient=yes \
+        --enable-ospfapi=yes \
+        --enable-multipath=64 \
+        --enable-user=frr \
+        --enable-group=frr \
+        --enable-vty-group=frrvty \
+        --enable-configfile-mask=0640 \
+        --enable-logfile-mask=0640 \
+        --enable-rtadv \
+        --enable-fpm \
+        --enable-systemd=yes \
+        --with-pkg-git-version \
+        --with-pkg-extra-version=-MyOwnFRRVersion
+    make
+    make check
+    sudo make install
+
+Create empty FRR configuration files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -m 755 -o frr -g frr -d /var/log/frr
+    sudo install -m 775 -o frr -g frrvty -d /etc/frr
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
+    sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
+    sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
+
+Enable IPv4 & IPv6 forwarding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
+other settings)
+
+::
+
+    # Uncomment the next line to enable packet forwarding for IPv4
+    net.ipv4.ip_forward=1
+
+    # Uncomment the next line to enable packet forwarding for IPv6
+    #  Enabling this option disables Stateless Address Autoconfiguration
+    #  based on Router Advertisements for this host
+    net.ipv6.conf.all.forwarding=1
+
+Enable MPLS Forwarding (with Linux Kernel >= 4.5)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Edit ``/etc/sysctl.conf`` and the following lines. Make sure to add a
+line equal to ``net.mpls.conf.eth0.input`` or each interface used with
+MPLS
+
+::
+
+    # Enable MPLS Label processing on all interfaces
+    net.mpls.conf.eth0.input=1
+    net.mpls.conf.eth1.input=1
+    net.mpls.conf.eth2.input=1
+    net.mpls.platform_labels=100000
+
+Add MPLS kernel modules
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Add the following lines to ``/etc/modules-load.d/modules.conf``:
+
+::
+
+    # Load MPLS Kernel Modules
+    mpls-router
+    mpls-iptunnel
+
+**Reboot** or use ``sysctl -p`` to apply the same config to the running
+system
+
+Install the systemd service (if rebooted from last step, change directory back to frr directory)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
+    sudo install -m 644 tools/etc/default/frr /etc/default/frr
+    sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
+    sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
+    sudo install -m 644 tools/etc/frr/frr.conf /etc/frr/frr.conf
+    sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
+
+Enable daemons
+~~~~~~~~~~~~~~
+
+| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
+  those daemons you want to start by systemd.
+| For example.
+
+::
+
+    zebra=yes
+    bgpd=yes
+    ospfd=yes
+    ospf6d=yes
+    ripd=yes
+    ripngd=yes
+    isisd=yes
+
+Enable the systemd service
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+-  systemctl enable frr
+
+Start the systemd service
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+-  systemctl start frr
+-  use ``systemctl status frr`` to check its status.
diff --git a/doc/developer/Makefile b/doc/developer/Makefile
new file mode 100644 (file)
index 0000000..9807a75
--- /dev/null
@@ -0,0 +1 @@
+include ../frr-sphinx.mk
diff --git a/doc/developer/OSPF-API.md b/doc/developer/OSPF-API.md
new file mode 100644 (file)
index 0000000..5774300
--- /dev/null
@@ -0,0 +1,263 @@
+# OSPF API Documentation
+
+[TOC]
+
+## Disclaimer
+
+The OSPF daemon contains an API for application access to the LSA database. This API was created by Ralph Keller, originally as patch for Zebra. Unfortunately, the page containing documentation of the API is no longer online. This page is an attempt to recreate documentation for the API (with lots of help of the WayBackMachine)
+
+## 1.  Introduction
+
+This page describes an API that allows external applications to access the link-state database (LSDB) of the OSPF daemon. The implementation is based on the OSPF code from FRRouting (forked from Quagga and formerly Zebra) routing protocol suite and is subject to the GNU General Public License. The OSPF API provides you with the following functionality:
+
+*     Retrieval of the full or partial link-state database of the OSPF daemon. This allows applications to obtain an exact copy of the LSDB including router LSAs, network LSAs and so on. Whenever a new LSA arrives at the OSPF daemon, the API module immediately informs the application by sending a message. This way, the application is always synchronized with the LSDB of the OSPF daemon.
+*    Origination of own opaque LSAs (of type 9, 10, or 11) which are then distributed transparently to other routers within the flooding scope and received by other applications through the OSPF API.
+
+Opaque LSAs, which are described in RFC 2370 , allow you to distribute application-specific information within a network using the OSPF protocol. The information contained in opaque LSAs is transparent for the routing process but it can be processed by other modules such as traffic engineering (e.g., MPLS-TE).
+
+## 2.  Architecture
+
+The following picture depicts the architecture of the Quagga/Zebra protocol suite. The OSPF daemon is extended with opaque LSA capabilities and an API for external applications. The OSPF core module executes the OSPF protocol by discovering neighbors and exchanging neighbor state. The opaque module, implemented by Masahiko Endo, provides functions to exchange opaque LSAs between routers. Opaque LSAs can be generated by several modules such as the MPLS-TE module or the API server module. These modules then invoke the opaque module to flood their data to neighbors within the flooding scope.
+
+The client, which is an application potentially running on a different node than the OSPF daemon, links against the OSPF API client library. This client library establishes a socket connection with the API server module of the OSPF daemon and uses this connection to retrieve LSAs and originate opaque LSAs.
+
+![image](ospf_api_architecture.png)
+
+The OSPF API server module works like any other internal opaque module (such as the MPLS-TE module), but listens to connections from external applications that want to communicate with the OSPF daemon. The API server module can handle multiple clients concurrently.
+
+One of the main objectives of the implementation is to make as little changes to the existing Zebra code as possible.
+
+## 3.  Installation & Configuration
+
+Download FRRouting and unpack
+
+Configure your frr version (note that --enable-opaque-lsa also enables the ospfapi server and ospfclient).
+
+```
+% update-autotools
+% sh ./configure --enable-opaque-lsa
+% make
+
+```
+
+This should also compile the client library and sample application in ospfclient.
+
+Make sure that you have enabled opaque LSAs in your configuration. Add the ospf opaque-lsa statement to your ospfd.conf:
+
+```
+! -*- ospf -*-
+!
+! OSPFd sample configuration file
+!
+!
+hostname xxxxx
+password xxxxx
+
+router ospf
+  router-id 10.0.0.1
+  network 10.0.0.1/24 area 1
+  neighbor 10.0.0.2
+  network 10.0.1.2/24 area 1
+  neighbor 10.0.1.1
+  ospf opaque-lsa      <============ add this statement!
+
+```
+
+## 4. Usage
+
+In the following we describe how you can use the sample application to originate opaque LSAs. The sample application first registers with the OSPF daemon the opaque type it wants to inject and then waits until the OSPF daemon is ready to accept opaque LSAs of that type. Then the client application originates an opaque LSA, waits 10 seconds and then updates the opaque LSA with new opaque data. After another 20 seconds, the client application deletes the opaque LSA from the LSDB. If the clients terminates unexpectedly, the OSPF API module will remove all the opaque LSAs that the application registered. Since the opaque LSAs are flooded to other routers, we will see the opaque LSAs in all routers according to the flooding scope of the opaque LSA.
+
+We have a very simple demo setup, just two routers connected with an ATM point-to-point link. Start the modified OSPF daemons on two adjacent routers. First run on msr2:
+
+```
+    > msr2:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf
+```
+
+And on the neighboring router msr3:
+
+
+```
+    > msr3:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf
+```
+
+Now the two routers form adjacency and start exchanging their databases. Looking at the OSPF daemon of msr2 (or msr3), you see this:
+
+```
+    ospfd> show ip ospf database
+
+           OSPF Router with ID (10.0.0.1)
+
+                    Router Link States (Area 0.0.0.1)
+
+    Link ID         ADV Router      Age  Seq#       CkSum  Link count
+    10.0.0.1        10.0.0.1          55 0x80000003 0xc62f 2
+    10.0.0.2        10.0.0.2          55 0x80000003 0xe3e4 3
+
+                    Net Link States (Area 0.0.0.1)
+
+    Link ID         ADV Router      Age  Seq#       CkSum
+    10.0.0.2        10.0.0.2          60 0x80000001 0x5fcb
+
+```
+
+Now we start the sample main application that originates an opaque LSA.
+
+
+```
+    > cd ospfapi/apiclient
+    > ./main msr2 10 250 20 0.0.0.0 0.0.0.1
+
+```
+
+This originates an opaque LSA of type 10 (area local), with opaque type 250 (experimental), opaque id of 20 (chosen arbitrarily), interface address 0.0.0.0 (which is used only for opaque LSAs type 9), and area 0.0.0.1
+
+Again looking at the OSPF database you see:
+
+```
+    ospfd> show ip ospf database
+
+           OSPF Router with ID (10.0.0.1)
+
+                    Router Link States (Area 0.0.0.1)
+
+    Link ID         ADV Router      Age  Seq#       CkSum  Link count
+    10.0.0.1        10.0.0.1         437 0x80000003 0xc62f 2
+    10.0.0.2        10.0.0.2         437 0x80000003 0xe3e4 3
+
+                    Net Link States (Area 0.0.0.1)
+
+    Link ID         ADV Router      Age  Seq#       CkSum
+    10.0.0.2        10.0.0.2         442 0x80000001 0x5fcb
+
+                    Area-Local Opaque-LSA (Area 0.0.0.1)
+
+    Opaque-Type/Id  ADV Router      Age  Seq#       CkSum
+    250.0.0.20      10.0.0.1           0 0x80000001 0x58a6  <=== opaque LSA
+
+```
+
+You can take a closer look at this opaque LSA:
+
+```
+       ospfd> show ip ospf database opaque-area
+
+       OSPF Router with ID (10.0.0.1)
+
+
+       Area-Local Opaque-LSA (Area 0.0.0.1)
+
+       LS age: 4
+       Options: 66
+       LS Type: Area-Local Opaque-LSA
+       Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID)
+       Advertising Router: 10.0.0.1
+       LS Seq Number: 80000001
+       Checksum: 0x58a6
+       Length: 24
+       Opaque-Type 250 (Private/Experimental)
+       Opaque-ID 0x14
+       Opaque-Info: 4 octets of data
+       Added using OSPF API: 4 octets of opaque data
+       Opaque data: 1 0 0 0 <==== counter is 1
+
+```
+
+Note that the main application updates the opaque LSA after 10 seconds, then it looks as follows:
+
+```
+    ospfd> show ip ospf database opaque-area
+
+           OSPF Router with ID (10.0.0.1)
+
+
+                    Area-Local Opaque-LSA (Area 0.0.0.1)
+
+      LS age: 1
+      Options: 66
+      LS Type: Area-Local Opaque-LSA
+      Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID)
+      Advertising Router: 10.0.0.1
+      LS Seq Number: 80000002
+      Checksum: 0x59a3
+      Length: 24
+      Opaque-Type 250 (Private/Experimental)
+      Opaque-ID   0x14
+      Opaque-Info: 4 octets of data
+      Added using OSPF API: 4 octets of opaque data
+      Opaque data: 2 0 0 0  <==== counter is now 2
+
+```
+
+Note that the payload of the opaque LSA has changed as you can see above.
+
+Then, again after another 20 seconds, the opaque LSA is flushed from the LSDB.
+
+#### Important note:
+
+In order to originate an opaque LSA, there must be at least one active opaque-capable neighbor. Thus, you cannot originate opaque LSAs of no neighbors are present. If you try to originate even so no neighbor is ready,  you will receive a not ready error message. The reason for this restriction is that it might be possible that some routers have an identical opaque LSA from a previous origination in their LSDB that unfortunately could not be flushed due to a crash, and now if the router comes up again and starts originating a new opaque LSA, the new opaque LSA is considered older since it has a lower sequence number and is ignored by other routers (that consider the stalled opaque LSA as more recent). However, if the originating router first synchronizes the database before originating opaque LSAs, it will detect the older opaque LSA and can flush it first.
+
+
+## 5.  Protocol and Message Formats
+
+If you are developing your own client application and you don't want to make use of the client library (due to the GNU license restriction or whatever reason), you can implement your own client-side message handling. The OSPF API uses two connections between the client and the OSPF API server: One connection is used for a synchronous request /reply protocol and another connection is used for asynchronous notifications (e.g., LSA update, neighbor status change).
+
+Each message begins with the following header:
+
+![image](ospf_api_msghdr.png)
+
+The message type field can take one of the following values:
+
+Messages to OSPF deamon | Value
+----------------------- | -----
+MSG_REGISTER_OPAQUETYPE         | 1
+MSG_UNREGISTER_OPAQUETYPE | 2
+MSG_REGISTER_EVENT | 3
+MSG_SYNC_LSDB | 4
+MSG_ORIGINATE_REQUEST | 5
+MSG_DELETE_REQUEST | 6
+
+Messages from OSPF deamon | Value
+------------------------- | -----
+MSG_REPLY | 10
+MSG_READY_NOTIFY | 11
+MSG_LSA_UPDATE_NOTIFY | 12
+MSG_LSA_DELETE_NOTIFY | 13
+MSG_NEW_IF | 14
+MSG_DEL_IF | 15
+MSG_ISM_CHANGE | 16
+MSG_NSM_CHANGE | 17
+
+The synchronous requests and replies have the following message formats:
+
+![image](ospf_api_msgs1.png)
+
+The origin field allows to select according to the following types of origins:
+
+Origin | Value
+------ | -----
+NON_SELF_ORIGINATED | 0
+SELF_ORIGINATED | 1
+ANY_ORIGIN | 2
+
+The reply message has on of the following error codes:
+
+Error code | Value
+---------- | -----
+API_OK | 0
+API_NOSUCHINTERFACE | -1
+API_NOSUCHAREA | -2
+API_NOSUCHLSA | -3
+API_ILLEGALSATYPE | -4
+API_ILLEGALOPAQUETYPE | -5
+API_OPAQUETYPEINUSE | -6
+API_NOMEMORY | -7
+API_ERROR | -99
+API_UNDEF | -100
+
+The asynchronous notifications have the following message formats:
+
+![image](ospf_api_msgs2.png)
+
+## 6.  Original Acknowledgments from Ralph Keller
+
+I would like to thank Masahiko Endo, the author of the opaque LSA extension module, for his great support. His wonderful ASCII graphs explaining the internal workings of this code, and his invaluable input proved to be crucial in designing a useful API for accessing the link state database of the OSPF daemon. Once, he even decided to take the plane from Tokyo to Zurich so that we could actually meet and have face-to-face discussions, which was a lot of fun. Clearly, without Masahiko no API would ever be completed. I also would like to thank Daniel Bauer who wrote an opaque LSA implementation too and was willing to test the OSPF API code in one of his projects.
diff --git a/doc/developer/bgpd.rst b/doc/developer/bgpd.rst
new file mode 100644 (file)
index 0000000..053c077
--- /dev/null
@@ -0,0 +1,8 @@
+BGPD
+=========================
+
+.. toctree::
+   :maxdepth: 2
+
+   next-hop-tracking
+
diff --git a/doc/developer/building.rst b/doc/developer/building.rst
new file mode 100644 (file)
index 0000000..e56744a
--- /dev/null
@@ -0,0 +1,23 @@
+Building FRR
+=========================
+
+.. toctree::
+   :maxdepth: 2
+
+   Building_FRR_on_LEDE-OpenWRT
+   Building_FRR_on_Alpine
+   Building_FRR_on_CentOS6
+   Building_FRR_on_CentOS7
+   Building_FRR_on_Debian8
+   Building_FRR_on_Debian9
+   Building_FRR_on_Fedora24
+   Building_FRR_on_FreeBSD10
+   Building_FRR_on_FreeBSD11
+   Building_FRR_on_FreeBSD9
+   Building_FRR_on_NetBSD6
+   Building_FRR_on_NetBSD7
+   Building_FRR_on_OmniOS
+   Building_FRR_on_OpenBSD6
+   Building_FRR_on_Ubuntu1204
+   Building_FRR_on_Ubuntu1404
+   Building_FRR_on_Ubuntu1604
diff --git a/doc/developer/cli.rst b/doc/developer/cli.rst
new file mode 100644 (file)
index 0000000..cff3d21
--- /dev/null
@@ -0,0 +1,723 @@
+Command Line Interface
+======================
+
+FRR features a flexible modal command line interface. Often when adding new
+features or modifying existing code it is necessary to create or modify CLI
+commands. FRR has a powerful internal CLI system that does most of the heavy
+lifting for you.
+
+All definitions for the CLI system are exposed in ``lib/command.h``. In this
+header there are a set of macros used to define commands. These macros are
+collectively referred to as "DEFUNs", because of their syntax:
+
+::
+
+    DEFUN(command_name,
+          command_name_cmd,
+          "example command FOO...",
+          "Examples\n"
+          "CLI command\n"
+          "Argument\n")
+    {
+        // ...command handler...
+    }
+
+DEFUNs generally take four arguments which are expanded into the appropriate
+constructs for hooking into the CLI. In order these are:
+
+- **Function name** - the name of the handler function for the command
+- **Command name** - the identifier of the ``struct cmd_element`` for the
+  command. By convention this should be the function name with ``_cmd``
+  appended.
+- **Command definition** - an expression in FRR's CLI grammar that defines the
+  form of the command and its arguments, if any
+- **Doc string** - a newline-delimited string that documents each element in
+  the command definition
+
+In the above example, ``command_name`` is the function name,
+``command_name_cmd`` is the command name, ``"example..."`` is the definition
+and the last argument is the doc string. The block following the macro is the
+body of the handler function, details on which are presented later in this
+section.
+
+In order to make the command show up to the user it must be installed into the
+CLI graph. To do this, call:
+
+``install_element(NODE, &command_name_cmd);``
+
+This will install the command into the specified CLI node. Usually these calls
+are grouped together in a CLI initialization function for a set of commands,
+and the DEFUNs themselves are grouped into the same source file to avoid
+cluttering the codebase.  The names of these files follow the form
+``*_vty.[ch]`` by convention. Please do not scatter individual CLI commands in
+the middle of source files; instead expose the necessary functions in a header
+and place the command definition in a ``*_vty.[ch]`` file.
+
+Definition Grammar
+------------------
+
+FRR uses its own grammar for defining CLI commands. The grammar draws from
+syntax commonly seen in \*nix manpages and should be fairly intuitive. The
+parser is implemented in Bison and the lexer in Flex. These may be found in
+``lib/command_lex.l`` and ``lib/command_parse.y``, respectively.
+
+    **ProTip**: if you define a new command and find that the parser is
+    throwing syntax or other errors, the parser is the last place you want
+    to look. Bison is very stable and if it detects a syntax error, 99% of
+    the time it will be a syntax error in your definition.
+
+The formal grammar in BNF is given below. This is the grammar implemented in
+the Bison parser. At runtime, the Bison parser reads all of the CLI strings and
+builds a combined directed graph that is used to match and interpret user
+input.
+
+Human-friendly explanations of how to use this grammar are given a bit later in
+this section alongside information on the :ref:`cli-data-structures` constructed
+by the parser.
+
+.. productionlist::
+   command: `cmd_token_seq`
+          : `cmd_token_seq` `placeholder_token` "..."
+   cmd_token_seq: *empty*
+                : `cmd_token_seq` `cmd_token`
+   cmd_token: `simple_token`
+            : `selector`
+   simple_token: `literal_token`
+               : `placeholder_token`
+   literal_token: WORD `varname_token`
+   varname_token: "$" WORD
+   placeholder_token: `placeholder_token_real` `varname_token`
+   placeholder_token_real: IPV4
+                         : IPV4_PREFIX
+                         : IPV6
+                         : IPV6_PREFIX
+                         : VARIABLE
+                         : RANGE
+                         : MAC
+                         : MAC_PREFIX
+   selector: "<" `selector_seq_seq` ">" `varname_token`
+           : "{" `selector_seq_seq` "}" `varname_token`
+           : "[" `selector_seq_seq` "]" `varname_token`
+   selector_seq_seq: `selector_seq_seq` "|" `selector_token_seq`
+                   : `selector_token_seq`
+   selector_token_seq: `selector_token_seq` `selector_token`
+                     : `selector_token`
+   selector_token: `selector`
+                 : `simple_token`
+
+Tokens
+~~~~~~
+The various capitalized tokens in the BNF above are in fact themselves
+placeholders, but not defined as such in the formal grammar; the grammar
+provides the structure, and the tokens are actually more like a type system for
+the strings you write in your CLI definitions. A CLI definition string is
+broken apart and each piece is assigned a type by the lexer based on a set of
+regular expressions. The parser uses the type information to verify the string
+and determine the structure of the CLI graph; additional metadata (such as the
+raw text of each token) is encoded into the graph as it is constructed by the
+parser, but this is merely a dumb copy job.
+
+Here is a brief summary of the various token types along with examples.
+
++-----------------+-----------------+-------------------------------------------------------------+
+| Token type      | Syntax          | Description                                                 |
++=================+=================+=============================================================+
+| ``WORD``        | ``show ip bgp`` | Matches itself. In the given example every token is a WORD. |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``IPV4``        | ``A.B.C.D``     | Matches an IPv4 address.                                    |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``IPV6``        | ``X:X::X:X``    | Matches an IPv6 address.                                    |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``IPV4_PREFIX`` | ``A.B.C.D/M``   | Matches an IPv4 prefix in CIDR notation.                    |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``IPV6_PREFIX`` | ``X:X::X:X/M``  | Matches an IPv6 prefix in CIDR notation.                    |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``MAC``         | ``M:A:C``       | Matches a 48-bit mac address.                               |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``MAC_PREFIX``  | ``M:A:C/M``     | Matches a 48-bit mac address with a mask.                   |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``VARIABLE``    | ``FOOBAR``      | Matches anything.                                           |
++-----------------+-----------------+-------------------------------------------------------------+
+| ``RANGE``       | ``(X-Y)``       | Matches numbers in the range X..Y inclusive.                |
++-----------------+-----------------+-------------------------------------------------------------+
+
+When presented with user input, the parser will search over all defined
+commands in the current context to find a match. It is aware of the various
+types of user input and has a ranking system to help disambiguate commands. For
+instance, suppose the following commands are defined in the user's current
+context:
+
+::
+
+        example command FOO
+        example command (22-49)
+        example command A.B.C.D/X
+
+The following table demonstrates the matcher's choice for a selection of
+possible user input.
+
++-----------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------+
+| Input                       | Matched command           | Reason                                                                                                       |
++=============================+===========================+==============================================================================================================+
+| example command eLi7eH4xx0r | example command FOO       | ``eLi7eH4xx0r`` is not an integer or IPv4 prefix,                                                            |
+|                             |                           | but FOO is a variable and matches all input.                                                                 |
++-----------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------+
+| example command 42          | example command (22-49)   | ``42`` is not an IPv4 prefix. It does match both                                                             |
+|                             |                           | ``(22-49)`` and ``FOO``, but RANGE tokens are more specific and have a higher priority than VARIABLE tokens. |
++-----------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------+
+| example command 10.3.3.0/24 | example command A.B.C.D/X | The user entered an IPv4 prefix, which is best matched by the last command.                                  |
++-----------------------------+---------------------------+--------------------------------------------------------------------------------------------------------------+
+
+Rules
+~~~~~
+
+There are also constructs which allow optional tokens, mutual exclusion, one-or-more selection and repetition.
+
+-  ``<angle|brackets>`` -- Contain sequences of tokens separated by pipes and
+   provide mutual exclusion. User input matches at most one option.
+-  ``[square brackets]`` -- Contains sequences of tokens that can be omitted.
+   ``[<a|b>]`` can be shortened to ``[a|b]``.
+-  ``{curly|braces}`` -- similar to angle brackets, but instead of mutual
+   exclusion, curly braces indicate that one or more of the pipe-separated
+   sequences may be provided in any order.
+-  ``VARIADICS...`` -- Any token which accepts input (anything except WORD)
+   which occurs as the last token of a line may be followed by an ellipsis,
+   which indicates that input matching the token may be repeated an unlimited
+   number of times.
+-  ``$name`` -- Specify a variable name for the preceding token. See
+   "Variable Names" below.
+
+Some general notes:
+
+-  Options are allowed at the beginning of the command. The developer is
+   entreated to use these extremely sparingly. They are most useful for
+   implementing the 'no' form of configuration commands. Please think carefully
+   before using them for anything else. There is usually a better solution, even
+   if it is just separating out the command definition into separate ones.
+-  The developer should judiciously apply separation of concerns when defining
+   commands. CLI definitions for two unrelated or vaguely related commands or
+   configuration items should be defined in separate commands. Clarity is
+   preferred over LOC (within reason).
+-  The maximum number of space-separated tokens that can be entered is
+   presently limited to 256. Please keep this limit in mind when
+   implementing new CLI.
+
+Variable Names
+--------------
+
+The parser tries to fill the "varname" field on each token. This can
+happen either manually or automatically. Manual specifications work by
+appending ``"$name"`` after the input specifier:
+
+::
+
+    foo bar$cmd WORD$name A.B.C.D$ip
+
+Note that you can also assign variable names to fixed input tokens, this
+can be useful if multiple commands share code. You can also use "$name"
+after a multiple-choice option:
+
+::
+
+    foo bar <A.B.C.D|X:X::X:X>$addr [optionA|optionB]$mode
+
+The variable name is in this case assigned to the last token in each of
+the branches.
+
+Automatic assignment of variable names works by applying the following
+rules:
+
+-  manual names always have priority
+-  a "[no]" at the beginning receives "no" as varname on the "no" token
+-  VARIABLE tokens whose text is not "WORD" or "NAME" receive a cleaned
+   lowercase version of the token text as varname, e.g. "ROUTE-MAP"
+   becomes "route\_map".
+-  other variable tokens (i.e. everything except "fixed") receive the
+   text of the preceding fixed token as varname, if one can be found.
+   E.g.: "ip route A.B.C.D/M INTERFACE" assigns "route" to the
+   "A.B.C.D/M" token.
+
+These rules should make it possible to avoid manual varname assignment
+in 90% of the cases.
+
+DEFPY
+-----
+
+``DEFPY(...)`` is an enhanced version of ``DEFUN()`` which is
+preprocessed by ``python/clidef.py``. The python script parses the
+command definition string, extracts variable names and types, and
+generates a C wrapper function that parses the variables and passes them
+on. This means that in the CLI function body, you will receive
+additional parameters with appropriate types.
+
+This is best explained by an example:
+
+::
+
+    DEFPY(func, func_cmd, "[no] foo bar A.B.C.D (0-99)$num", "...help...")
+
+    =>
+
+    func(self, vty, argc, argv,     /* standard CLI arguments */
+
+            const char *no,         /* unparsed "no" */
+            struct in_addr bar,     /* parsed IP address */
+            const char *bar_str,    /* unparsed IP address */
+            long num,               /* parsed num */
+            const char *num_str)    /* unparsed num */
+
+Note that as documented in the previous section, "bar" is automatically
+applied as variable name for "A.B.C.D". The python code then detects
+this is an IP address argument and generates code to parse it into a
+``struct in_addr``, passing it in ``bar``. The raw value is passed in
+``bar_str``. The range/number argument works in the same way with the
+explicitly given variable name.
+
+Type rules
+~~~~~~~~~~
+
++-----------------------------+--------------------------------+--------------------------+
+| Token(s)                    | Type                           | Value if omitted by user |
++=============================+================================+==========================+
+| ``A.B.C.D``                 | ``struct in_addr``             | 0.0.0.0                  |
++-----------------------------+--------------------------------+--------------------------+
+| ``X:X::X:X``                | ``struct in6_addr``            | \::                      |
++-----------------------------+--------------------------------+--------------------------+
+| ``A.B.C.D + X:X::X:X``      | ``const union sockunion *``    | NULL                     |
++-----------------------------+--------------------------------+--------------------------+
+| ``A.B.C.D/M``               | ``const struct prefix_ipv4 *`` | NULL                     |
++-----------------------------+--------------------------------+--------------------------+
+| ``X:X::X:X/M``              | ``const struct prefix_ipv6 *`` | NULL                     |
++-----------------------------+--------------------------------+--------------------------+
+| ``A.B.C.D/M + X:X::X:X/M``  | ``const struct prefix *``      | NULL                     |
++-----------------------------+--------------------------------+--------------------------+
+| ``(0-9)``                   | ``long``                       | 0                        |
++-----------------------------+--------------------------------+--------------------------+
+| ``VARIABLE``                | ``const char *``               | NULL                     |
++-----------------------------+--------------------------------+--------------------------+
+| ``word``                    | ``const char *``               | NULL                     |
++-----------------------------+--------------------------------+--------------------------+
+| *all other*                 | ``const char *``               | NULL                     |
++-----------------------------+--------------------------------+--------------------------+
+
+Note the following details:
+
+-  Not all parameters are pointers, some are passed as values.
+-  When the type is not ``const char *``, there will be an extra
+   ``_str`` argument with type ``const char *``.
+-  You can give a variable name not only to ``VARIABLE`` tokens but also
+   to ``word`` tokens (e.g. constant words). This is useful if some
+   parts of a command are optional. The type will be ``const char *``.
+-  ``[no]`` will be passed as ``const char *no``.
+-  Pointers will be NULL when the argument is optional and the user did
+   not use it.
+-  If a parameter is not a pointer, but is optional and the user didn't
+   use it, the default value will be passed. Check the ``_str`` argument
+   if you need to determine whether the parameter was omitted.
+-  If the definition contains multiple parameters with the same variable
+   name, they will be collapsed into a single function parameter. The
+   python code will detect if the types are compatible (i.e. IPv4 + IPv6
+   variantes) and choose a corresponding C type.
+-  The standard DEFUN parameters (self, vty, argc, argv) are still
+   present and can be used. A DEFUN can simply be **edited into a DEFPY
+   without further changes and it will still work**; this allows easy
+   forward migration.
+-  A file may contain both DEFUN and DEFPY statements.
+
+Getting a parameter dump
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+The clidef.py script can be called to get a list of DEFUNs/DEFPYs with
+the parameter name/type list:
+
+::
+
+    lib/clippy python/clidef.py --all-defun --show lib/plist.c > /dev/null
+
+The generated code is printed to stdout, the info dump to stderr. The
+``--all-defun`` argument will make it process DEFUN blocks as well as
+DEFPYs, which is useful prior to converting some DEFUNs. **The dump does
+not list the ``_str`` arguments** to keep the output shorter.
+
+Note that the clidef.py script cannot be run with python directly, it
+needs to be run with *clippy* since the latter makes the CLI parser
+available.
+
+Include & Makefile requirements
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+A source file that uses DEFPY needs to include the ``_clippy.c`` file
+**before all DEFPY statements**:
+
+::
+
+    /* GPL header */
+    #include ...
+
+    ...
+
+    #include "daemon/filename_clippy.c"
+
+    DEFPY(...)
+    DEFPY(...)
+
+    install_element(...)
+
+This dependency needs to be marked in Makefile.am: (there is no ordering
+requirement)
+
+::
+
+    include ../common.am
+
+    # ...
+
+    # if linked into a LTLIBRARY (.la/.so):
+    filename.lo: filename_clippy.c
+
+    # if linked into an executable or static library (.a):
+    filename.o: filename_clippy.c
+
+Doc Strings
+-----------
+
+Each token in a command definition should be documented with a brief doc string
+that informs a user of the meaning and/or purpose of the subsequent command
+tree. These strings are provided as the last parameter to DEFUN macros,
+concatenated together and separated by an escaped newline (\n). These are best
+explained by example.
+
+::
+
+    DEFUN (config_terminal,
+           config_terminal_cmd,
+           "configure terminal",
+           "Configuration from vty interface\n"
+           "Configuration terminal\n")
+
+The last parameter is split into two lines for readability. Two newline
+delimited doc strings are present, one for each token in the command.
+The second string documents the functionality of the 'terminal' command
+in the 'configure' tree.
+
+Note that the first string, for 'configure' does not contain
+documentation for 'terminal'. This is because the CLI is best envisioned
+as a tree, with tokens defining branches. An imaginary 'start' token is
+the root of every command in a CLI node. Each subsequent written token
+descends into a subtree, so the documentation for that token ideally
+summarizes all the functionality contained in the subtree.
+
+A consequence of this structure is that the developer must be careful to
+use the same doc strings when defining multiple commands that are part
+of the same tree. Commands which share prefixes must share the same doc
+strings for those prefixes. On startup the parser will generate warnings
+if it notices inconsistent doc strings. Behavior is undefined; the same
+token may show up twice in completions, with different doc strings, or
+it may show up once with a random doc string. Parser warnings should be
+heeded and fixed to avoid confusing users.
+
+The number of doc strings provided must be equal to the amount of tokens
+present in the command definition, read left to right, ignoring any
+special constructs.
+
+In the examples below, each arrowed token needs a doc string.
+
+::
+
+      "show ip bgp"
+       ^    ^  ^
+
+      "command <foo|bar> [example]"
+       ^        ^   ^     ^
+
+.. _cli-data-structures:
+
+Data Structures
+---------------
+
+On startup, the CLI parser sequentially parses each command string
+definition and constructs a directed graph with each token forming a
+node. This graph is the basis of the entire CLI system. It is used to
+match user input in order to generate command completions and match
+commands to functions.
+
+There is one graph per CLI node (not the same as a graph node in the CLI
+graph). The CLI node struct keeps a reference to its graph (see
+lib/command.h).
+
+While most of the graph maintains the form of a tree, special constructs
+outlined in the Rules section introduce some quirks. <>, [] and {} form
+self-contained 'subgraphs'. Each subgraph is a tree except that all of
+the 'leaves' actually share a child node. This helps with minimizing
+graph size and debugging.
+
+As a working example, here is the graph of the following command: ::
+
+   show [ip] bgp neighbors [<A.B.C.D|X:X::X:X|WORD>] [json]
+
+.. figure:: ../figures/cligraph.svg
+   :align: center
+
+   Graph of example CLI command
+
+
+``FORK`` and ``JOIN`` nodes are plumbing nodes that don't correspond to user
+input. They're necessary in order to deduplicate these constructs where
+applicable.
+
+Options follow the same form, except that there is an edge from the ``FORK``
+node to the ``JOIN`` node. Since all of the subgraphs in the example command
+are optional, all of them have this edge.
+
+Keywords follow the same form, except that there is an edge from ``JOIN`` to
+``FORK``. Because of this the CLI graph cannot be called acyclic. There is
+special logic in the input matching code that keeps a stack of paths already
+taken through the node in order to disallow following the same path more than
+once.
+
+Variadics are a bit special; they have an edge back to themselves, which allows
+repeating the same input indefinitely.
+
+The leaves of the graph are nodes that have no out edges. These nodes are
+special; their data section does not contain a token, as most nodes do, or
+NULL, as in ``FORK``/``JOIN`` nodes, but instead has a pointer to a
+cmd\_element. All paths through the graph that terminate on a leaf are
+guaranteed to be defined by that command. When a user enters a complete
+command, the command matcher tokenizes the input and executes a DFS on the CLI
+graph. If it is simultaneously able to exhaust all input (one input token per
+graph node), and then find exactly one leaf connected to the last node it
+reaches, then the input has matched the corresponding command and the command
+is executed. If it finds more than one node, then the command is ambiguous
+(more on this in deduplication). If it cannot exhaust all input, the command is
+unknown. If it exhausts all input but does not find an edge node, the command
+is incomplete.
+
+The parser uses an incremental strategy to build the CLI graph for a node. Each
+command is parsed into its own graph, and then this graph is merged into the
+overall graph. During this merge step, the parser makes a best-effort attempt
+to remove duplicate nodes. If it finds a node in the overall graph that is
+equal to a node in the corresponding position in the command graph, it will
+intelligently merge the properties from the node in the command graph into the
+already-existing node. Subgraphs are also checked for isomorphism and merged
+where possible. The definition of whether two nodes are 'equal' is based on the
+equality of some set of token properties; read the parser source for the most
+up-to-date definition of equality.
+
+When the parser is unable to deduplicate some complicated constructs, this can
+result in two identical paths through separate parts of the graph. If this
+occurs and the user enters input that matches these paths, they will receive an
+'ambiguous command' error and will be unable to execute the command. Most of
+the time the parser can detect and warn about duplicate commands, but it will
+not always be able to do this.  Hence care should be taken before defining a
+new command to ensure it is not defined elsewhere.
+
+Command handlers
+----------------
+
+The block that follows a CLI definition is executed when a user enters
+input that matches the definition. Its function signature looks like
+this:
+
+::
+
+   int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]);
+
+The first argument is the command definition struct. The last argument
+is an ordered array of tokens that correspond to the path taken through
+the graph, and the argument just prior to that is the length of the
+array.
+
+The arrangement of the token array has changed from the prior
+incarnation of the CLI system. In the old system, missing arguments were
+padded with NULLs so that the same parts of a command would show up at
+the same indices regardless of what was entered. The new system does not
+perform such padding and therefore it is generally *incorrect* to assume
+consistent indices in this array. As a simple example:
+
+Command definition:
+
+::
+
+      command [foo] <bar|baz>
+
+User enters:
+
+::
+
+      command foo bar
+
+Array:
+
+::
+
+      [0] -> command
+      [1] -> foo
+      [2] -> bar
+
+User enters:
+
+::
+
+      command baz
+
+Array:
+
+::
+
+      [0] -> command
+      [1] -> baz
+
+Command abbreviation & matching priority
+----------------------------------------
+
+As in the prior implementation, it is possible for users to elide parts
+of tokens when the CLI matcher does not need them to make an unambiguous
+match. This is best explained by example.
+
+Command definitions:
+
+::
+
+      command dog cow
+      command dog crow
+
+User input:
+
+::
+
+      c d c         -> ambiguous command
+      c d co        -> match "command dog cow"
+
+In the new implementation, this functionality has improved. Where
+previously the parser would stop at the first ambiguous token, it will
+now look ahead and attempt to disambiguate based on tokens later on in
+the input string.
+
+Command definitions:
+
+::
+
+      show ip bgp A.B.C.D
+      show ipv6 bgp X:X::X:X
+
+User enters:
+
+::
+
+      s i b 4.3.2.1         -> match "show ip bgp A.B.C.D"
+      s i b ::e0            -> match "show ipv6 bgp X:X::X:X"
+
+Previously both of these commands would be ambiguous since 'i' does not
+explicitly select either 'ip' or 'ipv6'. However, since the user later
+provides a token that matches only one of the commands (an IPv4 or IPv6
+address) the parser is able to look ahead and select the appropriate
+command. This has some implications for parsing the argv\*[] that is
+passed to the command handler.
+
+Now consider a command definition such as:
+
+::
+
+      command <foo|VAR>
+
+'foo' only matches the string 'foo', but 'VAR' matches any input,
+including 'foo'. Who wins? In situations like this the matcher will
+always choose the 'better' match, so 'foo' will win.
+
+Consider also:
+
+::
+
+      show <ip|ipv6> foo
+
+User input:
+
+::
+
+      show ip foo
+
+'ip' partially matches 'ipv6' but exactly matches 'ip', so 'ip' will
+win.
+
+struct cmd\_token
+-----------------
+
+::
+
+    /* Command token struct. */
+    struct cmd_token
+    {
+      enum cmd_token_type type;     // token type
+      u_char attr;                  // token attributes
+      bool allowrepeat;             // matcher allowed to match token repetitively?
+
+      char *text;                   // token text
+      char *desc;                   // token description
+      long long min, max;           // for ranges
+      char *arg;                    // user input that matches this token
+      char *varname;                // variable name
+    };
+
+This struct is used in the CLI graph to match input against. It is also
+used to pass user input to command handler functions, as it is
+frequently useful for handlers to have access to that information. When
+a command is matched, the sequence of cmd\_tokens that form the matching
+path are duplicated and placed in order into argv\*[]. Before this
+happens the ->arg field is set to point at the snippet of user input
+that matched it.
+
+For most nontrivial commands the handler function will need to determine
+which of the possible matching inputs was entered. Previously this was
+done by looking at the first few characters of input. This is now
+considered an anti-pattern and should be avoided. Instead, the ->type or
+->text fields for this logic. The ->type field can be used when the
+possible inputs differ in type. When the possible types are the same,
+use the ->text field. This field has the full text of the corresponding
+token in the definition string and using it makes for much more readable
+code. An example is helpful.
+
+Command definition:
+
+::
+
+      command <(1-10)|foo|BAR>
+
+In this example, the user may enter any one of: \* an integer between 1
+and 10 \* "foo" \* anything at all
+
+If the user enters "command f", then:
+
+::
+
+    argv[1]->type == WORD_TKN
+    argv[1]->arg  == "f"
+    argv[1]->text == "foo"
+
+Range tokens have some special treatment; a token with ->type ==
+RANGE\_TKN will have the ->min and ->max fields set to the bounding
+values of the range.
+
+Permutations
+------------
+
+Finally, it is sometimes useful to check all the possible combinations
+of input that would match an arbitrary definition string. There is a
+tool in tools/ called 'permutations' that reads CLI definition strings
+on stdin and prints out all matching input permutations. It also dumps a
+text representation of the graph, which is more useful for debugging
+than anything else. It looks like this:
+
+::
+
+    $ ./permutations "show [ip] bgp [<view|vrf> WORD]"
+
+    show ip bgp view WORD
+    show ip bgp vrf WORD
+    show ip bgp
+    show bgp view WORD
+    show bgp vrf WORD
+    show bgp
+
+This functionality is also built into VTY/VTYSH; the 'list permutations'
+command will list all possible matching input permutations in the
+current CLI node.
diff --git a/doc/developer/conf.py b/doc/developer/conf.py
new file mode 100644 (file)
index 0000000..e2293b2
--- /dev/null
@@ -0,0 +1,341 @@
+# -*- coding: utf-8 -*-
+#
+# FRR documentation build configuration file, created by
+# sphinx-quickstart on Tue Jan 31 16:00:52 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import re
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+needs_sphinx = '1.0'
+
+# prolog for various variable substitutions
+rst_prolog = ''
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = ['sphinx.ext.todo']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+# source_suffix = ['.rst']
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'FRR'
+copyright = u'2017, FRR'
+author = u'FRR'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+
+# The short X.Y version.
+version = u'?.?'
+# The full version, including alpha/beta/rc tags.
+release = u'?.?-?'
+
+
+# -----------------------------------------------------------------------------
+# Extract values from codebase for substitution into docs.
+# -----------------------------------------------------------------------------
+
+# Various installation prefixes. Reasonable defaults are set where possible.
+# Values are overridden by logic below.
+replace_vars = {
+    'AUTHORS': 'Kunihiro Ishiguro, et al.',
+    'COPYRIGHT_YEAR': '1999-2005',
+    'COPYRIGHT_STR': None,
+    'PACKAGE_NAME': project.lower(),
+    'PACKAGE_TARNAME': project.lower(),
+    'PACKAGE_STRING': None,
+    'PACKAGE_URL': 'https://frrouting.org/',
+    'PACKAGE_VERSION': None,
+    'INSTALL_PREFIX_ETC': None,
+    'INSTALL_PREFIX_SBIN': None,
+    'INSTALL_PREFIX_STATE': None,
+    'INSTALL_PREFIX_MODULES': None,
+    'INSTALL_USER': None,
+    'INSTALL_GROUP': None,
+    'INSTALL_VTY_GROUP': None,
+}
+
+# extract version information, installation location, other stuff we need to
+# use when building final documents
+val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+with open('../../config.status', 'r') as cfgstatus:
+    for ln in cfgstatus.readlines():
+        m = val.match(ln)
+        if not m or m.group(1) not in replace_vars.keys(): continue
+        replace_vars[m.group(1)] = m.group(2)
+
+# manually fill out some of these we can't get from config.status
+replace_vars['COPYRIGHT_STR'] = "Copyright (c)"
+replace_vars['COPYRIGHT_STR'] += ' {0}'.format(replace_vars['COPYRIGHT_YEAR'])
+replace_vars['COPYRIGHT_STR'] += ' {0}'.format(replace_vars['AUTHORS'])
+release = replace_vars['PACKAGE_VERSION']
+version = release.split('-')[0]
+
+# add substitutions to prolog
+for key, value in replace_vars.items():
+    rst_prolog += '.. |{0}| replace:: {1}\n'.format(key, value)
+
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = True
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+html_theme_options = {
+    'sidebarbgcolor': '#374249'
+}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+html_logo = '../figures/frr-icon.svg'
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+html_favicon = '../figures/frr-logo-icon.png'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+#html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
+#html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# Now only 'ja' uses this config value
+#html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'FRRdoc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+
+# Latex figure (float) alignment
+#'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (master_doc, 'FRR.tex', u"FRR Developer's Manual",
+     u'FRR', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+latex_logo = '../figures/frr-logo-medium.png'
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    (master_doc, 'frr', u"FRR Developer's Manual",
+     [author], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    (master_doc, 'frr', u"FRR Developer's Manual",
+     author, 'FRR', 'One line description of project.',
+     'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+# custom extensions here
+def setup(app):
+    # object type for FRR CLI commands, can be extended to document parent CLI
+    # node later on
+    app.add_object_type('clicmd', 'clicmd')
diff --git a/doc/developer/dev-modules.md b/doc/developer/dev-modules.md
new file mode 100644 (file)
index 0000000..87bc963
--- /dev/null
@@ -0,0 +1,119 @@
+# Module and Hook support (developer docs)
+
+## What it does
+
+It uses `dlopen()` to load DSOs at startup.
+
+
+## Limitations
+
+* can't load, unload, or reload during runtime.  This just needs some work
+  and can probably be done in the future.
+* doesn't fix any of the "things need to be changed in the code in the library"
+  issues.  Most prominently, you can't add a CLI node because CLI nodes are
+  listed in the library...
+* if your module crashes, the daemon crashes.  Should be obvious.
+* **does not provide a stable API or ABI**.  Your module must match a version
+  of FRR and you may have to update it frequently to match changes.
+* **does not create a license boundary**.  Your module will need to link
+  libzebra and include header files from the daemons, meaning it will be
+  GPL-encumbered.
+
+
+## Installation
+
+Look for `moduledir` in `configure.ac`, default is normally
+`/usr/lib64/frr/modules` but depends on `--libdir` / `--prefix`.
+
+The daemon's name is prepended when looking for a module, e.g. "snmp" tries
+to find "zebra_snmp" first when used in zebra.  This is just to make it nicer
+for the user, with the snmp module having the same name everywhere.
+
+Modules can be packaged separately from FRR.  The SNMP and FPM modules are
+good candidates for this because they have dependencies (net-snmp / protobuf)
+that are not FRR dependencies.  However, any distro packages should have an
+"exact-match" dependency onto the FRR package.  Using a module from a
+different FRR version will probably blow up nicely.
+
+For snapcraft (and during development), modules can be loaded with full path
+(e.g. -M `$SNAP/lib/frr/modules/zebra_snmp.so`).  Note that libtool puts output
+files in the .libs directory, so during development you have to use
+`./zebra -M .libs/zebra_snmp.so`.
+
+
+## Creating a module
+
+... best to look at the existing SNMP or FPM modules.
+
+Basic boilerplate:
+
+```
+#include "hook.h"
+#include "module.h"
+
+static int
+module_init (void)
+{
+  hook_register(frr_late_init, module_late_init);
+  return 0;
+}
+
+FRR_MODULE_SETUP(
+       .name = "my module",
+       .version = "0.0",
+       .description = "my module",
+       .init = module_init,
+)
+```
+
+The `frr_late_init` hook will be called after the daemon has finished its
+other startup and is about to enter the main event loop;  this is the best
+place for most initialisation.
+
+
+## Compiler & Linker magic
+
+There's a `THIS_MODULE` (like in the Linux kernel), which uses `visibility`
+attributes to restrict it to the current module.  If you get a linker error
+with `_frrmod_this_module`, there is some linker SNAFU.  This shouldn't be
+possible, though one way to get it would be to not include libzebra (which
+provides a fallback definition for the symbol).
+
+libzebra and the daemons each have their own `THIS_MODULE`, as do all loadable
+modules.  In any other libraries (e.g. `libfrrsnmp`), `THIS_MODULE` will use
+the definition in libzebra;  same applies if the main executable doesn't use
+`FRR_DAEMON_INFO` (e.g. all testcases).
+
+The deciding factor here is "what dynamic linker unit are you using the symbol
+from."  If you're in a library function and want to know who called you, you
+can't use `THIS_MODULE` (because that'll just tell you you're in the library).
+Put a macro around your function that adds `THIS_MODULE` in the *caller's
+code calling your function*.
+
+The idea is to use this in the future for module unloading.  Hooks already
+remember which module they were installed by, as groundwork for a function
+that removes all of a module's installed hooks.
+
+There's also the `frr_module` symbol in modules, pretty much a standard entry
+point for loadable modules.
+
+
+## Hooks
+
+Hooks are just points in the code where you can register your callback to
+be called.  The parameter list is specific to the hook point.  Since there is
+no stable API, the hook code has some extra type safety checks making sure
+you get a compiler warning when the hook parameter list doesn't match your
+callback.  Don't ignore these warnings.
+
+
+## Relation to MTYPE macros
+
+The MTYPE macros, while primarily designed to decouple MTYPEs from the library
+and beautify the code, also work very nicely with loadable modules -- both
+constructors and destructors are executed when loading/unloading modules.
+
+This means there is absolutely no change required to MTYPEs, you can just use
+them in a module and they will even clean up themselves when we implement
+module unloading and an unload happens.  In fact, it's impossible to create
+a bug where unloading fails to de-register a MTYPE.
diff --git a/doc/developer/draft-zebra-00.ms b/doc/developer/draft-zebra-00.ms
new file mode 100644 (file)
index 0000000..2599472
--- /dev/null
@@ -0,0 +1,209 @@
+.pl 10.0i
+.po 0
+.ll 7.2i
+.lt 7.2i
+.nr LL 7.2i
+.nr LT 7.2i
+.ds LF Ishiguro
+.ds RF FORMFEED[Page %]
+.ds CF
+.ds LH RFC DRAFT
+.ds RH March 1998
+.ds CH
+.hy 0
+.ad l
+Network Working Group                                        K. Ishiguro
+Request for Comments: DRAFT                     Digital Magic Labs, Inc.
+                                                              March 1998
+.sp 2
+.ce
+Zebra Protocol Draft
+.sp 2
+.fi
+.ne 4
+Status of this Memo
+.sp
+.in 3
+This draft is very eary beta version.
+.sp
+.in 0
+.ne 4
+Introduction
+.sp
+.in 3
+The zebra protocol is a communication protocol between kernel
+routing table manager and routing protocol daemon. It is built over
+TCP/IP protocol suite.
+.sp
+.in 0
+.ne 4
+Request message formats
+.sp
+.in 3
+zebra is TCP-based protocol.
+.sp
+Below is request packet format.
+.sp
+.in 0
+.DS
+0                   1                   2                   3
+0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|           Length (2)          |   Command (1) |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.DE
+.sp
+.in 3
+Length is total packet length.
+.sp
+Here is summary of command list.
+.sp
+.in 0
+.DS
+1 - ZEBRA_IPV4_ROUTE_ADD
+2 - ZEBRA_IPV4_ROUTE_DELETE
+3 - ZEBRA_IPV6_ROUTE_ADD
+4 - ZEBRA_IPV6_ROUTE_DELETE
+5 - ZEBRA_GET_ONE_INTERFACE
+6 - ZEBRA_GET_ALL_INTERFACE
+7 - ZEBRA_GET_HOSTINFO
+.DE
+.sp
+.in 0
+.ne 4
+IPv4 reply message formats
+.sp
+.in 0
+.DS
+0                   1                   2                   3
+0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+
+|    Type (1)   |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                            Gateway (4)                        |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.DE
+.sp
+.in 3
+Type field specify route's origin type.
+.sp
+.in 0
+.DS
+1 - ZEBRA_ROUTE_RESERVE
+2 - ZEBRA_ROUTE_CONNECT
+3 - ZEBRA_ROUTE_STATIC
+4 - ZEBRA_ROUTE_RIP
+5 - ZEBRA_ROUTE_RIPNG
+6 - ZEBRA_ROUTE_BGP
+7 - ZEBRA_ROUTE_RADIX
+.DE
+.sp
+.in 3
+After above message there can be variale length IPv4 prefix data.
+Each IPv4 prefix is encoded as a two tuple of the form <masklength,
+prefix>
+.sp
+.in 0
+.DS
++----------------------+
+|Subnet mask (1 octet) |
++----------------------+
+|IPv4 prefix (variable)|
++----------------------+
+.DE
+.sp
+.in 0
+.ne 4
+IPv6 reply message formats
+.sp
+.in 0
+.DS
+0                   1                   2                   3
+0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+
+|    Type (1)   |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                                                               |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                           Gateway (16)                        |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                                                               |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                                                               |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.DE
+.sp
+.in 3
+Type field specify route's origin type.
+.sp
+.in 0
+.DS
+1 - ZEBRA_ROUTE_RESERVE
+2 - ZEBRA_ROUTE_CONNECT
+3 - ZEBRA_ROUTE_STATIC
+4 - ZEBRA_ROUTE_RIP
+5 - ZEBRA_ROUTE_RIPNG
+6 - ZEBRA_ROUTE_BGP
+7 - ZEBRA_ROUTE_RADIX
+.DE
+.sp
+.in 0
+.DS
++----------------------+
+|  ifindex   (4 octet) |
++----------------------+
+|  prefixlen  (1 octet)|
++----------------------+
+|IPv6 prefix (variable)|
++----------------------+
+.DE
+.sp
+.in 3
+I am not sure but it seems some operation systems IPv6
+implementation may need interface index when add and delete
+linklocal routes.
+.sp
+I have added ifindex field to specify IPv6 routes interface
+index. If this index is value zero, it will ignored.
+.sp
+.in 0
+.ne 4
+Interface information message format.
+.sp
+.in 0
+.DS
+0                   1                   2                   3
+0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                      Interface name (20)                      |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|   Index (1)   |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                       Inteface flag (4)                       |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                      Inteface metric (4)                      |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                        Inteface MTU (4)                       |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                    Inteface Address count (4)                 |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.DE
+.sp
+.in 3
+Address message format.
+.sp
+.in 0
+.ne 4
+Host inforamtion message format.
+.sp
+.in 0
+.DS
+0                   1                   2                   3
+0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|IPv4 forwarding|IPv6 forwarding|
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.DE
+.sp
+.in 3
+Host information contain IPv4/IPv6 forwarding information.
diff --git a/doc/developer/hooks.rst b/doc/developer/hooks.rst
new file mode 100644 (file)
index 0000000..0afa297
--- /dev/null
@@ -0,0 +1,171 @@
+.. highlight:: c
+
+Hooks
+=====
+
+Libfrr provides type-safe subscribable hook points where other pieces of
+code can add one or more callback functions.  "type-safe" in this case
+applies to the function pointers used for subscriptions.  The
+implementations checks (at compile-time) wheter a callback to be added has
+the appropriate function signature (parameters) for the hook.
+
+Example:
+
+.. code-block:: c
+     :caption: mydaemon.h
+
+     #include "hook.h"
+     DECLARE_HOOK(some_update_event, (struct eventinfo *info), (info))
+
+.. code-block:: c
+     :caption: mydaemon.c
+
+     #include "mydaemon.h"
+     DEFINE_HOOK(some_update_event, (struct eventinfo *info), (info))
+     ...
+     hook_call(some_update_event, info);
+
+.. code-block:: c
+     :caption: mymodule.c
+
+     #include "mydaemon.h"
+     static int event_handler(struct eventinfo *info);
+     ...
+     hook_register(some_update_event, event_handler);
+
+Do not use parameter names starting with "hook", these can collide with
+names used by the hook code itself.
+
+
+Return values
+-------------
+
+Callbacks to be placed on hooks always return "int" for now;  hook_call will
+sum up the return values from each called function.  (The default is 0 if no
+callbacks are registered.)
+
+There are no pre-defined semantics for the value, in most cases it is
+ignored.  For success/failure indication, 0 should be success, and
+handlers should make sure to only return 0 or 1 (not -1 or other values).
+
+There is no built-in way to abort executing a chain after a failure of one
+of the callbacks.  If this is needed, the hook can use an extra
+``bool *aborted`` argument.
+
+
+Priorities
+----------
+
+Hooks support a "priority" value for ordering registered calls
+relative to each other.  The priority is a signed integer where lower
+values are called earlier.  There are also "Koohs", which is hooks with
+reverse priority ordering (for cleanup/deinit hooks, so you can use the
+same priority value).
+
+Recommended priority value ranges are:
+
+======================== ===================================================
+Range                    Usage
+------------------------ ---------------------------------------------------
+ -999 ...     0 ...  999 main executable / daemon, or library
+
+-1999 ... -1000          modules registering calls that should run before
+                         the daemon's bits
+
+1000 ... 1999            modules' calls that should run after daemon's
+                         (includes default value: 1000)
+======================== ===================================================
+
+Note: the default value is 1000, based on the following 2 expectations:
+
+- most hook_register() usage will be in loadable modules
+- usage of hook_register() in the daemon itself may need relative ordering
+  to itself, making an explicit value the expected case
+
+The priority value is passed as extra argument on hook_register_prio() /
+hook_register_arg_prio().  Whether a hook runs in reverse is determined
+solely by the code defining / calling the hook.  (DECLARE_KOOH is actually
+the same thing as DECLARE_HOOK, it's just there to make it obvious.)
+
+
+Definition
+----------
+
+.. c:macro:: DECLARE_HOOK(name, arglist, passlist)
+.. c:macro:: DECLARE_KOOH(name, arglist, passlist)
+
+   :param name: Name of the hook to be defined
+   :param arglist: Function definition style parameter list in braces.
+   :param passlist: List of the same parameters without their types.
+
+   Note:  the second and third macro args must be the hook function's
+   parameter list, with the same names for each parameter.  The second
+   macro arg is with types (used for defining things), the third arg is
+   just the names (used for passing along parameters).
+
+   This macro must be placed in a header file;  this header file must be
+   included to register a callback on the hook.
+
+   Examples:
+
+   .. code-block:: c
+
+      DECLARE_HOOK(foo, (), ())
+      DECLARE_HOOK(bar, (int arg), (arg))
+      DECLARE_HOOK(baz, (const void *x, in_addr_t y), (x, y))
+
+.. c:macro:: DEFINE_HOOK(name, arglist, passlist)
+
+   Implements an hook.  Each ``DECLARE_HOOK`` must have be accompanied by
+   exactly one ``DEFINE_HOOK``, which needs to be placed in a source file.
+   **The hook can only be called from this source file.**  This is intentional
+   to avoid overloading and/or misusing hooks for distinct purposes.
+
+   The compiled source file will include a global symbol with the name of the
+   hook prefixed by `_hook_`.  Trying to register a callback for a hook that
+   doesn't exist will therefore result in a linker error, or a module
+   load-time error for dynamic modules.
+
+.. c:macro:: DEFINE_KOOH(name, arglist, passlist)
+
+   Same as ``DEFINE_HOOK``, but the sense of priorities / order of callbacks
+   is reversed.  This should be used for cleanup hooks.
+
+.. c:function:: int hook_call(name, ...)
+
+   Calls the specified named hook.  Parameters to the hook are passed right
+   after the hook name, e.g.:
+
+   .. code-block:: c
+
+      hook_call(foo);
+      hook_call(bar, 0);
+      hook_call(baz, NULL, INADDR_ANY);
+
+   Returns the sum of return values from all callbacks.  The ``DEFINE_HOOK``
+   statement for the hook must be placed in the file before any ``hook_call``
+   use of the hook.
+
+
+Callback registration
+---------------------
+
+.. c:function:: void hook_register(name, int (*callback)(...))
+.. c:function:: void hook_register_prio(name, int priority, int (*callback)(...))
+.. c:function:: void hook_register_arg(name, int (*callback)(void *arg, ...), void *arg)
+.. c:function:: void hook_register_arg_prio(name, int priority, int (*callback)(void *arg, ...), void *arg)
+
+   Register a callback with an hook.  If the caller needs to pass an extra
+   argument to the callback, the _arg variant can be used and the extra
+   parameter will be passed as first argument to the callback.  There is no
+   typechecking for this argument.
+
+   The priority value is used as described above.  The variants without a
+   priority parameter use 1000 as priority value.
+
+.. c:function:: void hook_unregister(name, int (*callback)(...))
+.. c:function:: void hook_unregister_arg(name, int (*callback)(void *arg, ...), void *arg)
+
+   Removes a previously registered callback from a hook.  Note that there
+   is no _prio variant of these calls.  The priority value is only used during
+   registration.
diff --git a/doc/developer/index.rst b/doc/developer/index.rst
new file mode 100644 (file)
index 0000000..acb05e2
--- /dev/null
@@ -0,0 +1,13 @@
+Welcome to FRR's documentation!
+===============================
+
+.. toctree::
+   :maxdepth: 2
+
+   workflow
+   library
+   bgpd
+   building
+   ospf-api
+   ospf-sr
+
diff --git a/doc/developer/ldpd-basic-test-setup.md b/doc/developer/ldpd-basic-test-setup.md
new file mode 100644 (file)
index 0000000..b25a2b6
--- /dev/null
@@ -0,0 +1,681 @@
+## Topology
+
+The goal of this test is to verify that the all the basic functionality
+of ldpd is working as expected, be it running on Linux or OpenBSD. In
+addition to that, more advanced features are also tested, like LDP
+sessions over IPv6, MD5 authentication and pseudowire signaling.
+
+In the topology below there are 3 PE routers, 3 CE routers and one P
+router (not attached to any consumer site).
+
+All routers have IPv4 addresses and OSPF is used as the IGP. The
+three routers from the bottom of the picture, P, PE2 and PE3, are also
+configured for IPv6 (dual-stack) and static IPv6 routes are used to
+provide connectivity among them.
+
+The three CEs share the same VPLS membership. LDP is used to set up the
+LSPs among the PEs and to signal the pseudowires. MD5 authentication is
+used to protect all LDP sessions.
+
+```
+                          CE1 172.16.1.1/24
+                           +
+                           |
+                       +---+---+
+                       |  PE1  |
+                       | IOS XE|
+                       |       |
+                       +---+---+
+                           |
+                           | 10.0.1.0/24
+                           |
+                       +---+---+
+                       |   P   |
+                +------+ IOS XR+------+
+                |      |       |      |
+                |      +-------+      |
+    10.0.2.0/24 |                     | 10.0.3.0/24
+2001:db8:2::/64 |                     | 2001:db8:3::/64
+                |                     |
+            +---+---+             +---+---+
+            |  PE2  |             |  PE3  |
+            |OpenBSD+-------------+ Linux |
+            |       |             |       |
+            +---+---+ 10.0.4.0/24 +---+---+
+                |   2001:db8:4::/64   |
+                +                     +
+ 172.16.1.2/24 CE2                   CE3 172.16.1.3/24
+```
+
+## Configuration
+
+#### Linux
+1 - Enable IPv4/v6 forwarding:
+```
+# sysctl -w net.ipv4.ip_forward=1
+# sysctl -w net.ipv6.conf.all.forwarding=1
+```
+
+2 - Enable MPLS forwarding:
+```
+# modprobe mpls-router
+# modprobe mpls-iptunnel
+# echo 100000 > /proc/sys/net/mpls/platform_labels
+# echo 1 > /proc/sys/net/mpls/conf/eth1/input
+# echo 1 > /proc/sys/net/mpls/conf/eth2/input
+```
+
+3 - Set up the interfaces:
+```
+# ip link add name lo1 type dummy
+# ip link set dev lo1 up
+# ip addr add 4.4.4.4/32 dev lo1
+# ip -6 addr add 4:4:4::4/128 dev lo1
+# ip link set dev eth1 up
+# ip addr add 10.0.4.4/24 dev eth1
+# ip -6 addr add 2001:db8:4::4/64 dev eth1
+# ip link set dev eth2 up
+# ip addr add 10.0.3.4/24 dev eth2
+# ip -6 addr add 2001:db8:3::4/64 dev eth2
+```
+
+4 - Set up the bridge and pseudowire interfaces:
+```
+# ip link add type bridge
+# ip link set dev bridge0 up
+# ip link set dev eth0 up
+# ip link set dev eth0 master bridge0
+# ip link add name mpw0 type dummy
+# ip link set dev mpw0 up
+# ip link set dev mpw0 master bridge0
+# ip link add name mpw1 type dummy
+# ip link set dev mpw1 up
+# ip link set dev mpw1 master bridge0
+```
+
+> NOTE: MPLS support in the Linux kernel is very recent and it still
+doesn't support pseudowire interfaces. We are using here dummy interfaces
+just to show how the VPLS configuration should look like in the future.
+
+5 - Add static IPv6 routes for the remote loopbacks:
+```
+# ip -6 route add 2:2:2::2/128 via 2001:db8:3::2
+# ip -6 route add 3:3:3::3/128 via 2001:db8:4::3
+```
+
+6 - Edit /etc/frr/ospfd.conf:
+```
+router ospf
+ network 4.4.4.4/32 area 0.0.0.0
+ network 10.0.3.4/24 area 0.0.0.0
+ network 10.0.4.4/24 area 0.0.0.0
+!
+```
+
+7 - Edit /etc/frr/ldpd.conf:
+```
+debug mpls ldp messages recv
+debug mpls ldp messages sent
+debug mpls ldp zebra
+!
+mpls ldp
+ router-id 4.4.4.4
+ dual-stack cisco-interop
+ neighbor 1.1.1.1 password opensourcerouting
+ neighbor 2.2.2.2 password opensourcerouting
+ neighbor 3.3.3.3 password opensourcerouting
+ !
+ address-family ipv4
+  discovery transport-address 4.4.4.4
+  label local advertise explicit-null
+  !
+  interface eth2
+  !
+  interface eth1
+  !
+ !
+ address-family ipv6
+  discovery transport-address 4:4:4::4
+  ttl-security disable
+  !
+  interface eth2
+  !
+  interface eth1
+  !
+ !
+!
+l2vpn ENG type vpls
+ bridge br0
+ member interface eth0
+ !
+ member pseudowire mpw0
+  neighbor lsr-id 1.1.1.1
+  pw-id 100
+ !
+ member pseudowire mpw1
+  neighbor lsr-id 3.3.3.3
+  neighbor address 3:3:3::3
+  pw-id 100
+ !
+!
+```
+
+> NOTE: We have to disable ttl-security under the ipv6 address-family
+in order to interoperate with the IOS-XR router. GTSM is mandatory for
+LDPv6 but the IOS-XR implementation is not RFC compliant in this regard.
+
+8 - Run zebra, ospfd and ldpd.
+
+#### OpenBSD
+1 - Enable IPv4/v6 forwarding:
+```
+# sysctl net.inet.ip.forwarding=1
+# sysctl net.inet6.ip6.forwarding=1
+```
+
+2 - Enable MPLS forwarding:
+```
+# ifconfig em2 10.0.2.3/24 mpls
+# ifconfig em3 10.0.4.3/24 mpls
+```
+
+3 - Set up the interfaces:
+```
+# ifconfig lo1 alias 3.3.3.3 netmask 255.255.255.255
+# ifconfig lo1 inet6 3:3:3::3/128
+# ifconfig em2 inet6 2001:db8:2::3/64
+# ifconfig em3 inet6 2001:db8:4::3/64
+```
+
+4 - Set up the bridge and pseudowire interfaces:
+```
+# ifconfig bridge0 create
+# ifconfig bridge0 up
+# ifconfig em1 up
+# ifconfig bridge0 add em1
+# ifconfig mpw0 create
+# ifconfig mpw0 up
+# ifconfig bridge0 add mpw0
+# ifconfig mpw1 create
+# ifconfig mpw1 up
+# ifconfig bridge0 add mpw1
+```
+
+5 - Add static IPv6 routes for the remote loopbacks:
+```
+# route -n add 4:4:4::4/128 2001:db8:4::4
+# route -n add 2:2:2::2/128 2001:db8:2::2
+```
+
+6 - Edit /etc/frr/ospfd.conf:
+```
+router ospf
+ network 10.0.2.3/24 area 0
+ network 10.0.4.3/24 area 0
+ network 3.3.3.3/32 area 0
+!
+```
+
+7 - Edit /etc/frr/ldpd.conf:
+```
+debug mpls ldp messages recv
+debug mpls ldp messages sent
+debug mpls ldp zebra
+!
+mpls ldp
+ router-id 3.3.3.3
+ dual-stack cisco-interop
+ neighbor 1.1.1.1 password opensourcerouting
+ neighbor 2.2.2.2 password opensourcerouting
+ neighbor 4.4.4.4 password opensourcerouting
+ !
+ address-family ipv4
+  discovery transport-address 3.3.3.3
+  label local advertise explicit-null
+  !
+  interface em3
+  !
+  interface em2
+  !
+ !
+ address-family ipv6
+  discovery transport-address 3:3:3::3
+  ttl-security disable
+  !
+  interface em3
+  !
+  interface em2
+  !
+ !
+!
+l2vpn ENG type vpls
+ bridge br0
+ member interface em1
+ !
+ member pseudowire mpw0
+  neighbor lsr-id 1.1.1.1
+  pw-id 100
+ !
+ member pseudowire mpw1
+  neighbor lsr-id 4.4.4.4
+  neighbor address 4:4:4::4
+  pw-id 100
+ !
+!
+```
+
+8 - Run zebra, ospfd and ldpd.
+
+#### Cisco routers
+CE1 (IOS):
+```
+interface FastEthernet0/0
+ ip address 172.16.1.1 255.255.255.0
+ !
+!
+```
+
+CE2 (IOS):
+```
+interface FastEthernet0/0
+ ip address 172.16.1.2 255.255.255.0
+ !
+!
+```
+
+CE3 (IOS):
+```
+interface FastEthernet0/0
+ ip address 172.16.1.3 255.255.255.0
+ !
+!
+```
+
+PE1 - IOS-XE (1):
+```
+mpls ldp neighbor 2.2.2.2 password opensourcerouting
+mpls ldp neighbor 3.3.3.3 password opensourcerouting
+mpls ldp neighbor 4.4.4.4 password opensourcerouting
+!
+l2vpn vfi context VFI
+ vpn id 1
+ member pseudowire2
+ member pseudowire1
+!
+bridge-domain 1
+ member GigabitEthernet1 service-instance 1
+ member vfi VFI
+!
+interface Loopback1
+ ip address 1.1.1.1 255.255.255.255
+!
+interface pseudowire1
+ encapsulation mpls
+ neighbor 3.3.3.3 100
+!
+interface pseudowire2
+ encapsulation mpls
+ neighbor 4.4.4.4 100
+!
+interface GigabitEthernet3
+ ip address 10.0.1.1 255.255.255.0
+ mpls ip
+!
+router ospf 1
+ network 0.0.0.0 255.255.255.255 area 0
+!
+```
+
+P - IOS-XR (2):
+```
+interface Loopback1
+ ipv4 address 2.2.2.2 255.255.255.255
+ ipv6 address 2:2:2::2/128
+!
+interface GigabitEthernet0/0/0/0
+ ipv4 address 10.0.1.2 255.255.255.0
+!
+interface GigabitEthernet0/0/0/1
+ ipv4 address 10.0.2.2 255.255.255.0
+ ipv6 address 2001:db8:2::2/64
+ ipv6 enable
+!
+interface GigabitEthernet0/0/0/2
+ ipv4 address 10.0.3.2 255.255.255.0
+ ipv6 address 2001:db8:3::2/64
+ ipv6 enable
+!
+router static
+ address-family ipv6 unicast
+  3:3:3::3/128 2001:db8:2::3
+  4:4:4::4/128 2001:db8:3::4
+ !
+!
+router ospf 1
+ router-id 2.2.2.2
+ address-family ipv4 unicast
+ area 0
+  interface Loopback1
+  !
+  interface GigabitEthernet0/0/0/0
+  !
+  interface GigabitEthernet0/0/0/1
+  !
+  interface GigabitEthernet0/0/0/2
+  !
+ !
+!
+mpls ldp
+ router-id 2.2.2.2
+ neighbor
+  1.1.1.1:0 password clear opensourcerouting
+  3.3.3.3:0 password clear opensourcerouting
+  4.4.4.4:0 password clear opensourcerouting
+ !
+ address-family ipv4
+ !
+ address-family ipv6
+  discovery transport-address 2:2:2::2
+ !
+ interface GigabitEthernet0/0/0/0
+  address-family ipv4
+  !
+ !
+ interface GigabitEthernet0/0/0/1
+  address-family ipv4
+  !
+  address-family ipv6
+  !
+ !
+ interface GigabitEthernet0/0/0/2
+  address-family ipv4
+  !
+  address-family ipv6
+  !
+ !
+!
+```
+
+## Verification - Control Plane
+
+Using the CLI on the Linux box, the goal is to ensure that everything
+is working as expected.
+
+First, verify that all the required adjacencies and neighborships sessions
+were established:
+
+```
+linux# show mpls ldp discovery
+Local LDP Identifier: 4.4.4.4:0
+Discovery Sources:
+  Interfaces:
+    eth1: xmit/recv
+      LDP Id: 3.3.3.3:0, Transport address: 3.3.3.3
+          Hold time: 15 sec
+      LDP Id: 3.3.3.3:0, Transport address: 3:3:3::3
+          Hold time: 15 sec
+    eth2: xmit/recv
+      LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
+          Hold time: 15 sec
+      LDP Id: 2.2.2.2:0, Transport address: 2:2:2::2
+          Hold time: 15 sec
+  Targeted Hellos:
+    4.4.4.4 -> 1.1.1.1: xmit/recv
+      LDP Id: 1.1.1.1:0, Transport address: 1.1.1.1
+          Hold time: 45 sec
+    4:4:4::4 -> 3:3:3::3: xmit/recv
+      LDP Id: 3.3.3.3:0, Transport address: 3:3:3::3
+          Hold time: 45 sec
+
+linux# show mpls ldp neighbor
+Peer LDP Identifier: 1.1.1.1:0
+  TCP connection: 4.4.4.4:40921 - 1.1.1.1:646
+  Session Holdtime: 180 sec
+  State: OPERATIONAL; Downstream-Unsolicited
+  Up time: 00:06:02
+  LDP Discovery Sources:
+    IPv4:
+      Targeted Hello: 1.1.1.1
+
+Peer LDP Identifier: 2.2.2.2:0
+  TCP connection: 4:4:4::4:52286 - 2:2:2::2:646
+  Session Holdtime: 180 sec
+  State: OPERATIONAL; Downstream-Unsolicited
+  Up time: 00:06:02
+  LDP Discovery Sources:
+    IPv4:
+      Interface: eth2
+    IPv6:
+      Interface: eth2
+
+Peer LDP Identifier: 3.3.3.3:0
+  TCP connection: 4:4:4::4:60575 - 3:3:3::3:646
+  Session Holdtime: 180 sec
+  State: OPERATIONAL; Downstream-Unsolicited
+  Up time: 00:05:57
+  LDP Discovery Sources:
+    IPv4:
+      Interface: eth1
+    IPv6:
+      Targeted Hello: 3:3:3::3
+      Interface: eth1
+```
+
+Note that the neighborships with the P and PE2 routers were established
+over IPv6, since this is the default behavior for dual-stack LSRs, as
+specified in RFC 7552. If desired, the **dual-stack transport-connection
+prefer ipv4** command can be used to establish these sessions over IPv4
+(the command should be applied an all routers).
+
+Now, verify that there's a remote label for each PE address:
+```
+linux# show mpls ldp binding
+1.1.1.1/32
+        Local binding: label: 20
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             imp-null
+            2.2.2.2             24000
+            3.3.3.3             20
+2.2.2.2/32
+        Local binding: label: 21
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             18
+            2.2.2.2             imp-null
+            3.3.3.3             21
+3.3.3.3/32
+        Local binding: label: 22
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             21
+            2.2.2.2             24003
+            3.3.3.3             imp-null
+4.4.4.4/32
+        Local binding: label: imp-null
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             22
+            2.2.2.2             24001
+            3.3.3.3             22
+10.0.1.0/24
+        Local binding: label: 23
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             imp-null
+            2.2.2.2             imp-null
+            3.3.3.3             23
+10.0.2.0/24
+        Local binding: label: 24
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             20
+            2.2.2.2             imp-null
+            3.3.3.3             imp-null
+10.0.3.0/24
+        Local binding: label: imp-null
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             19
+            2.2.2.2             imp-null
+            3.3.3.3             24
+10.0.4.0/24
+        Local binding: label: imp-null
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            1.1.1.1             23
+            2.2.2.2             24002
+            3.3.3.3             imp-null
+2:2:2::2/128
+        Local binding: label: 18
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            2.2.2.2             imp-null
+            3.3.3.3             18
+3:3:3::3/128
+        Local binding: label: 19
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            2.2.2.2             24007
+4:4:4::4/128
+        Local binding: label: imp-null
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            2.2.2.2             24006
+            3.3.3.3             19
+2001:db8:2::/64
+        Local binding: label: -
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            2.2.2.2             imp-null
+            3.3.3.3             imp-null
+2001:db8:3::/64
+        Local binding: label: imp-null
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            2.2.2.2             imp-null
+2001:db8:4::/64
+        Local binding: label: imp-null
+        Remote bindings:
+            Peer                Label
+            -----------------   ---------
+            3.3.3.3             imp-null
+```
+
+Check if the pseudowires are up:
+```
+linux# show l2vpn atom vc
+Interface Peer ID         VC ID      Name             Status
+--------- --------------- ---------- ---------------- ----------
+mpw1      3.3.3.3         100        ENG              UP
+mpw0      1.1.1.1         100        ENG              UP
+```
+
+Check the label bindings of the pseudowires:
+```
+linux# show l2vpn atom binding
+  Destination Address: 1.1.1.1, VC ID: 100
+    Local Label:  25
+        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
+        MTU: 1500
+    Remote Label:  16
+        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
+        MTU: 1500
+  Destination Address: 3.3.3.3, VC ID: 100
+    Local Label:  26
+        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
+        MTU: 1500
+    Remote Label:  26
+        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
+        MTU: 1500
+```
+
+## Verification - Data Plane
+
+Verify that all the exchanged label mappings were installed in zebra:
+```
+linux# show mpls table
+ Inbound                            Outbound
+   Label     Type          Nexthop     Label
+--------  -------  ---------------  --------
+      17      LDP    2001:db8:3::2         3
+      19      LDP    2001:db8:3::2     24005
+      20      LDP         10.0.3.2     24000
+      21      LDP         10.0.3.2         3
+      22      LDP         10.0.3.2     24001
+      23      LDP         10.0.3.2         3
+      24      LDP         10.0.3.2         3
+      25      LDP         10.0.3.2         3
+
+linux# show ip route ldp
+Codes: K - kernel route, C - connected, S - static, R - RIP,
+       O - OSPF, I - IS-IS, B - BGP, P - PIM, A - Babel, L - LDP,
+       > - selected route, * - FIB route
+
+L>* 1.1.1.1/32 [0/0] via 10.0.3.2, eth2 label 24000
+L>* 3.3.3.3/32 [0/0] via 10.0.3.2, eth2 label 24001
+```
+
+Verify that all the exchanged label mappings were installed in the kernel:
+```
+$ ip -M ro
+17 via inet6 2001:db8:3::2 dev eth2  proto zebra
+19 as to 24005 via inet6 2001:db8:3::2 dev eth2  proto zebra
+20 as to 24000 via inet 10.0.3.2 dev eth2  proto zebra
+21 via inet 10.0.3.2 dev eth2  proto zebra
+22 as to 24001 via inet 10.0.3.2 dev eth2  proto zebra
+23 via inet 10.0.3.2 dev eth2  proto zebra
+24 via inet 10.0.3.2 dev eth2  proto zebra
+25 via inet 10.0.3.2 dev eth2  proto zebra
+$
+$ ip route | grep mpls
+1.1.1.1  encap mpls  24000 via 10.0.3.2 dev eth2  proto zebra  metric 20
+3.3.3.3  encap mpls  24001 via 10.0.3.2 dev eth2  proto zebra  metric 20
+```
+
+Now ping PE1's loopback using lo1's address as a source address:
+```
+$ ping -c 5 -I 4.4.4.4 1.1.1.1
+PING 1.1.1.1 (1.1.1.1) from 4.4.4.4 : 56(84) bytes of data.
+64 bytes from 1.1.1.1: icmp_seq=1 ttl=253 time=3.02 ms
+64 bytes from 1.1.1.1: icmp_seq=2 ttl=253 time=3.13 ms
+64 bytes from 1.1.1.1: icmp_seq=3 ttl=253 time=3.19 ms
+64 bytes from 1.1.1.1: icmp_seq=4 ttl=253 time=3.07 ms
+64 bytes from 1.1.1.1: icmp_seq=5 ttl=253 time=3.27 ms
+
+--- 1.1.1.1 ping statistics ---
+5 packets transmitted, 5 received, 0% packet loss, time 4005ms
+rtt min/avg/max/mdev = 3.022/3.140/3.278/0.096 ms
+```
+
+Verify that the ICMP echo request packets are leaving with the MPLS
+label advertised by the P router. Also, verify that the ICMP echo reply
+packets are arriving with an explicit-null MPLS label:
+```
+# tcpdump -n -i eth2 mpls and icmp
+tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
+listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
+10:01:40.758771 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 1, length 64
+10:01:40.761777 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 1, length 64
+10:01:41.760343 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 2, length 64
+10:01:41.763448 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 2, length 64
+10:01:42.761758 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 3, length 64
+10:01:42.764924 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 3, length 64
+10:01:43.763193 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 4, length 64
+10:01:43.766237 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 4, length 64
+10:01:44.764552 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 5, length 64
+10:01:44.767803 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 5, length 64
+```
diff --git a/doc/developer/library.rst b/doc/developer/library.rst
new file mode 100644 (file)
index 0000000..791aedb
--- /dev/null
@@ -0,0 +1,12 @@
+libfrr library facilities
+=========================
+
+.. toctree::
+   :maxdepth: 2
+
+   memtypes
+   hooks
+   cli
+   modules
+
+
diff --git a/doc/developer/memtypes.rst b/doc/developer/memtypes.rst
new file mode 100644 (file)
index 0000000..d40ebe3
--- /dev/null
@@ -0,0 +1,117 @@
+.. highlight:: c
+
+Memtypes
+========
+
+FRR includes wrappers arround ``malloc()`` and ``free()`` that count the number
+of objects currently allocated, for each of a defined ``MTYPE``.
+
+To this extent, there are `memory groups` and `memory types`.  Each memory
+type must belong to a memory group, this is used just to provide some basic
+structure.
+
+Example:
+
+.. code-block:: c
+     :caption: mydaemon.h
+
+     DECLARE_MGROUP(MYDAEMON)
+     DECLARE_MTYPE(MYNEIGHBOR)
+
+.. code-block:: c
+     :caption: mydaemon.c
+
+     DEFINE_MGROUP(      MYDAEMON, "My daemon's memory")
+     DEFINE_MTYPE(       MYDAEMON, MYNEIGHBOR,     "Neighbor entry")
+     DEFINE_MTYPE_STATIC(MYDAEMON, MYNEIGHBORNAME, "Neighbor name")
+
+     struct neigh *neighbor_new(const char *name)
+     {
+        struct neigh *n = XMALLOC(MYNEIGHBOR, sizeof(*n));
+        n->name = XSTRDUP(MYNEIGHBORNAME, name);
+        return n;
+     }
+
+     void neighbor_free(struct neigh *n)
+     {
+        XFREE(MYNEIGHBORNAME, n->name);
+        XFREE(MYNEIGHBOR, n);
+     }
+
+
+Definition
+----------
+
+.. c:macro:: DECLARE_MGROUP(name)
+
+   This macro forward-declares a memory group and should be placed in a
+   ``.h`` file.  It expands to an ``extern struct memgroup`` statement.
+
+.. c:macro:: DEFINE_MGROUP(mname, description)
+
+   Defines/implements a memory group.  Must be placed into exactly one ``.c``
+   file (multiple inclusion will result in a link-time symbol conflict).
+
+   Contains additional logic (constructor and destructor) to register the
+   memory group in a global list.
+
+.. c:macro:: DECLARE_MTYPE(name)
+
+   Forward-declares a memory type and makes ``MTYPE_name`` available for use.
+   Note that the ``MTYPE_`` prefix must not be included in the name, it is
+   automatically prefixed.
+
+   ``MTYPE_name`` is created as a `static const` symbol, i.e. a compile-time
+   constant.  It refers to an ``extern struct memtype _mt_name``, where `name`
+   is replaced with the actual name.
+
+.. c:macro:: DEFINE_MTYPE(group, name, description)
+
+   Define/implement a memory type, must be placed into exactly one ``.c``
+   file (multiple inclusion will result in a link-time symbol conflict).
+
+   Like ``DEFINE_MGROUP``, this contains actual code to register the MTYPE
+   under its group.
+
+.. c:macro:: DEFINE_MTYPE_STATIC(group, name, description)
+
+   Same as ``DEFINE_MTYPE``, but the ``DEFINE_MTYPE_STATIC`` variant places
+   the C ``static`` keyword on the definition, restricting the MTYPE's
+   availability to the current source file.  This should be appropriate in
+   >80% of cases.
+
+   .. todo::
+
+      Daemons currently have ``daemon_memory.[ch]`` files listing all of
+      their MTYPEs.  This is not how it should be, most of these types
+      should be moved into the appropriate files where they are used.
+      Only a few MTYPEs should remain non-static after that.
+
+
+Usage
+-----
+
+.. c:function:: void *XMALLOC(struct memtype *mtype, size_t size)
+
+.. c:function:: void *XCALLOC(struct memtype *mtype, size_t size)
+
+.. c:function:: void *XSTRDUP(struct memtype *mtype, size_t size)
+
+   Allocation wrappers for malloc/calloc/realloc/strdup, taking an extra
+   mtype parameter.
+
+.. c:function:: void *XREALLOC(struct memtype *mtype, void *ptr, size_t size)
+
+   Wrapper around realloc() with MTYPE tracking.  Note that ``ptr`` may
+   be NULL, in which case the function does the same as XMALLOC (regardless
+   of whether the system realloc() supports this.)
+
+.. c:function:: void XFREE(struct memtype *mtype, void *ptr)
+
+   Wrapper around free(), again taking an extra mtype parameter.  This is
+   actually a macro, with the following additional properties:
+
+   - the macro contains ``ptr = NULL``
+   - if ptr is NULL, no operation is performed (as is guaranteed by system
+     implementations.)  Do not surround XFREE with ``if (ptr != NULL)``
+     checks.
diff --git a/doc/developer/modules.rst b/doc/developer/modules.rst
new file mode 100644 (file)
index 0000000..b832413
--- /dev/null
@@ -0,0 +1,123 @@
+Modules
+=======
+
+FRR has facilities to load DSOs at startup via ``dlopen()``. These are used to
+implement modules, such as SNMP and FPM.
+
+Limitations
+-----------
+
+-  can't load, unload, or reload during runtime. This just needs some
+   work and can probably be done in the future.
+-  doesn't fix any of the "things need to be changed in the code in the
+   library" issues. Most prominently, you can't add a CLI node because
+   CLI nodes are listed in the library...
+-  if your module crashes, the daemon crashes. Should be obvious.
+-  **does not provide a stable API or ABI**. Your module must match a
+   version of FRR and you may have to update it frequently to match
+   changes.
+-  **does not create a license boundary**. Your module will need to link
+   libzebra and include header files from the daemons, meaning it will
+   be GPL-encumbered.
+
+Installation
+------------
+
+Look for ``moduledir`` in ``configure.ac``, default is normally
+``/usr/lib64/frr/modules`` but depends on ``--libdir`` / ``--prefix``.
+
+The daemon's name is prepended when looking for a module, e.g. "snmp"
+tries to find "zebra\_snmp" first when used in zebra. This is just to
+make it nicer for the user, with the snmp module having the same name
+everywhere.
+
+Modules can be packaged separately from FRR. The SNMP and FPM modules
+are good candidates for this because they have dependencies (net-snmp /
+protobuf) that are not FRR dependencies. However, any distro packages
+should have an "exact-match" dependency onto the FRR package. Using a
+module from a different FRR version will probably blow up nicely.
+
+For snapcraft (and during development), modules can be loaded with full
+path (e.g. -M ``$SNAP/lib/frr/modules/zebra_snmp.so``). Note that
+libtool puts output files in the .libs directory, so during development
+you have to use ``./zebra -M .libs/zebra_snmp.so``.
+
+Creating a module
+-----------------
+
+... best to look at the existing SNMP or FPM modules.
+
+Basic boilerplate:
+
+::
+
+    #include "hook.h"
+    #include "module.h"
+
+    static int
+    module_init (void)
+    {
+      hook_register(frr_late_init, module_late_init);
+      return 0;
+    }
+
+    FRR_MODULE_SETUP(
+        .name = "my module",
+        .version = "0.0",
+        .description = "my module",
+        .init = module_init,
+    )
+
+The ``frr_late_init`` hook will be called after the daemon has finished
+its other startup and is about to enter the main event loop; this is the
+best place for most initialisation.
+
+Compiler & Linker magic
+-----------------------
+
+There's a ``THIS_MODULE`` (like in the Linux kernel), which uses
+``visibility`` attributes to restrict it to the current module. If you
+get a linker error with ``_frrmod_this_module``, there is some linker
+SNAFU. This shouldn't be possible, though one way to get it would be to
+not include libzebra (which provides a fallback definition for the
+symbol).
+
+libzebra and the daemons each have their own ``THIS_MODULE``, as do all
+loadable modules. In any other libraries (e.g. ``libfrrsnmp``),
+``THIS_MODULE`` will use the definition in libzebra; same applies if the
+main executable doesn't use ``FRR_DAEMON_INFO`` (e.g. all testcases).
+
+The deciding factor here is "what dynamic linker unit are you using the
+symbol from." If you're in a library function and want to know who
+called you, you can't use ``THIS_MODULE`` (because that'll just tell you
+you're in the library). Put a macro around your function that adds
+``THIS_MODULE`` in the *caller's code calling your function*.
+
+The idea is to use this in the future for module unloading. Hooks
+already remember which module they were installed by, as groundwork for
+a function that removes all of a module's installed hooks.
+
+There's also the ``frr_module`` symbol in modules, pretty much a
+standard entry point for loadable modules.
+
+Hooks
+-----
+
+Hooks are just points in the code where you can register your callback
+to be called. The parameter list is specific to the hook point. Since
+there is no stable API, the hook code has some extra type safety checks
+making sure you get a compiler warning when the hook parameter list
+doesn't match your callback. Don't ignore these warnings.
+
+Relation to MTYPE macros
+------------------------
+
+The MTYPE macros, while primarily designed to decouple MTYPEs from the
+library and beautify the code, also work very nicely with loadable
+modules -- both constructors and destructors are executed when
+loading/unloading modules.
+
+This means there is absolutely no change required to MTYPEs, you can
+just use them in a module and they will even clean up themselves when we
+implement module unloading and an unload happens. In fact, it's
+impossible to create a bug where unloading fails to de-register a MTYPE.
diff --git a/doc/developer/next-hop-tracking.rst b/doc/developer/next-hop-tracking.rst
new file mode 100644 (file)
index 0000000..284db1e
--- /dev/null
@@ -0,0 +1,352 @@
+Next Hop Tracking
+==================
+
+Next hop tracking is an optimization feature that reduces the processing time
+involved in the BGP bestpath algorithm by monitoring changes to the routing
+table.
+
+Background
+-----------
+
+Recursive routes are of the form:
+
+::
+
+    p/m --> n
+    [Ex: 1.1.0.0/16 --> 2.2.2.2]
+
+where 'n' itself is resolved through another route as follows:
+
+::
+
+    p2/m --> h, interface
+    [Ex: 2.2.2.0/24 --> 3.3.3.3, eth0]
+
+Usually, BGP routes are recursive in nature and BGP nexthops get resolved
+through an IGP route. IGP usually adds its routes pointing to an interface
+(these are called non-recursive routes).
+
+When BGP receives a recursive route from a peer, it needs to validate the
+nexthop. The path is marked valid or invalid based on the reachability status
+of the nexthop. Nexthop validation is also important for BGP decision process
+as the metric to reach the nexthop is a parameter to best path selection
+process.
+
+As it goes with routing, this is a dynamic process. Route to the nexthop can
+change. The nexthop can become unreachable or reachable. In the current BGP
+implementation, the nexthop validation is done periodically in the scanner run.
+The default scanner run interval is one minute. Every minute, the scanner task
+walks the entire BGP table. It checks the validity of each nexthop with Zebra
+(the routing table manager) through a request and response message exchange
+between BGP and Zebra process. BGP process is blocked for that duration. The
+mechanism has two major drawbacks:
+
+- The scanner task runs to completion. That can potentially starve the other
+  tasks for long periods of time, based on the BGP table size and number of
+  nexthops.
+
+- Convergence around routing changes that affect the nexthops can be long
+  (around a minute with the default intervals). The interval can be shortened
+  to achieve faster reaction time, but it makes the first problem worse, with
+  the scanner task consuming most of the CPU resources.
+
+The next-hop tracking feature makes this process event-driven. It eliminates
+periodic nexthop validation and introduces an asynchronous communication path
+between BGP and Zebra for route change notifications that can then be acted
+upon.
+
+Goal
+----
+
+Stating the obvious, the main goal is to remove the two limitations we
+discussed in the previous section. The goals, in a constructive tone,
+are the following:
+
+- **Fairness**: the scanner run should not consume an unjustly high amount of
+  CPU time. This should give an overall good performance and response time to
+  other events (route changes, session events, IO/user interface).
+
+- **Convergence**: BGP must react to nexthop changes instantly and provide
+  sub-second convergence. This may involve diverting the routes from one
+  nexthop to another.
+
+Overview of changes
+------------------------
+
+The changes are in both BGP and Zebra modules.  The short summary is
+the following:
+
+- Zebra implements a registration mechanism by which clients can
+  register for next hop notification. Consequently, it maintains a
+  separate table, per (VRF, AF) pair, of next hops and interested
+  client-list per next hop.
+
+- When the main routing table changes in Zebra, it evaluates the next
+  hop table: for each next hop, it checks if the route table
+  modifications have changed its state. If so, it notifies the
+  interested clients.
+
+- BGP is one such client. It registers the next hops corresponding to
+  all of its received routes/paths. It also threads the paths against
+  each nexthop structure.
+
+- When BGP receives a next hop notification from Zebra, it walks the
+  corresponding path list. It makes them valid or invalid depending
+  on the next hop notification. It then re-computes best path for the
+  corresponding destination. This may result in re-announcing those
+  destinations to peers.
+
+Design
+------
+
+Modules
+~~~~~~~
+
+The core design introduces an "nht" (next hop tracking) module in BGP
+and "rnh" (recursive nexthop) module in Zebra. The "nht" module
+provides the following APIs:
+
++----------------------------+--------------------------------------------------+
+| Function                   | Action                                           |
++============================+==================================================+
+| bgp_find_or_add_nexthop()  | find or add a nexthop in BGP nexthop table       |
++----------------------------+--------------------------------------------------+
+| bgp_find_nexthop()         | find a nexthop in BGP nexthop table              |
++----------------------------+--------------------------------------------------+
+| bgp_parse_nexthop_update() | parse a nexthop update message coming from zebra |
++----------------------------+--------------------------------------------------+
+
+The "rnh" module provides the following APIs:
+
++----------------------------+----------------------------------------------------------------------------------------------------------+
+| Function                   | Action                                                                                                   |
++============================+==========================================================================================================+
+| zebra_add_rnh()            | add a recursive nexthop                                                                                  |
++----------------------------+----------------------------------------------------------------------------------------------------------+
+| zebra_delete_rnh()         | delete a recursive nexthop                                                                               |
++----------------------------+----------------------------------------------------------------------------------------------------------+
+| zebra_lookup_rnh()         | lookup a recursive nexthop                                                                               |
++----------------------------+----------------------------------------------------------------------------------------------------------+
+| zebra_add_rnh_client()     | register a client for nexthop notifications against a recursive nexthop                                  |
++----------------------------+----------------------------------------------------------------------------------------------------------+
+| zebra_remove_rnh_client()  | remove the client registration for a recursive nexthop                                                   |
++----------------------------+----------------------------------------------------------------------------------------------------------+
+| zebra_evaluate_rnh_table() | (re)evaluate the recursive nexthop table (most probably because the main routing table has changed).     |
++----------------------------+----------------------------------------------------------------------------------------------------------+
+| zebra_cleanup_rnh_client() | Cleanup a client from the "rnh" module data structures (most probably because the client is going away). |
++----------------------------+----------------------------------------------------------------------------------------------------------+
+
+4.2. Control flow
+
+The next hop registration control flow is the following:
+
+::
+
+    <====      BGP Process       ====>|<====      Zebra Process      ====>
+                                      |
+    receive module     nht module     |  zserv module        rnh module
+    ----------------------------------------------------------------------
+                  |                   |                  |
+    bgp_update_   |                   |                  |
+          main()  | bgp_find_or_add_  |                  |
+                  |        nexthop()  |                  |
+                  |                   |                  |
+                  |                   | zserv_nexthop_   |
+                  |                   |       register() |
+                  |                   |                  | zebra_add_rnh()
+                  |                   |                  |
+
+
+The next hop notification control flow is the following:
+
+::
+
+    <====     Zebra Process    ====>|<====      BGP Process       ====>
+                                    |
+    rib module         rnh module   |     zebra module        nht module
+    ----------------------------------------------------------------------
+                  |                 |                   |
+    meta_queue_   |                 |                   |
+        process() | zebra_evaluate_ |                   |
+                  |     rnh_table() |                   |
+                  |                 |                   |
+                  |                 | bgp_read_nexthop_ |
+                  |                 |          update() |
+                  |                 |                   | bgp_parse_
+                  |                 |                   | nexthop_update()
+                  |                 |                   |
+
+
+zclient message format
+~~~~~~~~~~~~~~~~~~~~~~
+
+ZEBRA_NEXTHOP_REGISTER and ZEBRA_NEXTHOP_UNREGISTER messages are
+encoded in the following way:
+
+::
+
+    .   0                   1                   2                   3
+     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |     AF                        |  prefix len   |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    .      Nexthop prefix                                           .
+    .                                                               .
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    .                                                               .
+    .                                                               .
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |     AF                        |  prefix len   |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    .      Nexthop prefix                                           .
+    .                                                               .
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+
+``ZEBRA_NEXTHOP_UPDATE`` message is encoded as follows:
+
+::
+
+    .   0                   1                   2                   3
+     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |     AF                        |  prefix len   |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    .      Nexthop prefix getting resolved                          .
+    .                                                               .
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        metric                                                 |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |  #nexthops    |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    | nexthop type  |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    .      resolving Nexthop details                                .
+    .                                                               .
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    .                                                               .
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    | nexthop type  |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    .      resolving Nexthop details                                .
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+
+BGP data structure
+~~~~~~~~~~~~~~~~~~
+Legend:
+
+::
+
+    /\   struct bgp_node: a BGP destination/route/prefix
+    \/
+
+    [ ]  struct bgp_info: a BGP path (e.g. route received from a peer)
+
+     _
+    (_)  struct bgp_nexthop_cache: a BGP nexthop
+
+    /\         NULL
+    \/--+        ^
+        |        :
+        +--[ ]--[ ]--[ ]--> NULL
+    /\           :
+    \/--+        :
+        |        :
+        +--[ ]--[ ]--> NULL
+                 :
+     _           :
+    (_)...........
+
+
+Zebra data structure
+~~~~~~~~~~~~~~~~~~~~
+
+RNH table::
+
+           O
+          / \
+         O   O
+            / \
+           O   O
+
+        struct rnh
+        {
+          u_char flags;
+          struct route_entry *state;
+          struct list *client_list;
+          struct route_node *node;
+        };
+
+User interface changes
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+    frr# show ip nht
+    3.3.3.3
+     resolved via kernel
+     via 11.0.0.6, swp1
+     Client list: bgp(fd 12)
+    11.0.0.10
+     resolved via connected
+     is directly connected, swp2
+     Client list: bgp(fd 12)
+    11.0.0.18
+     resolved via connected
+     is directly connected, swp4
+     Client list: bgp(fd 12)
+    11.11.11.11
+     resolved via kernel
+     via 10.0.1.2, eth0
+     Client list: bgp(fd 12)
+
+    frr# show ip bgp nexthop
+    Current BGP nexthop cache:
+     3.3.3.3 valid [IGP metric 0], #paths 3
+      Last update: Wed Oct 16 04:43:49 2013
+
+     11.0.0.10 valid [IGP metric 1], #paths 1
+      Last update: Wed Oct 16 04:43:51 2013
+
+     11.0.0.18 valid [IGP metric 1], #paths 2
+      Last update: Wed Oct 16 04:43:47 2013
+
+     11.11.11.11 valid [IGP metric 0], #paths 1
+      Last update: Wed Oct 16 04:43:47 2013
+
+    frr# show ipv6 nht
+    frr# show ip bgp nexthop detail
+
+    frr# debug bgp nht
+    frr# debug zebra nht
+
+    6. Sample test cases
+
+         r2----r3
+        /  \  /
+      r1----r4
+
+    - Verify that a change in IGP cost triggers NHT
+      + shutdown the r1-r4 and r2-r4 links
+      + no shut the r1-r4 and r2-r4 links and wait for OSPF to come back
+        up
+      + We should be back to the original nexthop via r4 now
+    - Verify that a NH becoming unreachable triggers NHT
+      + Shutdown all links to r4
+    - Verify that a NH becoming reachable triggers NHT
+      + no shut all links to r4
+
+Future work
+~~~~~~~~~~~
+
+- route-policy for next hop validation (e.g. ignore default route)
+- damping for rapid next hop changes
+- prioritized handling of nexthop changes ((un)reachability vs. metric
+  changes)
+- handling recursion loop, e.g::
+
+   11.11.11.11/32 -> 12.12.12.12
+   12.12.12.12/32 -> 11.11.11.11
+   11.0.0.0/8 -> <interface>
+- better statistics
diff --git a/doc/developer/ospf-api.rst b/doc/developer/ospf-api.rst
new file mode 100644 (file)
index 0000000..5f0b830
--- /dev/null
@@ -0,0 +1,388 @@
+OSPF API Documentation
+======================
+
+Disclaimer
+----------
+
+The OSPF daemon contains an API for application access to the LSA
+database. This API was created by Ralph Keller, originally as patch for
+Zebra. Unfortunately, the page containing documentation of the API is no
+longer online. This page is an attempt to recreate documentation for the
+API (with lots of help of the WayBackMachine)
+
+Introduction
+------------
+
+This page describes an API that allows external applications to access
+the link-state database (LSDB) of the OSPF daemon. The implementation is
+based on the OSPF code from FRRouting (forked from Quagga and formerly
+Zebra) routing protocol suite and is subject to the GNU General Public
+License. The OSPF API provides you with the following functionality:
+
+-  Retrieval of the full or partial link-state database of the OSPF
+   daemon. This allows applications to obtain an exact copy of the LSDB
+   including router LSAs, network LSAs and so on. Whenever a new LSA
+   arrives at the OSPF daemon, the API module immediately informs the
+   application by sending a message. This way, the application is always
+   synchronized with the LSDB of the OSPF daemon.
+-  Origination of own opaque LSAs (of type 9, 10, or 11) which are then
+   distributed transparently to other routers within the flooding scope
+   and received by other applications through the OSPF API.
+
+Opaque LSAs, which are described in RFC 2370 , allow you to distribute
+application-specific information within a network using the OSPF
+protocol. The information contained in opaque LSAs is transparent for
+the routing process but it can be processed by other modules such as
+traffic engineering (e.g., MPLS-TE).
+
+Architecture
+------------
+
+The following picture depicts the architecture of the Quagga/Zebra
+protocol suite. The OSPF daemon is extended with opaque LSA capabilities
+and an API for external applications. The OSPF core module executes the
+OSPF protocol by discovering neighbors and exchanging neighbor state.
+The opaque module, implemented by Masahiko Endo, provides functions to
+exchange opaque LSAs between routers. Opaque LSAs can be generated by
+several modules such as the MPLS-TE module or the API server module.
+These modules then invoke the opaque module to flood their data to
+neighbors within the flooding scope.
+
+The client, which is an application potentially running on a different
+node than the OSPF daemon, links against the OSPF API client library.
+This client library establishes a socket connection with the API server
+module of the OSPF daemon and uses this connection to retrieve LSAs and
+originate opaque LSAs.
+
+.. figure:: ../figures/ospf_api_architecture.png
+   :alt: image
+
+   image
+
+The OSPF API server module works like any other internal opaque module
+(such as the MPLS-TE module), but listens to connections from external
+applications that want to communicate with the OSPF daemon. The API
+server module can handle multiple clients concurrently.
+
+One of the main objectives of the implementation is to make as little
+changes to the existing Zebra code as possible.
+
+Installation & Configuration
+----------------------------
+
+Download FRRouting and unpack
+
+Configure your frr version (note that --enable-opaque-lsa also enables
+the ospfapi server and ospfclient).
+
+::
+
+    % update-autotools
+    % sh ./configure --enable-opaque-lsa
+    % make
+
+This should also compile the client library and sample application in
+ospfclient.
+
+Make sure that you have enabled opaque LSAs in your configuration. Add
+the ospf opaque-lsa statement to your ospfd.conf:
+
+::
+
+    ! -*- ospf -*-
+    !
+    ! OSPFd sample configuration file
+    !
+    !
+    hostname xxxxx
+    password xxxxx
+
+    router ospf
+      router-id 10.0.0.1
+      network 10.0.0.1/24 area 1
+      neighbor 10.0.0.2
+      network 10.0.1.2/24 area 1
+      neighbor 10.0.1.1
+      ospf opaque-lsa      <============ add this statement!
+
+Usage
+-----
+
+In the following we describe how you can use the sample application to
+originate opaque LSAs. The sample application first registers with the
+OSPF daemon the opaque type it wants to inject and then waits until the
+OSPF daemon is ready to accept opaque LSAs of that type. Then the client
+application originates an opaque LSA, waits 10 seconds and then updates
+the opaque LSA with new opaque data. After another 20 seconds, the
+client application deletes the opaque LSA from the LSDB. If the clients
+terminates unexpectedly, the OSPF API module will remove all the opaque
+LSAs that the application registered. Since the opaque LSAs are flooded
+to other routers, we will see the opaque LSAs in all routers according
+to the flooding scope of the opaque LSA.
+
+We have a very simple demo setup, just two routers connected with an ATM
+point-to-point link. Start the modified OSPF daemons on two adjacent
+routers. First run on msr2:
+
+::
+
+        > msr2:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf
+
+And on the neighboring router msr3:
+
+::
+
+        > msr3:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf
+
+Now the two routers form adjacency and start exchanging their databases.
+Looking at the OSPF daemon of msr2 (or msr3), you see this:
+
+::
+
+        ospfd> show ip ospf database
+
+               OSPF Router with ID (10.0.0.1)
+
+                        Router Link States (Area 0.0.0.1)
+
+        Link ID         ADV Router      Age  Seq#       CkSum  Link count
+        10.0.0.1        10.0.0.1          55 0x80000003 0xc62f 2
+        10.0.0.2        10.0.0.2          55 0x80000003 0xe3e4 3
+
+                        Net Link States (Area 0.0.0.1)
+
+        Link ID         ADV Router      Age  Seq#       CkSum
+        10.0.0.2        10.0.0.2          60 0x80000001 0x5fcb
+
+Now we start the sample main application that originates an opaque LSA.
+
+::
+
+        > cd ospfapi/apiclient
+        > ./main msr2 10 250 20 0.0.0.0 0.0.0.1
+
+This originates an opaque LSA of type 10 (area local), with opaque type
+250 (experimental), opaque id of 20 (chosen arbitrarily), interface
+address 0.0.0.0 (which is used only for opaque LSAs type 9), and area
+0.0.0.1
+
+Again looking at the OSPF database you see:
+
+::
+
+        ospfd> show ip ospf database
+
+               OSPF Router with ID (10.0.0.1)
+
+                        Router Link States (Area 0.0.0.1)
+
+        Link ID         ADV Router      Age  Seq#       CkSum  Link count
+        10.0.0.1        10.0.0.1         437 0x80000003 0xc62f 2
+        10.0.0.2        10.0.0.2         437 0x80000003 0xe3e4 3
+
+                        Net Link States (Area 0.0.0.1)
+
+        Link ID         ADV Router      Age  Seq#       CkSum
+        10.0.0.2        10.0.0.2         442 0x80000001 0x5fcb
+
+                        Area-Local Opaque-LSA (Area 0.0.0.1)
+
+        Opaque-Type/Id  ADV Router      Age  Seq#       CkSum
+        250.0.0.20      10.0.0.1           0 0x80000001 0x58a6  <=== opaque LSA
+
+You can take a closer look at this opaque LSA:
+
+::
+
+           ospfd> show ip ospf database opaque-area
+
+           OSPF Router with ID (10.0.0.1)
+
+
+           Area-Local Opaque-LSA (Area 0.0.0.1)
+
+           LS age: 4
+           Options: 66
+           LS Type: Area-Local Opaque-LSA
+           Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID)
+           Advertising Router: 10.0.0.1
+           LS Seq Number: 80000001
+           Checksum: 0x58a6
+           Length: 24
+           Opaque-Type 250 (Private/Experimental)
+           Opaque-ID 0x14
+           Opaque-Info: 4 octets of data
+           Added using OSPF API: 4 octets of opaque data
+           Opaque data: 1 0 0 0 <==== counter is 1
+
+Note that the main application updates the opaque LSA after 10 seconds,
+then it looks as follows:
+
+::
+
+        ospfd> show ip ospf database opaque-area
+
+               OSPF Router with ID (10.0.0.1)
+
+
+                        Area-Local Opaque-LSA (Area 0.0.0.1)
+
+          LS age: 1
+          Options: 66
+          LS Type: Area-Local Opaque-LSA
+          Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID)
+          Advertising Router: 10.0.0.1
+          LS Seq Number: 80000002
+          Checksum: 0x59a3
+          Length: 24
+          Opaque-Type 250 (Private/Experimental)
+          Opaque-ID   0x14
+          Opaque-Info: 4 octets of data
+          Added using OSPF API: 4 octets of opaque data
+          Opaque data: 2 0 0 0  <==== counter is now 2
+
+Note that the payload of the opaque LSA has changed as you can see
+above.
+
+Then, again after another 20 seconds, the opaque LSA is flushed from the
+LSDB.
+
+Important note:
+^^^^^^^^^^^^^^^
+
+In order to originate an opaque LSA, there must be at least one active
+opaque-capable neighbor. Thus, you cannot originate opaque LSAs of no
+neighbors are present. If you try to originate even so no neighbor is
+ready, you will receive a not ready error message. The reason for this
+restriction is that it might be possible that some routers have an
+identical opaque LSA from a previous origination in their LSDB that
+unfortunately could not be flushed due to a crash, and now if the router
+comes up again and starts originating a new opaque LSA, the new opaque
+LSA is considered older since it has a lower sequence number and is
+ignored by other routers (that consider the stalled opaque LSA as more
+recent). However, if the originating router first synchronizes the
+database before originating opaque LSAs, it will detect the older opaque
+LSA and can flush it first.
+
+Protocol and Message Formats
+----------------------------
+
+If you are developing your own client application and you don't want to
+make use of the client library (due to the GNU license restriction or
+whatever reason), you can implement your own client-side message
+handling. The OSPF API uses two connections between the client and the
+OSPF API server: One connection is used for a synchronous request /reply
+protocol and another connection is used for asynchronous notifications
+(e.g., LSA update, neighbor status change).
+
+Each message begins with the following header:
+
+.. figure:: ../figures/ospf_api_msghdr.png
+   :alt: image
+
+   image
+
+The message type field can take one of the following values:
+
++-------------------------------+---------+
+| Messages to OSPF deamon       | Value   |
++===============================+=========+
+| MSG\_REGISTER\_OPAQUETYPE     | 1       |
++-------------------------------+---------+
+| MSG\_UNREGISTER\_OPAQUETYPE   | 2       |
++-------------------------------+---------+
+| MSG\_REGISTER\_EVENT          | 3       |
++-------------------------------+---------+
+| MSG\_SYNC\_LSDB               | 4       |
++-------------------------------+---------+
+| MSG\_ORIGINATE\_REQUEST       | 5       |
++-------------------------------+---------+
+| MSG\_DELETE\_REQUEST          | 6       |
++-------------------------------+---------+
+
++-----------------------------+---------+
+| Messages from OSPF deamon   | Value   |
++=============================+=========+
+| MSG\_REPLY                  | 10      |
++-----------------------------+---------+
+| MSG\_READY\_NOTIFY          | 11      |
++-----------------------------+---------+
+| MSG\_LSA\_UPDATE\_NOTIFY    | 12      |
++-----------------------------+---------+
+| MSG\_LSA\_DELETE\_NOTIFY    | 13      |
++-----------------------------+---------+
+| MSG\_NEW\_IF                | 14      |
++-----------------------------+---------+
+| MSG\_DEL\_IF                | 15      |
++-----------------------------+---------+
+| MSG\_ISM\_CHANGE            | 16      |
++-----------------------------+---------+
+| MSG\_NSM\_CHANGE            | 17      |
++-----------------------------+---------+
+
+The synchronous requests and replies have the following message formats:
+
+.. figure:: ../figures/ospf_api_msgs1.png
+   :alt: image
+
+   image
+
+The origin field allows to select according to the following types of
+origins:
+
++-------------------------+---------+
+| Origin                  | Value   |
++=========================+=========+
+| NON\_SELF\_ORIGINATED   | 0       |
++-------------------------+---------+
+| SELF\_ORIGINATED        | 1       |
++-------------------------+---------+
+| ANY\_ORIGIN             | 2       |
++-------------------------+---------+
+
+The reply message has on of the following error codes:
+
++--------------------------+---------+
+| Error code               | Value   |
++==========================+=========+
+| API\_OK                  | 0       |
++--------------------------+---------+
+| API\_NOSUCHINTERFACE     | -1      |
++--------------------------+---------+
+| API\_NOSUCHAREA          | -2      |
++--------------------------+---------+
+| API\_NOSUCHLSA           | -3      |
++--------------------------+---------+
+| API\_ILLEGALSATYPE       | -4      |
++--------------------------+---------+
+| API\_ILLEGALOPAQUETYPE   | -5      |
++--------------------------+---------+
+| API\_OPAQUETYPEINUSE     | -6      |
++--------------------------+---------+
+| API\_NOMEMORY            | -7      |
++--------------------------+---------+
+| API\_ERROR               | -99     |
++--------------------------+---------+
+| API\_UNDEF               | -100    |
++--------------------------+---------+
+
+The asynchronous notifications have the following message formats:
+
+.. figure:: ../figures/ospf_api_msgs2.png
+   :alt: image
+
+   image
+
+Original Acknowledgments from Ralph Keller
+------------------------------------------
+
+I would like to thank Masahiko Endo, the author of the opaque LSA
+extension module, for his great support. His wonderful ASCII graphs
+explaining the internal workings of this code, and his invaluable input
+proved to be crucial in designing a useful API for accessing the link
+state database of the OSPF daemon. Once, he even decided to take the
+plane from Tokyo to Zurich so that we could actually meet and have
+face-to-face discussions, which was a lot of fun. Clearly, without
+Masahiko no API would ever be completed. I also would like to thank
+Daniel Bauer who wrote an opaque LSA implementation too and was willing
+to test the OSPF API code in one of his projects.
diff --git a/doc/developer/ospf-sr.rst b/doc/developer/ospf-sr.rst
new file mode 100644 (file)
index 0000000..3f8b549
--- /dev/null
@@ -0,0 +1,285 @@
+OSPF Segment Routing
+====================
+
+This is an EXPERIMENTAL support of draft
+`draft-ietf-ospf-segment-routing-extensions-24`.
+DON'T use it for production network.
+
+Supported Features
+------------------
+
+* Automatic computation of Primary and Backup Adjacency SID with
+  Cisco experimental remote IP address
+* SRGB configuration
+* Prefix configuration for Node SID with optional NO-PHP flag (Linux
+  kernel support both mode)
+* Node MSD configuration (with Linux Kernel >= 4.10 a maximum of 32 labels
+  could be stack)
+* Automatic provisioning of MPLS table
+* Static route configuration with label stack up to 32 labels
+
+Interoperability
+----------------
+
+* Tested on various topology including point-to-point and LAN interfaces
+  in a mix of Free Range Routing instance and Cisco IOS-XR 6.0.x
+* Check OSPF LSA conformity with latest wireshark release 2.5.0-rc
+
+Implementation details
+----------------------
+
+Concepts
+~~~~~~~~
+
+Segment Routing used 3 differents OPAQUE LSA in OSPF to carry the various
+information:
+
+* **Router Information:** flood the Segment Routing capabilities of the node.
+  This include the supported algorithms, the Segment Routing Global Block
+  (SRGB) and the Maximum Stack Depth (MSD).
+* **Extended Link:** flood the Adjaceny and Lan Adjacency Segment Identifier
+* **Extended Prefix:** flood the Prefix Segment Identifier
+
+The implementation follow previous TE and Router Information codes. It used the
+OPAQUE LSA functions defined in ospf_opaque.[c,h] as well as the OSPF API. This
+latter is mandatory for the implementation as it provides the Callback to
+Segment Routing functions (see below) when an Extended Link / Prefix or Router
+Information LSA s are received.
+
+Overview
+~~~~~~~~
+
+Following files where modified or added:
+
+* ospd_ri.[c,h] have been modified to add the new TLVs for Segment Routing.
+* ospf_ext.[c,h] implement RFC7684 as base support of Extended Link and Prefix
+  Opaque LSA.
+* ospf_sr.[c,h] implement the earth of Segment Routing. It adds a new Segment
+  Routing database to manage Segment Identifiers per Link and Prefix and
+  Segment Routing enable node, Callback functions to process incoming LSA and
+  install MPLS FIB entry through Zebra.
+
+The figure below shows the relation between the various files:
+
+* ospf_sr.c centralized all the Segment Routing processing. It receives Opaque
+  LSA Router Information (4.0.0.0) from ospf_ri.c and Extended Prefix
+  (7.0.0.X) Link (8.0.0.X) from ospf_ext.c. Once received, it parse TLVs and
+  SubTLVs and store information in SRDB (which is defined in ospf_sr.h). For
+  each received LSA, NHLFE is computed and send to Zebra to add/remove new
+  MPLS labels entries and FEC. New CLI configurations are also centralized in
+  ospf_sr.c. This CLI will trigger the flooding of new LSA Router Information
+  (4.0.0.0), Extended Prefix (7.0.0.X) and Link (8.0.0.X) by ospf_ri.c,
+  respectively ospf_ext.c.
+* ospf_ri.c send back to ospf_sr.c received Router Information LSA and update
+  Self Router Information LSA with paramters provided by ospf_sr.c i.e. SRGB
+  and MSD. It use ospf_opaque.c functions to send/received these Opaque LSAs.
+* ospf_ext.c send back to ospf_sr.c received Extended Prefix and Link Opaque
+  LSA and send self Extended Prefix and Link Opaque LSA through ospf_opaque.c
+  functions.
+
+::
+
+                    +-----------+     +-------+
+                    |           |     |       |
+                    | ospf_sr.c +-----+  SRDB |
+        +-----------+           +--+  |       |
+        |           +-^-------^-+  |  +-------+
+        |             |   |   |    |
+        |             |   |   |    |
+        |             |   |   |    +--------+
+        |             |   |   |             |
+    +---v----------+  |   |   |       +-----v-------+
+    |              |  |   |   |       |             |
+    | ospf_ri.c    +--+   |   +-------+ ospf_ext.c  |
+    | LSA 4.0.0.0  |      |           | LSA 7.0.0.X |
+    |              |      |           | LSA 8.0.0.X |
+    +---^----------+      |           |             |
+        |                 |           +-----^-------+
+        |                 |                 |
+        |                 |                 |
+        |        +--------v------------+    |
+        |        |                     |    |
+        |        | ZEBRA: Labels + FEC |    |
+        |        |                     |    |
+        |        +---------------------+    |
+        |                                   |
+        |                                   |
+        |         +---------------+         |
+        |         |               |         |
+        +---------> ospf_opaque.c <---------+
+                  |               |
+                  +---------------+
+
+      Figure 1: Overview of Segment Routing interaction
+
+Module interactions
+~~~~~~~~~~~~~~~~~~~
+
+To process incoming LSA, the code is based on the capability to call `hook()`
+functions when LSA are inserted or delete to / from the LSDB and the
+possibility to register particular treatment for Opaque LSA. The first point
+is provided by the OSPF API feature and the second by the Opaque implementation
+itself. Indeed, it is possible to register callback function for a given Opaque
+LSA ID (see `ospf_register_opaque_functab()` function defined in
+`ospf_opaque.c`). Each time a new LSA is added to the LSDB, the
+`new_lsa_hook()` function previously register for this LSA type is called. For
+Opaque LSA it is the `ospf_opaque_lsa_install_hook()`.  For deletion, it is
+`ospf_opaque_lsa_delete_hook()`.
+
+Note that incoming LSA which is already present in the LSDB will be inserted
+after the old instance of this LSA remove from the LSDB. Thus, after the first
+time, each incoming LSA will trigger a `delete` following by an `install`. This
+is not very helpfull to handle real LSA deletion. In fact, LSA deletion is done
+by Flushing LSA i.e. flood LSA after seting its age to MAX_AGE. Then, a garbage
+function has the role to remove all LSA with `age == MAX_AGE` in the LSDB. So,
+to handle LSA Flush, the best is to look to the LSA age to determine if it is
+an installation or a future deletion i.e. the flushed LSA is first store in the
+LSDB with MAX_AGE waiting for the garbage collector function.
+
+Router Information LSAs
+^^^^^^^^^^^^^^^^^^^^^^^
+
+To activate Segment Routing, new CLI command `segment-routing on` has been
+introduced. When this command is activated, function
+`ospf_router_info_update_sr()` is called to indicate to Router Information
+process that Segment Routing TLVs must be flood. Same function is called to
+modify the Segment Routing Global Block (SRGB) and Maximum Stack Depth (MSD)
+TLV. Only Shortest Path First (SPF) Algorithm is supported, so no possiblity
+to modify this TLV is offer by the code.
+
+When Opaque LSA Tyep 4 i.e. Router Information are stored in LSDB, function
+`ospf_opaque_lsa_install_hook()` will call the previously registered function
+`ospf_router_info_lsa_update()`. In turn, the function will simply trigger
+`ospf_sr_ri_lsa_update()` or `ospf_sr_ri_lsa_delete` in function of the LSA
+age. Before, it verifies that the LSA Opaque Type is 4 (Router Information).
+Self Opaque LSA are not send back to the Segment Routing functions as
+information are already stored.
+
+Extended Link Prefix LSAs
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Like for Router Information, Segment Routing is activate at the Extended
+Link/Prefix level with new `segment-routing on` command. This trigger
+automtically the flooding of Extended Link LSA for all ospf interface where
+adjacency is full. For Extended Prefix LSA, the new CLI command
+`segment-routing prefix ...` will trigger the flooding of Prefix SID
+TLV/SubTLVs.
+
+When Opaque LSA Type 7 i.e. Extended Prefix and Type 8 i.e. Extended Link are
+store in the LSDB, `ospf_ext_pref_update_lsa()` respectively
+`ospf_ext_link_update_lsa()` are called like for Router Information LSA. In
+turn, they respectively trigger `ospf_sr_ext_prefix_lsa_update()` /
+`ospf_sr_ext_link_lsa_update()` or `ospf_sr_ext_prefix_lsa_delete()` /
+`ospf_sr_ext_link_lsa_delete()` if the LSA age is equal to MAX_AGE.
+
+Zebra
+^^^^^
+
+When a new MPLS entry or new Forwarding Equivalent Class (FEC) must be added or
+deleted in the data plane, `add_sid_nhlfe()` respectively `del_sid_nhlfe()` are
+called. Once check the validity of labels, they are send to ZEBRA layer through
+`ZEBRA_MPLS_LABELS_ADD` command, respectively `ZEBRA_MPLS_LABELS_DELETE`
+command for deletion. This is completed by a new labelled route through
+`ZEBRA_ROUTE_ADD` command, respectively `ZEBRA_ROUTE_DELETE` command.
+
+Configuration
+-------------
+
+Linux Kernel
+~~~~~~~~~~~~
+
+In order to use OSPF Segment Routing, you must setup MPLS data plane. Up to
+know, only Linux Kernel version >= 4.5 is supported.
+
+First, the MPLS modules aren't loaded by default, so you'll need to load them
+yourself:
+
+::
+
+   modprobe mpls_router
+   modprobe mpls_gso
+   modprobe mpls_iptunnel
+
+Then, you must activate MPLS on the interface you would used:
+
+::
+
+   sysctl -w net.mpls.conf.enp0s9.input=1
+   sysctl -w net.mpls.conf.lo.input=1
+   sysctl -w net.mpls.platform_labels=1048575
+
+The last line fix the maximum MPLS label value.
+
+Once OSPFd start with Segment Routing, you could check that MPLS routes are
+enable with:
+
+::
+
+   ip -M route
+   ip route
+
+The first command show the MPLS LFIB table while the second show the FIB
+table which contains route with MPLS label encapsulation.
+
+If you disable Penultimate Hop Popping with the `no-php-flag` (see below), you
+MUST check that RP filter is not enable for the interface you intend to use,
+especially the `lo` one. For that purpose, disable RP filtering with:
+
+::
+
+   systcl -w net.ipv4.conf.all.rp_filter=0
+   sysctl -w net.ipv4.conf.lo.rp_filter=0
+
+OSPFd
+~~~~~
+
+Here it is a simple example of configuration to enable Segment Routing. Note
+that `opaque capability` and `router information` must be set to activate
+Opaque LSA prior to Segment
+Routing.
+
+::
+
+   router ospf
+    ospf router-id 192.168.1.11
+    capability opaque
+     mpls-te on
+     mpls-te router-address 192.168.1.11
+    router-info area 0.0.0.0
+    segment-routing on
+    segment-routing global-block 10000 19999
+    segment-routing node-msd 8
+    segment-routing prefix 192.168.1.11/32 index 1100
+
+The first segment-routing statement enable it. The Second one set the SRGB,
+third line the MSD and finally, set the Prefix SID index for a given prefix.
+Note that only prefix of Loopback interface could be configured with a Prefix
+SID. It is possible to add `no-php-flag` at the end of the prefix command to
+disbale Penultimate Hop Popping. This advertises peers that they MUST NOT pop
+the MPLS label prior to sending the packet.
+
+Known limitations
+-----------------
+
+* Runs only within default VRF
+* Only single Area is supported. ABR is not yet supported
+* Only SPF algorithm is supported
+* Extended Prefix Range is not supported
+* MPLS table are not flush at startup. Thus, restarting zebra process is
+  mandatory to remove old MPLS entries in the data plane after a crash of
+  ospfd daemon
+* With NO Penultimate Hop Popping, it is not possible to express a Segment
+  Path with an Adjacency SID due to the impossibility for the Linux Kernel to
+  perform double POP instruction.
+
+Credits
+-------
+
+* Author: Anselme Sawadogo <anselmesawadogo@gmail.com>
+* Author: Olivier Dugeon <olivier.dugeon@orange.com>
+* Copyright (C) 2016 - 2018 Orange Labs http://www.orange.com
+
+This work has been performed in the framework of the H2020-ICT-2014
+project 5GEx (Grant Agreement no. 671636), which is partially funded
+by the European Commission.
+
diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst
new file mode 100644 (file)
index 0000000..557ad32
--- /dev/null
@@ -0,0 +1,692 @@
+.. _process-and-workflow:
+
+*******************
+Process & Workflow
+*******************
+
+FRR is a large project developed by many different groups. This section
+documents standards for code style & quality, commit messages, pull requests
+and best practices that all contributors are asked to follow.
+
+This chapter is "descriptive/post-factual" in that it documents pratices that
+are in use; it is not "definitive/pre-factual" in prescribing practices. This
+means that when a procedure changes, it is agreed upon, then put into practice,
+and then documented here. If this document doesn't match reality, it's the
+document that needs to be updated, not reality.
+
+Mailing Lists
+=============
+
+The FRR development group maintains multiple mailing lists for use by the
+community. Italicized lists are private.
+
++----------------------------------+--------------------------------+
+| Topic                            | List                           |
++==================================+================================+
+| Development                      | dev@lists.frrouting.org        |
++----------------------------------+--------------------------------+
+| Users & Operators                | frog@lists.frrouting.org       |
++----------------------------------+--------------------------------+
+| Announcements                    | announce@lists.frrouting.org   |
++----------------------------------+--------------------------------+
+| *Security*                       | security@lists.frrouting.org   |
++----------------------------------+--------------------------------+
+| *Technical Steering Committee*   | tsc@lists.frrouting.org        |
++----------------------------------+--------------------------------+
+
+The Development list is used to discuss and document general issues related to
+project development and governance. The public Slack instance,
+frrouting.slack.com, and weekly technical meetings provide a higher bandwidth
+channel for discussions.  The results of such discussions must be reflected in
+updates, as appropriate, to code (i.e., merges), `Github issues`_, and for
+governance or process changes, updates to the Development list and either this
+file or information posted at https://frrouting.org/.
+
+Release Process & Schedule
+==========================
+
+FRR employs a <MAJOR>.<MINOR>.<BUGFIX> versioning scheme.
+
+MAJOR
+   Significant new features or multiple minor features. The addition of a new
+   routing protocol or daemon would fall under this class.
+
+MINOR
+   Small features, e.g. options for automatic BGP shutdown.
+
+BUGFIX
+   Fixes for actual bugs and/or security issues.
+
+We will pull a new development branch for the next release every 4 months.  The
+current schedule is Feb/June/October 1. The decision for a MAJOR/MINOR release
+is made at the time of branch pull based on what has been received the previous
+4 months. The branch name will be dev/MAJOR.MINOR. At this point in time the
+master branch, :file:`configure.ac`, documentation and packaging systems will
+be updated to reflect the next possible release name to allow for easy
+distinguishing. Additionally the new dev branch will have these files updated
+too.
+
+After one month the development branch will be renamed to stable/MAJOR.MINOR.
+This process is not held up unless a crash or security issue has been found and
+needs to be addressed. Issues being fixed will not cause a delay.
+
+Bugfix releases are made as needed at 1 month intervals until the next
+MAJOR.MINOR relese branch is pulled. Depending on the severity of the bugs,
+bugfix releases may occur sooner.
+
+Bugfixes are applied to the two most recent releases. Security fixes are
+backported to all releases less than or equal to one year old. Security fixes
+may also be backported to older releases depending on severity.
+
+Changelog
+=========
+
+The changelog will be the base for the release notes. A changelog entry for
+your changes is usually not required and will be added based on your commit
+messages by the maintainers. However, you are free to include an update to the
+changelog with some better description.
+
+Submitting Patches and Enhancements
+===================================
+
+FRR accepts patches from two sources:
+
+- Email (git format-patch)
+- Github pull request
+
+Contributors are highly encouraged to use Github's fork-and-pr workflow. It is
+easier for us to review it, test it, try it and discuss it on Github than it is
+via email, thus your patch will get more attention more quickly on Github.
+
+The base branch for new contributions and non-critical bug fixes should be
+``master``. Please ensure your pull request is based on this branch when you
+submit it.
+
+Pre-submission Checklist
+------------------------
+
+-  Format code (see `Code Formatting <#developers-guidelines>`__)
+-  Verify and acknowledge license (see `License for
+   contributions <#license-for-contributions>`__)
+-  Ensure you have properly signed off (see `Signing
+   Off <#signing-off>`__)
+-  Test building with various configurations:
+
+   -  ``buildtest.sh``
+
+-  Verify building source distribution:
+
+   -  ``make dist`` (and try rebuilding from the resulting tar file)
+
+-  Run unit tests:
+
+   -  ``make test``
+
+-  Document Regression Runs and plans for continued maintenance of the
+   feature
+
+License for contributions
+-------------------------
+
+FRR is under a “GPLv2 or later” license. Any code submitted must
+be released under the same license (preferred) or any license which
+allows redistribution under this GPLv2 license (eg MIT License).
+
+Signing Off
+-----------
+
+Code submitted to FRR must be signed off. We have the same
+requirements for using the signed-off-by process as the Linux kernel. In
+short, you must include a signed-off-by tag in every patch.
+
+``Signed-off-by:`` this is a developer's certification that he or she
+has the right to submit the patch for inclusion into the project. It is
+an agreement to the Developer's Certificate of Origin (below). Code
+without a proper signoff can not and will not be merged.
+
+If you are unfamiliar with this process, you should read the `official
+policy at
+kernel.org <https://www.kernel.org/doc/html/latest/process/submitting-patches.html>`__
+and you might find this article about `participating in the Linux
+community on the Linux Foundation
+website <http://www.linuxfoundation.org/content/how-participate-linux-community-0>`__
+to be a helpful resource.
+
+In short, when you sign off on a commit, you assert your agreement to
+all of the following:
+
+::
+
+    Developer's Certificate of Origin 1.1
+
+    By making a contribution to this project, I certify that:
+
+    (a) The contribution was created in whole or in part by me and I
+        have the right to submit it under the open source license
+        indicated in the file; or
+
+    (b) The contribution is based upon previous work that, to the best
+        of my knowledge, is covered under an appropriate open source
+        license and I have the right under that license to submit that
+        work with modifications, whether created in whole or in part by
+        me, under the same open source license (unless I am permitted to
+        submit under a different license), as indicated in the file; or
+
+    (c) The contribution was provided directly to me by some other
+        person who certified (a), (b) or (c) and I have not modified it.
+
+    (d) I understand and agree that this project and the contribution
+        are public and that a record of the contribution (including all
+        personal information I submit with it, including my sign-off) is
+        maintained indefinitely and may be redistributed consistent with
+        this project or the open source license(s) involved.
+
+What do I submit my changes against?
+------------------------------------
+
+We've documented where we would like to have the different fixes applied
+at
+https://github.com/FRR/frr/wiki/Where-Do-I-create-a-Pull-Request-against%3F
+If you are unsure where your submission goes, look at that document or
+ask a project maintainer.
+
+Github pull requests
+--------------------
+
+The preferred method of submitting changes is a Github pull request.
+Code submitted by pull request will be automatically tested by one or
+more CI systems. Once the automated tests succeed, other developers will
+review your code for quality and correctness. After any concerns are
+resolved, your code will be merged into the branch it was submitted
+against.
+
+Patch submission via mailing list
+---------------------------------
+
+As an alternative submission method, a patch can be mailed to the
+development mailing list. Patches received on the mailing list will be
+picked up by Patchwork and tested against the latest development branch.
+
+The recommended way to send the patch (or series of NN patches) to the
+list is by using ``git send-email`` as follows (assuming they are the N
+most recent commit(s) in your git history:
+
+::
+
+    git send-email -NN --annotate --to=dev@lists.frrouting.org
+
+If your commits do not already contain a ``Signed-off-by`` line, then
+use the following command to add it (after making sure you agree to the
+Developer Certificate of Origin as outlined above):
+
+::
+
+    git send-email -NN --annotate --signoff --to=dev@lists.frrouting.org
+
+Submitting multi-commit patches as a Github pull request is **strongly
+encouraged** and increases the probability of your patch getting
+reviewed and merged in a timely manner.
+
+After submitting your changes
+-----------------------------
+
+-  Watch for Continuous Integration (CI) Test results
+
+   -  You should automatically receive an email with the test results
+      within less than 2 hrs of the submission. If you don’t get the
+      email, then check status on the Github pull request.
+   -  Please notify the development mailing list if you think something
+      doesn't work.
+
+-  If the tests failed:
+
+   -  In general, expect the community to ignore the submission until
+      the tests pass.
+   -  It is up to you to fix and resubmit.
+
+      -  This includes fixing existing unit (“make test”) tests if your
+         changes broke or changed them.
+      -  It also includes fixing distribution packages for the failing
+         platforms (ie if new libraries are required).
+      -  Feel free to ask for help on the development list.
+
+   -  Go back to the submission process and repeat until the tests pass.
+
+-  If the tests pass:
+
+   -  Wait for reviewers. Someone will review your code or be assigned
+      to review your code.
+   -  Respond to any comments or concerns the reviewer has.
+   -  After all comments and concerns are addressed, expect your patch
+      to be merged.
+
+-  Watch out for questions on the mailing list. At this time there will
+   be a manual code review and further (longer) tests by various
+   community members.
+-  Your submission is done once it is merged to the master branch.
+
+Git Structure
+=============
+
+.. figure:: ../figures/git_branches.png
+   :align: center
+   :scale: 55%
+   :alt: Merging Git branches into a central trunk
+
+   Rough outline of FRR development workflow
+
+The master Git for FRR resides on `GitHub`_.
+
+There is one main branch for development, ``master``. For each major release
+(2.0, 3.0 etc) a new release branch is created based on the master. Subsequent
+point releases based on a major branch are marked by tagging.
+
+Programming Languages, Tools and Libraries
+==========================================
+
+The core of FRR is written in C (gcc or clang supported) and makes
+use of GNU compiler extensions. A few non-essential scripts are
+implemented in Perl and Python. FRR requires the following tools
+to build distribution packages: automake, autoconf, texinfo, libtool and
+gawk and various libraries (i.e. libpam and libjson-c).
+
+If your contribution requires a new library or other tool, then please
+highlight this in your description of the change. Also make sure it’s
+supported by all FRR platform OSes or provide a way to build
+without the library (potentially without the new feature) on the other
+platforms.
+
+Documentation should be written in reStructuredText. Sphinx extensions may be
+utilized but pure ReST is preferred where possible. See
+:ref:`documentation`.
+
+
+Coding Practices & Style
+========================
+
+Commit messages
+---------------
+
+Commit messages should be formatted in the same way as Linux kernel
+commit messages. The format is roughly
+
+::
+
+    dir: short summary
+
+    extended summary
+
+``dir`` should be the top level source directory under which the change
+was made. For example, a change in bgpd/rfapi would be formatted as:::
+
+   bgpd: short summary
+
+The first line should be no longer than 50 characters. Subsequent lines
+should be wrapped to 72 characters.
+
+Source file header
+------------------
+
+New files need to have a Copyright header (see `License for
+contributions <#license-for-contributions>`__ above) added to the file.
+Preferred form of the header is as follows:
+
+::
+
+    /*
+     * Title/Function of file
+     * Copyright (C) YEAR  Author’s Name
+     *
+     * This program is free software; you can redistribute it and/or modify it
+     * under the terms of the GNU General Public License as published by the Free
+     * Software Foundation; either version 2 of the License, or (at your option)
+     * any later version.
+     *
+     * This program is distributed in the hope that it will be useful, but WITHOUT
+     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+     * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+     * more details.
+     *
+     * You should have received a copy of the GNU General Public License along
+     * with this program; see the file COPYING; if not, write to the Free Software
+     * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+     */
+
+    #include <zebra.h>
+
+Adding copyright claims to existing files
+-----------------------------------------
+
+When adding copyright claims for modifications to an existing file,
+please preface the claim with "Portions: " on a line before it and
+indent the "Copyright ..." string. If such a case already exists, add
+your indented claim immediately after. E.g.:
+
+::
+
+    Portions:
+      Copyright (C) 2010 Entity A ....
+      Copyright (C) 2016 Your name [optional brief change description]
+
+Code formatting
+---------------
+
+FRR uses Linux kernel style except where noted below. Code which does
+not comply with these style guidelines will not be accepted.
+
+To assist with compliance, in the project root there is a .clang-format
+configuration file which can be used with the ``clang-format`` tool from
+the LLVM project. In the ``tools/`` directory there is a Python script
+named ``indent.py`` that wraps clang-format and handles some edge cases
+specific to FRR. If you are submitting a new file, it is recommended to
+run that script over the new file after ensuring that the latest stable
+release of ``clang-format`` is in your PATH.
+
+**Whitespace changes in untouched parts of the code are not acceptable
+in patches that change actual code.** To change/fix formatting issues,
+please create a separate patch that only does formatting changes and
+nothing else.
+
+Kernel and BSD styles are documented externally:
+
+-  https://www.kernel.org/doc/html/latest/process/coding-style.html
+-  http://man.openbsd.org/style
+
+For GNU coding style, use ``indent`` with the following invocation:
+
+::
+
+    indent -nut -nfc1 file_for_submission.c
+
+Exceptions
+^^^^^^^^^^
+
+FRR project code comes from a variety of sources, so there are some
+stylistic exceptions in place. They are organized here by branch.
+
+For ``master``
+""""""""""""""
+
+BSD coding style applies to:
+
+-  ``ldpd/``
+
+``babeld`` uses, approximately, the following style:
+
+-  K&R style braces
+-  Indents are 4 spaces
+-  Function return types are on their own line
+
+For ``stable/3.0`` and ``stable/2.0``
+"""""""""""""""""""""""""""""""""""""
+
+GNU coding style apply to the following parts:
+
+-  ``lib/``
+-  ``zebra/``
+-  ``bgpd/``
+-  ``ospfd/``
+-  ``ospf6d/``
+-  ``isisd/``
+-  ``ripd/``
+-  ``ripngd/``
+-  ``vtysh/``
+
+BSD coding style applies to:
+
+-  ``ldpd/``
+
+Compile-time conditional code
+-----------------------------
+
+Many users access FRR via binary packages from 3rd party sources;
+compile-time code puts inclusion/exclusion in the hands of the package
+maintainer. Please think very carefully before making code conditional
+at compile time, as it increases regression testing, maintenance
+burdens, and user confusion. In particular, please avoid gratuitous
+``--enable-…`` switches to the configure script - in general, code
+should be of high quality and in working condition, or it shouldn’t be
+in FRR at all.
+
+When code must be compile-time conditional, try have the compiler make
+it conditional rather than the C pre-processor so that it will still be
+checked by the compiler, even if disabled. For example,
+
+::
+
+    if (SOME_SYMBOL)
+          frobnicate();
+
+is preferred to
+
+::
+
+    #ifdef SOME_SYMBOL
+    frobnicate ();
+    #endif /* SOME_SYMBOL */
+
+Note that the former approach requires ensuring that ``SOME_SYMBOL``
+will be defined (watch your ``AC_DEFINE``\ s).
+
+Debug-guards in code
+--------------------
+
+Debugging statements are an important methodology to allow developers to
+fix issues found in the code after it has been released. The caveat here
+is that the developer must remember that people will be using the code
+at scale and in ways that can be unexpected for the original
+implementor. As such debugs **MUST** be guarded in such a way that they
+can be turned off. FRR has the ability to turn on/off debugs from the
+CLI and it is expected that the developer will use this convention to
+allow control of their debugs.
+
+CLI changes
+-----------
+
+CLI's are a complicated ugly beast. Additions or changes to the CLI
+should use a DEFUN to encapsulate one setting as much as is possible.
+Additionally as new DEFUN's are added to the system, documentation
+should be provided for the new commands.
+
+Backwards Compatibility
+-----------------------
+
+As a general principle, changes to CLI and code in the lib/ directory
+should be made in a backwards compatible fashion. This means that
+changes that are purely stylistic in nature should be avoided, e.g.,
+renaming an existing macro or library function name without any
+functional change. When adding new parameters to common functions, it is
+also good to consider if this too should be done in a backward
+compatible fashion, e.g., by preserving the old form in addition to
+adding the new form.
+
+This is not to say that minor or even major functional changes to CLI
+and common code should be avoided, but rather that the benefit gained
+from a change should be weighed against the added cost/complexity to
+existing code. Also, that when making such changes, it is good to
+preserve compatibility when possible to do so without introducing
+maintenance overhead/cost. It is also important to keep in mind,
+existing code includes code that may reside in private repositories (and
+is yet to be submitted) or code that has yet to be migrated from Quagga
+to FRR.
+
+That said, compatibility measures can (and should) be removed when
+either:
+
+-  they become a significant burden, e.g. when data structures change
+   and the compatibility measure would need a complex adaptation layer
+   or becomes flat-out impossible
+-  some measure of time (dependent on the specific case) has passed, so
+   that the compatibility grace period is considered expired.
+
+In all cases, compatibility pieces should be marked with
+compiler/preprocessor annotations to print warnings at compile time,
+pointing to the appropriate update path. A ``-Werror`` build should fail
+if compatibility bits are used.
+
+Miscellaneous
+-------------
+
+When in doubt, follow the guidelines in the Linux kernel style guide, or
+ask on the development mailing list / public Slack instance.
+
+
+.. _documentation:
+
+Documentation
+=============
+
+FRR uses Sphinx+RST as its documentation system. The document you are currently
+reading was generated by Sphinx from RST source in
+:file:`doc/developer/workflow.rst`. The documentation is structured as follows:
+
++-----------------------+--------------------------------------------------------------+
+| Directory             | Contents                                                     |
++=======================+==============================================================+
+| :file:`doc/user`      | User documentation; configuration guides; protocol overviews |
++-----------------------+--------------------------------------------------------------+
+| :file:`doc/developer` | Developer's documentation; API specs; datastructures;        |
+|                       | architecture overviews; project management procedure         |
++-----------------------+--------------------------------------------------------------+
+| :file:`doc/manpages`  | Source for manpages                                          |
++-----------------------+--------------------------------------------------------------+
+| :file:`doc/figures`   | Images and diagrams                                          |
++-----------------------+--------------------------------------------------------------+
+
+Each of these directories, with the exception of :file:`doc/figures`, contains
+a Sphinx-generated Makefile and configuration script :file:`conf.py` used to
+set various document parameters. The makefile can be used for a variety of
+targets; invoke `make help` in any of these directories for a listing of
+available output formats. For convenience, there is a top-level
+:file:`Makefile.am` that has targets for PDF and HTML documentation for both
+developer and user documentation, respectively. That makefile is also
+responsible for building manual pages packed with distribution builds.
+
+Indent and styling should follow existing conventions:
+
+- 3 spaces for indents under directives
+- Cross references may contain only lowercase alphanumeric characters and
+  hyphens ('-')
+- Lines wrapped to 80 characters where possible
+
+Characters for header levels should follow Python documentation guide:
+
+- ``#`` with overline, for parts
+- ``*`` with overline, for chapters
+- ``=``, for sections
+- ``-``, for subsections
+- ``^``, for subsubsections
+- ``"``, for paragraphs
+
+After you have made your changes, please make sure that you can invoke
+``make latexpdf`` and ``make html`` with no warnings.
+
+The documentation is currently incomplete and needs love. If you find a broken
+cross-reference, figure, dead hyperlink, style issue or any other nastiness we
+gladly accept documentation patches.
+
+To build the docs, please ensure you have installed a recent version of
+`Sphinx <http://www.sphinx-doc.org/en/stable/install.html>`_. If you want to
+build LaTeX or PDF docs, you will also need a full LaTeX distribution
+installed.
+
+Code
+----
+
+FRR is a large and complex software project developed by many different people
+over a long period of time. Without adequate documentation, it can be
+exceedingly difficult to understand code segments, APIs and other interfaces.
+In the interest of keeping the project healthy and maintainable, you should
+make every effort to document your code so that other people can understand
+what it does without needing to closely read the code itself.
+
+Some specific guidelines that contributors should follow are:
+
+- Functions exposed in header files should have descriptive comments above
+  their signatures in the header file. At a minimum, a function comment should
+  contain information about the return value, parameters, and a general summary
+  of the function's purpose.  Documentation on parameter values can be omitted
+  if it is (very) obvious what they are used for.
+
+  Function comments must follow the style for multiline comments laid out in
+  the kernel style guide.
+
+  Example:
+
+  .. code-block:: c
+
+     /*
+      * Determines whether or not a string is cool.
+      *
+      * @param text - the string to check for coolness
+      * @param is_clccfc - whether capslock is cruise control for cool
+      * @return 7 if the text is cool, 0 otherwise
+      */
+     int check_coolness(const char *text, bool is_clccfc);
+
+  The Javadoc-style annotations are not required, but you should still strive
+  to make it equally clear what parameters and return values are used for.
+
+- Static functions should have descriptive comments in the same form as above
+  if what they do is not immediately obvious. Use good engineering judgement
+  when deciding whether a comment is necessary.  If you are unsure, document
+  your code.
+- Global variables, static or not, should have a comment describing their use.
+- **For new code in lib/, these guidelines are hard requirements.**
+
+If you make significant changes to portions of the codebase covered in the
+Developer's Manual, add a major subsystem or feature, or gain arcane mastery of
+some undocumented or poorly documented part of the codebase, please document
+your work so others can benefit. If you add a major feature or introduce a new
+API, please document the architecture and API to the best of your abilities in
+the Developer's Manual, using good judgement when choosing where to place it.
+
+Finally, if you come across some code that is undocumented and feel like
+going above and beyond, document it! We absolutely appreciate and accept
+patches that document previously undocumented code.
+
+User
+----
+
+If you are contributing code that adds significant user-visible functionality
+please document how to use it in :file:`doc/user`. Use good judgement when
+choosing where to place documentation. For example, instructions on how to use
+your implementation of a new BGP draft should go in the BGP chapter instead of
+being its own chapter. If you are adding a new protocol daemon, please create a
+new chapter.
+
+When documenting CLI please use a combination of the ``.. index::`` and
+``.. clicmd::`` directives. For example, the command :clicmd:`show pony` would
+be documented as follows:
+
+.. code-block:: rest
+
+   .. index:: show pony
+   .. clicmd:: show pony
+
+      Prints an ASCII pony. Example output:::
+
+              >>\.
+             /_  )`.
+            /  _)`^)`.   _.---. _
+           (_,' \  `^-)""      `.\
+                 |  | \
+                 \              / |
+                / \  /.___.'\  (\ (_
+               < ,"||     \ |`. \`-'
+                \\ ()      )|  )/
+         hjw    |_>|>     /_] //
+                  /_]        /_]
+
+When documented this way, CLI commands can be cross referenced with the
+``:clicmd:`` inline markup like so:
+
+.. code-block:: rest
+
+   :clicmd:`show pony`
+
+This is very helpful for users who want to quickly remind themselves what a
+particular command does.
+
+.. _GitHub: https://github.com/frrouting/frr
+.. _GitHub issues: https://github.com/frrouting/frr/issues
diff --git a/doc/draft-zebra-00.ms b/doc/draft-zebra-00.ms
deleted file mode 100644 (file)
index 2599472..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-.pl 10.0i
-.po 0
-.ll 7.2i
-.lt 7.2i
-.nr LL 7.2i
-.nr LT 7.2i
-.ds LF Ishiguro
-.ds RF FORMFEED[Page %]
-.ds CF
-.ds LH RFC DRAFT
-.ds RH March 1998
-.ds CH
-.hy 0
-.ad l
-Network Working Group                                        K. Ishiguro
-Request for Comments: DRAFT                     Digital Magic Labs, Inc.
-                                                              March 1998
-.sp 2
-.ce
-Zebra Protocol Draft
-.sp 2
-.fi
-.ne 4
-Status of this Memo
-.sp
-.in 3
-This draft is very eary beta version.
-.sp
-.in 0
-.ne 4
-Introduction
-.sp
-.in 3
-The zebra protocol is a communication protocol between kernel
-routing table manager and routing protocol daemon. It is built over
-TCP/IP protocol suite.
-.sp
-.in 0
-.ne 4
-Request message formats
-.sp
-.in 3
-zebra is TCP-based protocol.
-.sp
-Below is request packet format.
-.sp
-.in 0
-.DS
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|           Length (2)          |   Command (1) |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.DE
-.sp
-.in 3
-Length is total packet length.
-.sp
-Here is summary of command list.
-.sp
-.in 0
-.DS
-1 - ZEBRA_IPV4_ROUTE_ADD
-2 - ZEBRA_IPV4_ROUTE_DELETE
-3 - ZEBRA_IPV6_ROUTE_ADD
-4 - ZEBRA_IPV6_ROUTE_DELETE
-5 - ZEBRA_GET_ONE_INTERFACE
-6 - ZEBRA_GET_ALL_INTERFACE
-7 - ZEBRA_GET_HOSTINFO
-.DE
-.sp
-.in 0
-.ne 4
-IPv4 reply message formats
-.sp
-.in 0
-.DS
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+
-|    Type (1)   |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                            Gateway (4)                        |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.DE
-.sp
-.in 3
-Type field specify route's origin type.
-.sp
-.in 0
-.DS
-1 - ZEBRA_ROUTE_RESERVE
-2 - ZEBRA_ROUTE_CONNECT
-3 - ZEBRA_ROUTE_STATIC
-4 - ZEBRA_ROUTE_RIP
-5 - ZEBRA_ROUTE_RIPNG
-6 - ZEBRA_ROUTE_BGP
-7 - ZEBRA_ROUTE_RADIX
-.DE
-.sp
-.in 3
-After above message there can be variale length IPv4 prefix data.
-Each IPv4 prefix is encoded as a two tuple of the form <masklength,
-prefix>
-.sp
-.in 0
-.DS
-+----------------------+
-|Subnet mask (1 octet) |
-+----------------------+
-|IPv4 prefix (variable)|
-+----------------------+
-.DE
-.sp
-.in 0
-.ne 4
-IPv6 reply message formats
-.sp
-.in 0
-.DS
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+
-|    Type (1)   |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                                                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                           Gateway (16)                        |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                                                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                                                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.DE
-.sp
-.in 3
-Type field specify route's origin type.
-.sp
-.in 0
-.DS
-1 - ZEBRA_ROUTE_RESERVE
-2 - ZEBRA_ROUTE_CONNECT
-3 - ZEBRA_ROUTE_STATIC
-4 - ZEBRA_ROUTE_RIP
-5 - ZEBRA_ROUTE_RIPNG
-6 - ZEBRA_ROUTE_BGP
-7 - ZEBRA_ROUTE_RADIX
-.DE
-.sp
-.in 0
-.DS
-+----------------------+
-|  ifindex   (4 octet) |
-+----------------------+
-|  prefixlen  (1 octet)|
-+----------------------+
-|IPv6 prefix (variable)|
-+----------------------+
-.DE
-.sp
-.in 3
-I am not sure but it seems some operation systems IPv6
-implementation may need interface index when add and delete
-linklocal routes.
-.sp
-I have added ifindex field to specify IPv6 routes interface
-index. If this index is value zero, it will ignored.
-.sp
-.in 0
-.ne 4
-Interface information message format.
-.sp
-.in 0
-.DS
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                      Interface name (20)                      |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|   Index (1)   |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                       Inteface flag (4)                       |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                      Inteface metric (4)                      |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                        Inteface MTU (4)                       |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|                    Inteface Address count (4)                 |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.DE
-.sp
-.in 3
-Address message format.
-.sp
-.in 0
-.ne 4
-Host inforamtion message format.
-.sp
-.in 0
-.DS
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|IPv4 forwarding|IPv6 forwarding|
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.DE
-.sp
-.in 3
-Host information contain IPv4/IPv6 forwarding information.
diff --git a/doc/eigrpd.8.in b/doc/eigrpd.8.in
deleted file mode 100644 (file)
index ecac972..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-.TH EIGRPD 8 "6 May 2017" "@PACKAGE_FULLNAME@ EIGRP daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-eigrpd \- a EIGRP routing engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B eigrpd
-[
-.B \-dhrv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B eigrpd
-is a routing component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B eigrpd
-command:
-.SH OPTIONS
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/eigrpd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When eigrpd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart eigrpd.  The default is \fB\fI@CFG_STATE@/eigrpd.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the eigrpd VTY will listen on. This defaults to
-2602, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the eigrpd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-r\fR, \fB\-\-retain\fR 
-When the program terminates, retain routes added by \fBeigrpd\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-The \fBsnmp\fR module may be available for
-\fBeigrpd\fR, if the package was built with SNMP support.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/eigrpd
-The default location of the 
-.B eigrpd
-binary.
-.TP
-.BI @CFG_SYSCONF@/eigrpd.conf
-The default location of the 
-.B eigrpd
-config file.
-.TP
-.BI $(PWD)/eigrpd.log 
-If the 
-.B eigrpd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBeigrpd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The eigrpd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBeigrpd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-.B eigrpd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
diff --git a/doc/eigrpd.texi b/doc/eigrpd.texi
deleted file mode 100644 (file)
index a3a82bb..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the Frr Manual.
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-@node EIGRP
-@chapter EIGRP
-
-EIGRP -- Routing Information Protocol is widely deployed interior gateway
-routing protocol.  EIGRP was developed in the 1990's.  EIGRP is a
-@dfn{distance-vector} protocol and is based on the @dfn{dual} algorithms.
-As a distance-vector protocol, the EIGRP router send updates to its
-neighbors as networks change, thus allowing the convergence to a
-known topology.
-
-@command{eigrpd} supports EIGRP as described in RFC7868
-
-@menu
-* Starting and Stopping eigrpd::
-* EIGRP Configuration::
-* How to Announce EIGRP routes::
-* Show EIGRP Information::
-* EIGRP Debug Commands::
-@end menu
-
-@node Starting and Stopping eigrpd
-@section Starting and Stopping eigrpd
-
-The default configuration file name of @command{eigrpd}'s is
-@file{eigrpd.conf}.  When invocation @command{eigrpd} searches directory
-@value{INSTALL_PREFIX_ETC}.  If @file{eigrpd.conf} is not there next
-search current directory.  If an integrated config is specified
-configuration is written into frr.conf
-
-The EIGRP protocol requires interface information
-maintained by @command{zebra} daemon.  So running @command{zebra}
-is mandatory to run @command{eigrpd}.  Thus minimum sequence for running
-EIGRP is like below:
-
-@example
-@group
-# zebra -d
-# eigrpd -d
-@end group
-@end example
-
-Please note that @command{zebra} must be invoked before @command{eigrpd}.
-
-To stop @command{eigrpd}.  Please use @command{kill `cat
-/var/run/eigrpd.pid`}.  Certain signals have special meanings to @command{eigrpd}.
-
-@table @samp
-@item SIGHUP
-@item SIGUSR1
-Rotate @command{eigrpd} Rotate the logfile.
-@item SIGINT
-@itemx SIGTERM
-@command{eigrpd} sweeps all installed EIGRP routes then terminates properly.
-@end table
-
-@command{eigrpd} invocation options.  Common options that can be specified
-(@pxref{Common Invocation Options}).
-
-@table @samp
-@item -r
-@itemx --retain
-When the program terminates, retain routes added by @command{eigrpd}.
-@end table
-
-@node EIGRP Configuration
-@section EIGRP Configuration
-
-@deffn Command {router eigrp (1-65535)} {}
-The @code{router eigrp} command is necessary to enable EIGRP.  To disable
-EIGRP, use the @code{no router eigrp (1-65535)} command.  EIGRP must be enabled before carrying out any of the EIGRP commands.
-@end deffn
-
-@deffn Command {no router eigrp (1-65535)} {}
-Disable EIGRP.
-@end deffn
-
-@deffn {EIGRP Command} {network @var{network}} {}
-@deffnx {EIGRP Command} {no network @var{network}} {}
-Set the EIGRP enable interface by @var{network}.  The interfaces which
-have addresses matching with @var{network} are enabled.
-
-This group of commands either enables or disables EIGRP interfaces between
-certain numbers of a specified network address.  For example, if the
-network for 10.0.0.0/24 is EIGRP enabled, this would result in all the
-addresses from 10.0.0.0 to 10.0.0.255 being enabled for EIGRP.  The @code{no
-network} command will disable EIGRP for the specified network.
-@end deffn
-
-Below is very simple EIGRP configuration.  Interface @code{eth0} and
-interface which address match to @code{10.0.0.0/8} are EIGRP enabled.
-
-@example
-@group
-!
-router eigrp 1
- network 10.0.0.0/8
-!
-@end group
-@end example
-
-Passive interface
-
-@deffn {EIGRP command} {passive-interface (@var{IFNAME}|default)} {}
-@deffnx {EIGRP command} {no passive-interface @var{IFNAME}} {}
-This command sets the specified interface to passive mode.  On passive mode
-interface, all receiving packets are ignored and eigrpd does
-not send either multicast or unicast EIGRP packets except to EIGRP neighbors
-specified with @code{neighbor} command. The interface may be specified
-as @var{default} to make eigrpd default to passive on all interfaces. 
-
-The default is to be passive on all interfaces.
-@end deffn
-
-@node How to Announce EIGRP route
-@section How to Announce EIGRP route
-
-@deffn {EIGRP command} {redistribute kernel} {}
-@deffnx {EIGRP command} {redistribute kernel metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)} {}
-@deffnx {EIGRP command} {no redistribute kernel} {}
-@code{redistribute kernel} redistributes routing information from
-kernel route entries into the EIGRP tables. @code{no redistribute kernel}
-disables the routes.
-@end deffn
-
-@deffn {EIGRP command} {redistribute static} {}
-@deffnx {EIGRP command} {redistribute static metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)} {}
-@deffnx {EIGRP command} {no redistribute static} {}
-@code{redistribute static} redistributes routing information from
-static route entries into the EIGRP tables. @code{no redistribute static}
-disables the routes.
-@end deffn
-
-@deffn {EIGRP command} {redistribute connected} {}
-@deffnx {EIGRP command} {redistribute connected metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)} {}
-@deffnx {EIGRP command} {no redistribute connected} {}
-Redistribute connected routes into the EIGRP tables.  @code{no
-redistribute connected} disables the connected routes in the EIGRP tables.
-This command redistribute connected of the interface which EIGRP disabled.
-The connected route on EIGRP enabled interface is announced by default.
-@end deffn
-
-@deffn {EIGRP command} {redistribute ospf} {}
-@deffnx {EIGRP command} {redistribute ospf metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)} {}
-@deffnx {EIGRP command} {no redistribute ospf} {}
-@code{redistribute ospf} redistributes routing information from
-ospf route entries into the EIGRP tables. @code{no redistribute ospf}
-disables the routes.
-@end deffn
-
-@deffn {EIGRP command} {redistribute bgp} {}
-@deffnx {EIGRP command} {redistribute bgp metric  (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)} {}
-@deffnx {EIGRP command} {no redistribute bgp} {}
-@code{redistribute bgp} redistributes routing information from
-bgp route entries into the EIGRP tables. @code{no redistribute bgp}
-disables the routes.
-@end deffn
-
-@node Show EIGRP Information
-@section Show EIGRP Information
-
-To display EIGRP routes.
-
-@deffn Command {show ip eigrp topology} {}
-Show EIGRP routes.
-@end deffn
-
-The command displays all EIGRP routes.
-
-@c Exmaple here.
-
-@deffn Command {show ip eigrp topology} {}
-The command displays current EIGRP status
-@end deffn
-
-@example
-@group
-eigrpd> @b{show ip eigrp topology}
-# show ip eigrp topo
-
-EIGRP Topology Table for AS(4)/ID(0.0.0.0)
-
-Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply
-       r - reply Status, s - sia Status
-
-P  10.0.2.0/24, 1 successors, FD is 256256, serno: 0 
-       via Connected, enp0s3
-@end group
-@end example
-
-@node EIGRP Debug Commands
-@section EIGRP Debug Commands
-
-Debug for EIGRP protocol.
-
-@deffn Command {debug eigrp packets} {}
-Debug eigrp packets
-@end deffn
-
-@code{debug eigrp} will show EIGRP packets that are sent and recevied.
-
-@deffn Command {debug eigrp transmit} {}
-Debug eigrp transmit events
-@end deffn
-
-@code{debug eigrp transmit} will display detailed information about the EIGRP transmit events.
-
-@deffn Command {show debugging eigrp} {}
-Display @command{eigrpd}'s debugging option.
-@end deffn
-
-@code{show debugging eigrp} will show all information currently set for eigrpd
-debug.
diff --git a/doc/fig-normal-processing.dia b/doc/fig-normal-processing.dia
deleted file mode 100644 (file)
index c9e8e68..0000000
+++ /dev/null
@@ -1,1738 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#A4#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="5"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="5"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true">
-    <dia:object type="Standard - Box" version="0" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="7.6,4.75"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="7.55,4.7;16.45,9.4"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="7.6,4.75"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="8.8000000000000007"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="4.5999999999999996"/>
-      </dia:attribute>
-      <dia:attribute name="inner_color">
-        <dia:color val="#8f8f8f"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20,2.95607"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="19.8989,2.49893;24.1055,3.50107"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20,2.95607"/>
-        <dia:point val="24,3"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O38" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="0,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-0.1,2.5;4.1,3.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="0,3"/>
-        <dia:point val="4,3"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O36" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="15.9914,5.70858"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="15.8513,2.57356;18.5463,5.84872"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="15.9914,5.70858"/>
-        <dia:point val="18.0879,2.95607"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O7" connection="2"/>
-        <dia:connection handle="1" to="O38" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O4">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.86018,2.86018;8.42045,6.03565"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,3"/>
-        <dia:point val="7.95858,5.65858"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O36" connection="4"/>
-        <dia:connection handle="1" to="O5" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O5">
-        <dia:attribute name="obj_pos">
-          <dia:point val="7.9,5.6"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.85,5.55;11.95,8.65"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="7.9,5.6"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="4"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3fa9bd"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O6">
-        <dia:attribute name="obj_pos">
-          <dia:point val="9.9,6.6"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.725,6;11.075,8.55"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Best
-Path
-Selection#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="9.9,6.6"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O7">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13.45,5.65"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="13.4,5.6;16.1,8.55"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="13.45,5.65"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2.6000000000000147"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2.8500000000000005"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3fa9bd"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O8">
-        <dia:attribute name="obj_pos">
-          <dia:point val="14.75,6.8"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="14.075,6.2;15.425,7.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Local
-RIB#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="14.75,6.8"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.86335,5.86335;8.23706,7.58282"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,6"/>
-        <dia:point val="7.9,7.1"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O34" connection="4"/>
-        <dia:connection handle="1" to="O5" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="19.9,5.5;24.1,6.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20,6"/>
-        <dia:point val="24,6"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O40" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.05,7.075"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="15.9141,5.51385;18.329,7.21085"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.05,7.075"/>
-        <dia:point val="18,6"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O7" connection="4"/>
-        <dia:connection handle="1" to="O40" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="0,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-0.1,5.5;4.1,6.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="0,6"/>
-        <dia:point val="4,6"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O34" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O13">
-      <dia:attribute name="obj_pos">
-        <dia:point val="0,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-0.1,8.5;4.1,9.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="0,9"/>
-        <dia:point val="4,9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O32" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O14">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="19.9,8.5;24.1,9.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20,9"/>
-        <dia:point val="24,9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O42" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O15">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.05,7.075"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="15.9086,6.93358;18.4224,9.42608"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.05,7.075"/>
-        <dia:point val="18,9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O7" connection="4"/>
-        <dia:connection handle="1" to="O42" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O16">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.85858,6.67574;8.32426,9.14142"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,9"/>
-        <dia:point val="7.9,7.1"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O32" connection="4"/>
-        <dia:connection handle="1" to="O5" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O17">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="19.9,11.5;24.1,12.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20,12"/>
-        <dia:point val="24,12"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O44" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O18">
-      <dia:attribute name="obj_pos">
-        <dia:point val="15.9914,8.44142"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="15.8552,8.30518;18.4846,12.3329"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="15.9914,8.44142"/>
-        <dia:point val="18,12"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O7" connection="7"/>
-        <dia:connection handle="1" to="O44" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O19">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.86371,8.20802;8.44294,12.1363"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,12"/>
-        <dia:point val="7.95858,8.54142"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O30" connection="4"/>
-        <dia:connection handle="1" to="O5" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O20">
-      <dia:attribute name="obj_pos">
-        <dia:point val="0,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-0.1,11.5;4.1,12.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="0,12"/>
-        <dia:point val="4,12"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O30" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O21">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-5,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-5,2.22625;-0.82625,3.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From Peer A#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-5,3"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O22">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-5,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-5,5.22625;-0.82625,6.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From Peer B#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-5,6"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O23">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-5,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-5,8.22625;-0.77625,9.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From Peer C#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-5,9"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O24">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-5,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-5,11.2263;-0.77625,12.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From Peer D#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-5,12"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O25">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24,2.22625;27.3238,3.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#To Peer A#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="24,3"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O26">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24,5.22625;27.3238,6.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#To Peer B#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="24,6"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O27">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24,8.22625;27.3738,9.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#To Peer C#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="24,9"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O28">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24,11.2263;27.3738,12.4975"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#To Peer D#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="24,12"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O29">
-      <dia:attribute name="obj_pos">
-        <dia:point val="11.9,7.1"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="11.7476,6.07271;13.6161,8.07729"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="11.9,7.1"/>
-        <dia:point val="13.45,7.075"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.29999999999999999"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.59999999999999998"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.99999999999999967"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O5" connection="4"/>
-        <dia:connection handle="1" to="O7" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O30">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,11"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,10.95;6.05,13.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,11"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O31">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,12.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,11.3;5.4,12.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,12.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O32">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,8"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,7.95;6.05,10.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O33">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,9.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,8.3;5.4,9.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,9.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O34">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,5"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,4.95;6.05,7.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,5"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O35">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.7,6.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.7,5.3;5.4,6.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.7,6.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O36">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,1.95;6.05,4.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O37">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.75,3.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.75,2.3;5.45,3.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#A#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.75,3.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O38">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18.0879,2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.0379,1.95;20.05,3.96213"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="18.0879,2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="1.9121320343559631"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="1.9121320343559645"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3756d7"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O39">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18.65,3.45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.65,2.4;19.35,4.05"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#A#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="18.65,3.45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O40">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18,5"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.95,4.95;20.05,7.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="18,5"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3756d7"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O41">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18.7,6.45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.7,5.4;19.4,7.05"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="18.7,6.45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O42">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18,8"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.95,7.95;20.05,10.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="18,8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3756d7"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O43">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18.6,9.45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.6,8.4;19.35,10.05"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="18.6,9.45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O44">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18.0879,11"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.0379,10.95;20.05,12.9621"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="18.0879,11"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="1.9121320343559631"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="1.9121320343559649"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3756d7"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O45">
-        <dia:attribute name="obj_pos">
-          <dia:point val="18.7,12.4"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.7,11.35;19.45,13"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="18.7,12.4"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O46">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13,15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="12.95,14.95;22.05,19.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="13,15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#b7b2b2"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O47">
-          <dia:attribute name="obj_pos">
-            <dia:point val="14,16"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="13.95,15.95;15.9621,17.9621"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="14,16"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="1.9121320343559631"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="1.9121320343559649"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3756d7"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O48">
-          <dia:attribute name="obj_pos">
-            <dia:point val="14.6121,17.4"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="14.6121,16.35;15.3121,18"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#X#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="14.6121,17.4"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:object type="Standard - Text" version="0" id="O49">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19,17"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="16.525,15.95;21.475,19"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#“Out” Filter
-for Peer X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19,17"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O50">
-        <dia:attribute name="obj_pos">
-          <dia:point val="3,15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="2.95,14.95;12.05,19.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="3,15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#b7b2b2"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O51">
-        <dia:attribute name="obj_pos">
-          <dia:point val="9,17"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="9,16.4;9,17.35"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>##</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="9,17"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O52">
-        <dia:attribute name="obj_pos">
-          <dia:point val="9,17"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="6.675,15.95;11.325,19"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#“In” Filter
-for Peer X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="9,17"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O53">
-          <dia:attribute name="obj_pos">
-            <dia:point val="4,16"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="3.95,15.95;6.05,18.05"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="4,16"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#eb2020"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O54">
-          <dia:attribute name="obj_pos">
-            <dia:point val="4.65,17.35"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="4.65,16.3;5.35,17.95"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#X#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="4.65,17.35"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-    </dia:group>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-normal-processing.png b/doc/fig-normal-processing.png
deleted file mode 100644 (file)
index e4b8fdc..0000000
Binary files a/doc/fig-normal-processing.png and /dev/null differ
diff --git a/doc/fig-normal-processing.txt b/doc/fig-normal-processing.txt
deleted file mode 100644 (file)
index 01f0e17..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-                  _______________________________
-                 /    _________     _________    \
-From Peer A --->|(A)-|Best     |   |         |-[A]|--->To Peer A
-From Peer B --->|(B)-|Path     |-->|Local-RIB|-[B]|--->To Peer B
-From Peer C --->|(C)-|Selection|   |         |-[C]|--->To Peer C
-From Peer D --->|(D)-|_________|   |_________|-[D]|--->To Peer D
-                 \_______________________________/
-
-Key:  (X) - 'In'  Filter applied to Peer X's announcements
-      [X] - 'Out' Filter applied to announcements to Peer X
diff --git a/doc/fig-rs-processing.dia b/doc/fig-rs-processing.dia
deleted file mode 100644 (file)
index b2bf213..0000000
+++ /dev/null
@@ -1,4239 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#A4#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true">
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O0">
-        <dia:attribute name="obj_pos">
-          <dia:point val="11.95,5.25"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.9,5.2;20.8,9.9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="11.95,5.25"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="8.8000000000000007"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4.5999999999999996"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#8f8f8f"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:group>
-          <dia:object type="Standard - Box" version="0" id="O1">
-            <dia:attribute name="obj_pos">
-              <dia:point val="12.25,6.1"/>
-            </dia:attribute>
-            <dia:attribute name="obj_bb">
-              <dia:rectangle val="12.2,6.05;16.3,9.15"/>
-            </dia:attribute>
-            <dia:attribute name="elem_corner">
-              <dia:point val="12.25,6.1"/>
-            </dia:attribute>
-            <dia:attribute name="elem_width">
-              <dia:real val="4"/>
-            </dia:attribute>
-            <dia:attribute name="elem_height">
-              <dia:real val="3"/>
-            </dia:attribute>
-            <dia:attribute name="inner_color">
-              <dia:color val="#3fa9bd"/>
-            </dia:attribute>
-            <dia:attribute name="show_background">
-              <dia:boolean val="true"/>
-            </dia:attribute>
-            <dia:attribute name="corner_radius">
-              <dia:real val="0.20000000000000001"/>
-            </dia:attribute>
-          </dia:object>
-          <dia:object type="Standard - Text" version="0" id="O2">
-            <dia:attribute name="obj_pos">
-              <dia:point val="14.25,7.1"/>
-            </dia:attribute>
-            <dia:attribute name="obj_bb">
-              <dia:rectangle val="13.075,6.5;15.425,9.05"/>
-            </dia:attribute>
-            <dia:attribute name="text">
-              <dia:composite type="text">
-                <dia:attribute name="string">
-                  <dia:string>#Best
-Path
-Selection#</dia:string>
-                </dia:attribute>
-                <dia:attribute name="font">
-                  <dia:font family="sans" style="0" name="Helvetica"/>
-                </dia:attribute>
-                <dia:attribute name="height">
-                  <dia:real val="0.80000000000000004"/>
-                </dia:attribute>
-                <dia:attribute name="pos">
-                  <dia:point val="14.25,7.1"/>
-                </dia:attribute>
-                <dia:attribute name="color">
-                  <dia:color val="#000000"/>
-                </dia:attribute>
-                <dia:attribute name="alignment">
-                  <dia:enum val="1"/>
-                </dia:attribute>
-              </dia:composite>
-            </dia:attribute>
-          </dia:object>
-        </dia:group>
-        <dia:object type="Standard - Line" version="0" id="O3">
-          <dia:attribute name="obj_pos">
-            <dia:point val="16.25,7.6"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="16.0976,6.57271;17.9661,8.57729"/>
-          </dia:attribute>
-          <dia:attribute name="conn_endpoints">
-            <dia:point val="16.25,7.6"/>
-            <dia:point val="17.8,7.575"/>
-          </dia:attribute>
-          <dia:attribute name="numcp">
-            <dia:int val="1"/>
-          </dia:attribute>
-          <dia:attribute name="line_width">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-          <dia:attribute name="end_arrow">
-            <dia:enum val="3"/>
-          </dia:attribute>
-          <dia:attribute name="end_arrow_length">
-            <dia:real val="0.59999999999999998"/>
-          </dia:attribute>
-          <dia:attribute name="end_arrow_width">
-            <dia:real val="0.99999999999999967"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:group>
-          <dia:object type="Standard - Box" version="0" id="O4">
-            <dia:attribute name="obj_pos">
-              <dia:point val="17.8,6.15"/>
-            </dia:attribute>
-            <dia:attribute name="obj_bb">
-              <dia:rectangle val="17.75,6.1;20.45,9.05"/>
-            </dia:attribute>
-            <dia:attribute name="elem_corner">
-              <dia:point val="17.8,6.15"/>
-            </dia:attribute>
-            <dia:attribute name="elem_width">
-              <dia:real val="2.6000000000000147"/>
-            </dia:attribute>
-            <dia:attribute name="elem_height">
-              <dia:real val="2.8500000000000005"/>
-            </dia:attribute>
-            <dia:attribute name="inner_color">
-              <dia:color val="#3fa9bd"/>
-            </dia:attribute>
-            <dia:attribute name="show_background">
-              <dia:boolean val="true"/>
-            </dia:attribute>
-            <dia:attribute name="corner_radius">
-              <dia:real val="0.20000000000000001"/>
-            </dia:attribute>
-          </dia:object>
-          <dia:object type="Standard - Text" version="0" id="O5">
-            <dia:attribute name="obj_pos">
-              <dia:point val="19.15,7.4"/>
-            </dia:attribute>
-            <dia:attribute name="obj_bb">
-              <dia:rectangle val="18.125,6.8;20.175,8.55"/>
-            </dia:attribute>
-            <dia:attribute name="text">
-              <dia:composite type="text">
-                <dia:attribute name="string">
-                  <dia:string>#Main
-Loc-RIB#</dia:string>
-                </dia:attribute>
-                <dia:attribute name="font">
-                  <dia:font family="sans" style="0" name="Helvetica"/>
-                </dia:attribute>
-                <dia:attribute name="height">
-                  <dia:real val="0.80000000000000004"/>
-                </dia:attribute>
-                <dia:attribute name="pos">
-                  <dia:point val="19.15,7.4"/>
-                </dia:attribute>
-                <dia:attribute name="color">
-                  <dia:color val="#000000"/>
-                </dia:attribute>
-                <dia:attribute name="alignment">
-                  <dia:enum val="1"/>
-                </dia:attribute>
-              </dia:composite>
-            </dia:attribute>
-          </dia:object>
-        </dia:group>
-      </dia:group>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O6">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-1,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-1.1,2.5;4.1,3.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="-1,3"/>
-        <dia:point val="4,3"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="6"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O23" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O7">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20.4,7.575"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="20.2995,7.04947;25.1906,8.05053"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20.4,7.575"/>
-        <dia:point val="25.0879,7.55"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="4"/>
-        <dia:connection handle="1" to="O129" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O8">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.86581,2.86581;12.6219,6.65044"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,3"/>
-        <dia:point val="12.3086,6.15858"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O23" connection="4"/>
-        <dia:connection handle="1" to="O1" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.87832,5.87832;12.4709,8.10918"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,6"/>
-        <dia:point val="12.25,7.6"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O21" connection="4"/>
-        <dia:connection handle="1" to="O1" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-1,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-1.1,5.5;4.1,6.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="-1,6"/>
-        <dia:point val="4,6"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O21" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-1,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-1.1,8.5;4.1,9.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="-1,9"/>
-        <dia:point val="4,9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O19" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.88056,7.09023;12.4569,9.11944"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,9"/>
-        <dia:point val="12.25,7.6"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O19" connection="4"/>
-        <dia:connection handle="1" to="O1" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O13">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.867,8.54627;12.6114,12.133"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,12"/>
-        <dia:point val="12.3086,9.04142"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O17" connection="4"/>
-        <dia:connection handle="1" to="O1" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O14">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-1,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-1.1,11.5;4.1,12.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="-1,12"/>
-        <dia:point val="4,12"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="2"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O17" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O15">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-6,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-6,2.25;-1.85,3.45"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From Peer A#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-6,3"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O16">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-7,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-7,5.25;-1.25,6.45"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From RS-Client B#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-7,6"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O17">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,11"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,10.95;6.05,13.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,11"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O18">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,12.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,11.3;5.4,12.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,12.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O19">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,8"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,7.95;6.05,10.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O20">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,9.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,8.3;5.4,9.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,9.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O21">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,5"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,4.95;6.05,7.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,5"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O22">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.7,6.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.7,5.3;5.4,6.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.7,6.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O23">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,1.95;6.05,4.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#eb2020"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O24">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.75,3.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.75,2.3;5.45,3.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#A#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.75,3.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O25">
-        <dia:attribute name="obj_pos">
-          <dia:point val="5,43"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.95,42.95;14.05,47.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="5,43"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#b7b2b2"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O26">
-          <dia:attribute name="obj_pos">
-            <dia:point val="6,44"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="5.95,43.95;7.96213,45.9621"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="6,44"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="1.9121320343559631"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="1.9121320343559649"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3756d7"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O27">
-          <dia:attribute name="obj_pos">
-            <dia:point val="6.61213,45.4"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="6.61213,44.35;7.31213,46"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#X#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="6.61213,45.4"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:object type="Standard - Text" version="0" id="O28">
-        <dia:attribute name="obj_pos">
-          <dia:point val="11,45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.525,43.95;13.475,47"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#“Out” Filter
-for Peer X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="11,45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O29">
-        <dia:attribute name="obj_pos">
-          <dia:point val="-6,43"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="-6.05,42.95;3.05,47.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="-6,43"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#b7b2b2"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O30">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0,45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="0,44.4;0,45.35"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>##</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="0,45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O31">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0,45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="-2.325,43.95;2.325,47"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#“In” Filter
-for Peer X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="0,45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O32">
-          <dia:attribute name="obj_pos">
-            <dia:point val="-5,44"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="-5.05,43.95;-2.95,46.05"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="-5,44"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#eb2020"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O33">
-          <dia:attribute name="obj_pos">
-            <dia:point val="-4.35,45.35"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="-4.35,44.3;-3.65,45.95"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#X#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="-4.35,45.35"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-    </dia:group>
-    <dia:object type="Standard - Text" version="0" id="O34">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-7,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-7,11.25;-1.2,12.45"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From RS-Client D#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-7,12"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="0" id="O35">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-7,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-7,8.25;-1.2,9.45"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#From RS-Client C#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="1"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="-7,9"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O36">
-        <dia:attribute name="obj_pos">
-          <dia:point val="12,26"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.95,25.95;20.85,30.65"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="12,26"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="8.8000000000000007"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4.5999999999999996"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#8f8f8f"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O37">
-          <dia:attribute name="obj_pos">
-            <dia:point val="12.3,26.85"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="12.25,26.8;16.35,29.9"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="12.3,26.85"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="4"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="3"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3fa9bd"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.20000000000000001"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O38">
-          <dia:attribute name="obj_pos">
-            <dia:point val="14.3,27.85"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="13.125,27.25;15.475,29.8"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#Best
-Path
-Selection#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="0.80000000000000004"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="14.3,27.85"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="1"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:object type="Standard - Box" version="0" id="O39">
-        <dia:attribute name="obj_pos">
-          <dia:point val="17.85,26.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.8,26.85;20.5,29.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="17.85,26.9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2.6000000000000147"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2.8500000000000005"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3fa9bd"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O40">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.1,28.2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.075,27.6;20.125,29.35"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Loc-RIB
-For C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.1,28.2"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Line" version="0" id="O41">
-        <dia:attribute name="obj_pos">
-          <dia:point val="16.3,28.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="16.1476,27.3227;18.0161,29.3273"/>
-        </dia:attribute>
-        <dia:attribute name="conn_endpoints">
-          <dia:point val="16.3,28.35"/>
-          <dia:point val="17.85,28.325"/>
-        </dia:attribute>
-        <dia:attribute name="numcp">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="line_width">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_length">
-          <dia:real val="0.59999999999999998"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_width">
-          <dia:real val="0.99999999999999967"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="1" to="O39" connection="3"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O42">
-        <dia:attribute name="obj_pos">
-          <dia:point val="12,36"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.95,35.95;20.85,40.65"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="12,36"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="8.8000000000000007"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4.5999999999999996"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#8f8f8f"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O43">
-          <dia:attribute name="obj_pos">
-            <dia:point val="12.3,36.85"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="12.25,36.8;16.35,39.9"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="12.3,36.85"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="4"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="3"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3fa9bd"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.20000000000000001"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O44">
-          <dia:attribute name="obj_pos">
-            <dia:point val="14.3,37.85"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="13.125,37.25;15.475,39.8"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#Best
-Path
-Selection#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="0.80000000000000004"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="14.3,37.85"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="1"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:object type="Standard - Box" version="0" id="O45">
-        <dia:attribute name="obj_pos">
-          <dia:point val="17.85,36.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.8,36.85;20.5,39.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="17.85,36.9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2.6000000000000147"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2.8500000000000005"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3fa9bd"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O46">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.1,38.2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.075,37.6;20.125,39.35"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Loc-RIB
-For D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.1,38.2"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Line" version="0" id="O47">
-        <dia:attribute name="obj_pos">
-          <dia:point val="16.3,38.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="16.1476,37.3227;18.0161,39.3273"/>
-        </dia:attribute>
-        <dia:attribute name="conn_endpoints">
-          <dia:point val="16.3,38.35"/>
-          <dia:point val="17.85,38.325"/>
-        </dia:attribute>
-        <dia:attribute name="numcp">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="line_width">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_length">
-          <dia:real val="0.59999999999999998"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_width">
-          <dia:real val="0.99999999999999967"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="1" to="O45" connection="3"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O48">
-        <dia:attribute name="obj_pos">
-          <dia:point val="12,15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.95,14.95;20.85,19.65"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="12,15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="8.8000000000000007"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="4.5999999999999996"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#8f8f8f"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O49">
-          <dia:attribute name="obj_pos">
-            <dia:point val="12.3,15.85"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="12.25,15.8;16.35,18.9"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="12.3,15.85"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="4"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="3"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3fa9bd"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.20000000000000001"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O50">
-          <dia:attribute name="obj_pos">
-            <dia:point val="14.3,16.85"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="13.125,16.25;15.475,18.8"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#Best
-Path
-Selection#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="0.80000000000000004"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="14.3,16.85"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="1"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:object type="Standard - Box" version="0" id="O51">
-        <dia:attribute name="obj_pos">
-          <dia:point val="17.85,15.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.8,15.85;20.5,18.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="17.85,15.9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2.6000000000000147"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2.8500000000000005"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#3fa9bd"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O52">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.1,17.2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.075,16.6;20.125,18.35"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Loc-RIB
-For B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.1,17.2"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Line" version="0" id="O53">
-        <dia:attribute name="obj_pos">
-          <dia:point val="16.3,17.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="16.1476,16.3227;18.0161,18.3273"/>
-        </dia:attribute>
-        <dia:attribute name="conn_endpoints">
-          <dia:point val="16.3,17.35"/>
-          <dia:point val="17.85,17.325"/>
-        </dia:attribute>
-        <dia:attribute name="numcp">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="line_width">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_length">
-          <dia:real val="0.59999999999999998"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_width">
-          <dia:real val="0.99999999999999967"/>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O54">
-      <dia:attribute name="obj_pos">
-        <dia:point val="0.666667,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="0.566667,11.9;4.1,21.5"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="0.666667,12"/>
-        <dia:point val="0.666667,21"/>
-        <dia:point val="4,21"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O14" connection="0"/>
-        <dia:connection handle="1" to="O55" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O55">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,20"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,19.95;6.05,22.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,20"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#00c0bb"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O56">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,21.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,20.3;5.4,21.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,21.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O57">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,21"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.9,20.5;8.1,21.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,21"/>
-        <dia:point val="8,21"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O55" connection="4"/>
-        <dia:connection handle="1" to="O65" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O58">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,17"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,16.95;6.05,19.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,17"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#00c0bb"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O59">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,18.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,17.3;5.4,18.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,18.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O60">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,21"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.85865,18.3581;12.7734,21.1413"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,21"/>
-        <dia:point val="12.3586,18.7914"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O65" connection="4"/>
-        <dia:connection handle="1" to="O49" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O61">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,14"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,13.95;10.05,16.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,14"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O62">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,15.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,14.3;9.35,15.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,15.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O63">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,17"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,16.95;10.05,19.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,17"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O64">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,18.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,17.3;9.35,18.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,18.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O65">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,20"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,19.95;10.05,22.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,20"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O66">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,21.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,20.3;9.35,21.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,21.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O67">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,24"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,23.95;10.05,26.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,24"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O68">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,25.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,24.3;9.4,25.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,25.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O69">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,30"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,29.95;10.05,32.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,30"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O70">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,31.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,30.3;9.4,31.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,31.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O71">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,27"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,26.95;10.05,29.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,27"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O72">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,28.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,27.3;9.4,28.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,28.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O73">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,30"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,29.95;6.05,32.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,30"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#00c0bb"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O74">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,31.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,30.3;5.4,31.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,31.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O75">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,27"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,26.95;6.05,29.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,27"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#00c0bb"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O76">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,28.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,27.3;5.35,28.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,28.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O77">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,34"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,33.95;10.05,36.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,34"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O78">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,35.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,34.3;9.4,35.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,35.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O79">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,40"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,39.95;10.05,42.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,40"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O80">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,41.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,40.3;9.4,41.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,41.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O81">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,37"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,36.95;10.05,39.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,37"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O82">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.65,38.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.65,37.3;9.4,38.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.65,38.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O83">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,37"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,36.95;6.05,39.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,37"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#00c0bb"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O84">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,38.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,37.3;5.35,38.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,38.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O85">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,40"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,39.95;6.05,42.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,40"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#00c0bb"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O86">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.65,41.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.65,40.3;5.4,41.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.65,41.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O87">
-      <dia:attribute name="obj_pos">
-        <dia:point val="1.5,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="1.4,8.9;4.1,18.5"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="1.5,9"/>
-        <dia:point val="1.5,18"/>
-        <dia:point val="4,18"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O11" connection="1"/>
-        <dia:connection handle="1" to="O58" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O88">
-      <dia:attribute name="obj_pos">
-        <dia:point val="1.5,9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="1.4,8.9;4.1,41.5"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="1.5,9"/>
-        <dia:point val="1.5,41"/>
-        <dia:point val="4,41"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O11" connection="1"/>
-        <dia:connection handle="1" to="O85" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O89">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.75,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.65,5.9;4.14142,28.1"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="2.75,6"/>
-        <dia:point val="2.75,28"/>
-        <dia:point val="4,28"/>
-        <dia:point val="4,28"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-        <dia:enum val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O75" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O90">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.75,6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.65,5.9;4.14142,38.1"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="2.75,6"/>
-        <dia:point val="2.75,38"/>
-        <dia:point val="4,38"/>
-        <dia:point val="4,38"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-        <dia:enum val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O83" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O91">
-      <dia:attribute name="obj_pos">
-        <dia:point val="0.666667,12"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="0.566667,11.9;4.1,31.5"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="0.666667,12"/>
-        <dia:point val="0.666667,31"/>
-        <dia:point val="4,31"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O14" connection="0"/>
-        <dia:connection handle="1" to="O73" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O92">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-0.285714,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-0.385714,2.9;8.1,15.5"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="-0.285714,3"/>
-        <dia:point val="-0.285714,15"/>
-        <dia:point val="8,15"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O6" connection="0"/>
-        <dia:connection handle="1" to="O61" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O93">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-0.285714,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-0.385714,2.9;8.1,25.5"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="-0.285714,3"/>
-        <dia:point val="-0.285714,25"/>
-        <dia:point val="8,25"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O6" connection="0"/>
-        <dia:connection handle="1" to="O67" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - ZigZagLine" version="0" id="O94">
-      <dia:attribute name="obj_pos">
-        <dia:point val="-0.285714,3"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="-0.385714,2.9;8.1,35.5"/>
-      </dia:attribute>
-      <dia:attribute name="orth_points">
-        <dia:point val="-0.285714,3"/>
-        <dia:point val="-0.285714,35"/>
-        <dia:point val="8,35"/>
-      </dia:attribute>
-      <dia:attribute name="orth_orient">
-        <dia:enum val="1"/>
-        <dia:enum val="0"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O6" connection="0"/>
-        <dia:connection handle="1" to="O77" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O95">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,31"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.9,30.5;8.1,31.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,31"/>
-        <dia:point val="8,31"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O73" connection="4"/>
-        <dia:connection handle="1" to="O69" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O96">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,31"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.8654,29.3008;12.6756,31.1346"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,31"/>
-        <dia:point val="12.3586,29.7914"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O69" connection="4"/>
-        <dia:connection handle="1" to="O37" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O97">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,41"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.8654,39.3008;12.6756,41.1346"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,41"/>
-        <dia:point val="12.3586,39.7914"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O79" connection="4"/>
-        <dia:connection handle="1" to="O43" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O98">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,41"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.9,40.5;8.1,41.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,41"/>
-        <dia:point val="8,41"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O85" connection="4"/>
-        <dia:connection handle="1" to="O79" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O99">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,18"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.87657,16.8416;12.5322,18.1234"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,18"/>
-        <dia:point val="12.3,17.35"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O63" connection="4"/>
-        <dia:connection handle="1" to="O49" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O100">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,18"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.9,17.5;8.1,18.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,18"/>
-        <dia:point val="8,18"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O58" connection="4"/>
-        <dia:connection handle="1" to="O63" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O101">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,28"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.9,27.5;8.1,28.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,28"/>
-        <dia:point val="8,28"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O75" connection="4"/>
-        <dia:connection handle="1" to="O71" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O102">
-      <dia:attribute name="obj_pos">
-        <dia:point val="6,38"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="5.9,37.5;8.1,38.5"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="6,38"/>
-        <dia:point val="8,38"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O83" connection="4"/>
-        <dia:connection handle="1" to="O81" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O103">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,38"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.88609,37.8406;12.4741,38.8594"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,38"/>
-        <dia:point val="12.3,38.35"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O81" connection="4"/>
-        <dia:connection handle="1" to="O43" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O104">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,28"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.88609,27.8406;12.4741,28.8594"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,28"/>
-        <dia:point val="12.3,28.35"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="3"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O71" connection="4"/>
-        <dia:connection handle="1" to="O37" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O105">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,15"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.87074,14.8707;12.6317,16.4111"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,15"/>
-        <dia:point val="12.3586,15.9086"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O61" connection="4"/>
-        <dia:connection handle="1" to="O49" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O106">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,25"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.85936,24.8594;12.7509,27.3602"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,25"/>
-        <dia:point val="12.3586,26.9086"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O67" connection="4"/>
-        <dia:connection handle="1" to="O37" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O107">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,35"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.85936,34.8594;12.7509,37.3602"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="10,35"/>
-        <dia:point val="12.3586,36.9086"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#e5aa2a"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O77" connection="4"/>
-        <dia:connection handle="1" to="O43" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O108">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20.45,17.325"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="20.3481,16.7482;24.5095,17.7518"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20.45,17.325"/>
-        <dia:point val="24.4,17.25"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#3c8d37"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O51" connection="4"/>
-        <dia:connection handle="1" to="O123" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O109">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20.45,28.325"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="20.3494,27.8494;24.4532,28.8506"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20.45,28.325"/>
-        <dia:point val="24.35,28.35"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#972360"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O39" connection="4"/>
-        <dia:connection handle="1" to="O126" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O110">
-      <dia:attribute name="obj_pos">
-        <dia:point val="20.45,38.325"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="20.3494,37.8494;24.4411,38.8506"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="20.45,38.325"/>
-        <dia:point val="24.3379,38.35"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#618ccd"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O45" connection="4"/>
-        <dia:connection handle="1" to="O134" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O111">
-        <dia:attribute name="obj_pos">
-          <dia:point val="16,43"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="15.95,42.95;25.05,46.735"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="16,43"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.6849999999999952"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#b7b2b2"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O112">
-        <dia:attribute name="obj_pos">
-          <dia:point val="22,45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="22,44.4;22,45.35"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>##</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="22,45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O113">
-        <dia:attribute name="obj_pos">
-          <dia:point val="21.45,44.7"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="18.15,43.65;24.75,46.7"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Export Policy
-of RS-Client X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="21.45,44.7"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Box" version="0" id="O114">
-        <dia:attribute name="obj_pos">
-          <dia:point val="16.3,43.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="16.25,43.3;18.35,45.4"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="16.3,43.35"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#00c0bb"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O115">
-        <dia:attribute name="obj_pos">
-          <dia:point val="17.015,44.735"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.015,43.685;17.715,45.335"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="17.015,44.735"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O116">
-        <dia:attribute name="obj_pos">
-          <dia:point val="27,43"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="26.95,42.95;36.05,46.735"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="27,43"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.6849999999999952"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#b7b2b2"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O117">
-        <dia:attribute name="obj_pos">
-          <dia:point val="33,45"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="33,44.4;33,45.35"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>##</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="33,45"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O118">
-        <dia:attribute name="obj_pos">
-          <dia:point val="32.45,44.7"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="29.15,43.65;35.75,46.7"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Import Policy
-of RS-Client X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="32.45,44.7"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Box" version="0" id="O119">
-        <dia:attribute name="obj_pos">
-          <dia:point val="27.3,43.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="27.25,43.3;29.35,45.4"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="27.3,43.35"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="2"/>
-        </dia:attribute>
-        <dia:attribute name="inner_color">
-          <dia:color val="#a8e400"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="corner_radius">
-          <dia:real val="0.29999999999999999"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O120">
-        <dia:attribute name="obj_pos">
-          <dia:point val="28.015,44.735"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="28.015,43.685;28.715,45.335"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#X#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1.3999999999999999"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="28.015,44.735"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Line" version="0" id="O121">
-        <dia:attribute name="obj_pos">
-          <dia:point val="26.4,17.25"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="26.3,16.75;30.5,17.75"/>
-        </dia:attribute>
-        <dia:attribute name="conn_endpoints">
-          <dia:point val="26.4,17.25"/>
-          <dia:point val="30.4,17.25"/>
-        </dia:attribute>
-        <dia:attribute name="numcp">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="line_color">
-          <dia:color val="#3c8d37"/>
-        </dia:attribute>
-        <dia:attribute name="line_width">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow">
-          <dia:enum val="22"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_length">
-          <dia:real val="0.5"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_width">
-          <dia:real val="0.5"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O122">
-        <dia:attribute name="obj_pos">
-          <dia:point val="30.4,17.25"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="30.4,16.5;35.3,17.7"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#To RS-Client B#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="30.4,17.25"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O123">
-          <dia:attribute name="obj_pos">
-            <dia:point val="24.4,16.25"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="24.35,16.2;26.45,18.3"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="24.4,16.25"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3756d7"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O124">
-          <dia:attribute name="obj_pos">
-            <dia:point val="25.1,17.7"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="25.1,16.65;25.8,18.3"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#B#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="25.1,17.7"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Line" version="0" id="O125">
-        <dia:attribute name="obj_pos">
-          <dia:point val="26.35,28.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="26.2488,27.8988;30.5561,28.9012"/>
-        </dia:attribute>
-        <dia:attribute name="conn_endpoints">
-          <dia:point val="26.35,28.35"/>
-          <dia:point val="30.45,28.4"/>
-        </dia:attribute>
-        <dia:attribute name="numcp">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="line_color">
-          <dia:color val="#972360"/>
-        </dia:attribute>
-        <dia:attribute name="line_width">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow">
-          <dia:enum val="22"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_length">
-          <dia:real val="0.5"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_width">
-          <dia:real val="0.5"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O126">
-          <dia:attribute name="obj_pos">
-            <dia:point val="24.35,27.35"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="24.3,27.3;26.4,29.4"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="24.35,27.35"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="2"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3756d7"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O127">
-          <dia:attribute name="obj_pos">
-            <dia:point val="24.95,28.8"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="24.95,27.75;25.7,29.4"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#C#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="24.95,28.8"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:object type="Standard - Text" version="0" id="O128">
-        <dia:attribute name="obj_pos">
-          <dia:point val="30.35,28.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="30.35,27.6;35.3,28.8"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#To RS-Client C#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="30.35,28.35"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O129">
-          <dia:attribute name="obj_pos">
-            <dia:point val="25.0879,6.59393"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="25.0379,6.54393;27.05,8.55606"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="25.0879,6.59393"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="1.9121320343559631"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="1.9121320343559645"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3756d7"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O130">
-          <dia:attribute name="obj_pos">
-            <dia:point val="25.65,8.04393"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="25.65,6.99393;26.35,8.64393"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#A#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="25.65,8.04393"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:group>
-        <dia:object type="Standard - Line" version="0" id="O131">
-          <dia:attribute name="obj_pos">
-            <dia:point val="27,7.55"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="26.8988,7.09885;31.306,8.10117"/>
-          </dia:attribute>
-          <dia:attribute name="conn_endpoints">
-            <dia:point val="27,7.55"/>
-            <dia:point val="31.2001,7.60001"/>
-          </dia:attribute>
-          <dia:attribute name="numcp">
-            <dia:int val="1"/>
-          </dia:attribute>
-          <dia:attribute name="line_color">
-            <dia:color val="#e5aa2a"/>
-          </dia:attribute>
-          <dia:attribute name="line_width">
-            <dia:real val="0.20000000000000001"/>
-          </dia:attribute>
-          <dia:attribute name="end_arrow">
-            <dia:enum val="22"/>
-          </dia:attribute>
-          <dia:attribute name="end_arrow_length">
-            <dia:real val="0.5"/>
-          </dia:attribute>
-          <dia:attribute name="end_arrow_width">
-            <dia:real val="0.5"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O132">
-          <dia:attribute name="obj_pos">
-            <dia:point val="31.3,7.6"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="31.3,6.85;34.6,8.05"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#To Peer A#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="31.3,7.6"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Line" version="0" id="O133">
-        <dia:attribute name="obj_pos">
-          <dia:point val="26.25,38.35"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="26.1499,37.8438;30.5386,38.844"/>
-        </dia:attribute>
-        <dia:attribute name="conn_endpoints">
-          <dia:point val="26.25,38.35"/>
-          <dia:point val="30.4379,38.3439"/>
-        </dia:attribute>
-        <dia:attribute name="numcp">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="line_color">
-          <dia:color val="#618ccd"/>
-        </dia:attribute>
-        <dia:attribute name="line_width">
-          <dia:real val="0.20000000000000001"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow">
-          <dia:enum val="22"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_length">
-          <dia:real val="0.5"/>
-        </dia:attribute>
-        <dia:attribute name="end_arrow_width">
-          <dia:real val="0.5"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:group>
-        <dia:object type="Standard - Box" version="0" id="O134">
-          <dia:attribute name="obj_pos">
-            <dia:point val="24.3379,37.3939"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="24.2879,37.3439;26.3,39.356"/>
-          </dia:attribute>
-          <dia:attribute name="elem_corner">
-            <dia:point val="24.3379,37.3939"/>
-          </dia:attribute>
-          <dia:attribute name="elem_width">
-            <dia:real val="1.9121320343559631"/>
-          </dia:attribute>
-          <dia:attribute name="elem_height">
-            <dia:real val="1.9121320343559649"/>
-          </dia:attribute>
-          <dia:attribute name="inner_color">
-            <dia:color val="#3756d7"/>
-          </dia:attribute>
-          <dia:attribute name="show_background">
-            <dia:boolean val="true"/>
-          </dia:attribute>
-          <dia:attribute name="corner_radius">
-            <dia:real val="0.29999999999999999"/>
-          </dia:attribute>
-        </dia:object>
-        <dia:object type="Standard - Text" version="0" id="O135">
-          <dia:attribute name="obj_pos">
-            <dia:point val="24.95,38.7939"/>
-          </dia:attribute>
-          <dia:attribute name="obj_bb">
-            <dia:rectangle val="24.95,37.7439;25.7,39.3939"/>
-          </dia:attribute>
-          <dia:attribute name="text">
-            <dia:composite type="text">
-              <dia:attribute name="string">
-                <dia:string>#D#</dia:string>
-              </dia:attribute>
-              <dia:attribute name="font">
-                <dia:font family="sans" style="0" name="Helvetica"/>
-              </dia:attribute>
-              <dia:attribute name="height">
-                <dia:real val="1.3999999999999999"/>
-              </dia:attribute>
-              <dia:attribute name="pos">
-                <dia:point val="24.95,38.7939"/>
-              </dia:attribute>
-              <dia:attribute name="color">
-                <dia:color val="#000000"/>
-              </dia:attribute>
-              <dia:attribute name="alignment">
-                <dia:enum val="0"/>
-              </dia:attribute>
-            </dia:composite>
-          </dia:attribute>
-        </dia:object>
-      </dia:group>
-      <dia:object type="Standard - Text" version="0" id="O136">
-        <dia:attribute name="obj_pos">
-          <dia:point val="30.4379,38.3439"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="30.4379,37.5939;35.3879,38.7939"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#To RS-Client D#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="1"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="30.4379,38.3439"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-rs-processing.png b/doc/fig-rs-processing.png
deleted file mode 100644 (file)
index 1f77263..0000000
Binary files a/doc/fig-rs-processing.png and /dev/null differ
diff --git a/doc/fig-rs-processing.txt b/doc/fig-rs-processing.txt
deleted file mode 100644 (file)
index eafe146..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From Peer A
- | From RS-Client B
- |  | From RS-Client C
- |  |  | From RS-Client D
- |  |  |  |
- |  |  |  |           Main / Normal RIB
- |  |  |  |      ________________________________
- |  |  |  |     /    _________     _________     \
- |  |  |  +--->|(D)-|Best     |   | Main    |     |
- |  |  +--|--->|(C)-|Path     |-->|Local-RIB|->[A]|--->To Peer A
- |  +--|--|--->|(B)-|Selection|   |         |     |
- +--|--|--|--->|(A)-|_________|   |_________|     |
- |  |  |  |     \________________________________/
- |  |  |  |
- |  |  |  |          ________________________________
- |  |  |  |          /    _________     _________     \
- |  |  |  +--->*D*->|{B}-|Best     |   |RS-Client|     |
- |  |  +--|--->*C*->|{B}-|Path     |-->|Local-RIB|->[B]|--->To RS-Client B
- |  |  |  |         |    |Selection|   |  for B  |     |
- +--|--|--|-------->|{B}-|_________|   |_________|     |
- |  |  |  |          \________________________________/
- |  |  |  |
- |  |  |  |          ________________________________
- |  |  |  |          /    _________     _________     \
- |  |  |  +--->*D*->|{C}-|Best     |   |RS-Client|     |
- |  |  |  |         |    |Path     |-->|Local-RIB|->[C]|--->To RS-Client C
- |  +--|--|--->*B*->|{C}-|Selection|   |  for C  |     |
- +--|--|--|-------->|{C}-|_________|   |_________|     |
- |  |  |             \________________________________/
- |  |  |
- |  |  |              ________________________________
- |  |  |             /    _________     _________     \
- |  |  |            |    |Best     |   |RS-Client|     |
- |  |  +------>*C*->|{D}-|Path     |-->|Local-RIB|->[D]|--->To RS-Client D
- |  +--------->*B*->|{D}-|Selection|   |  for D  |     |
- +----------------->|{D}-|_________|   |_________|     |
-                     \________________________________/
-
-
-Key:  (X) - 'In'  Filter applied to Peer X's announcements before
-            considering announcement for the normal main Local-RIB
-      [X] - 'Out' Filter applied to announcements to Peer X
-      *X* - 'Export' Filter of RS-Client X, to apply X's policies
-           before its routes may be considered for other RS-Clients
-            RIBs.
-      {X} - 'Import' Filter of RS-Client X, to apply X's policies
-            on routes before allowing them into X's RIB.
diff --git a/doc/fig-vnc-commercial-route-reflector.dia b/doc/fig-vnc-commercial-route-reflector.dia
deleted file mode 100644 (file)
index 0da5bd1..0000000
+++ /dev/null
@@ -1,794 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#Letter#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true" active="true">
-    <dia:object type="Standard - Box" version="0" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O4">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O5">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O6">
-      <dia:attribute name="obj_pos">
-        <dia:point val="22.5347,32.178"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.4642,23.359;30.091,32.2485"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="22.5347,32.178"/>
-        <dia:point val="30.0205,23.4295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O7">
-      <dia:attribute name="obj_pos">
-        <dia:point val="43.1205,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="36.8099,23.3599;43.1901,32.5401"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="43.1205,32.4705"/>
-        <dia:point val="36.8795,23.4295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O8">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.5501,5.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="16.5501,5.5"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 4
-VN 172.16.4.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,31.125"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O5" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 5
-VN 172.16.130.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,36.0225"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 6
-VN 172.16.132.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,40.92"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O3" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 7
-VN 172.16.6.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,30.975"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O2" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O13">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 8
-VN 172.16.8.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,35.8725"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O1" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O14">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 9
-VN 172.16.134.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,40.77"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O0" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O15">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86406,31.0665;15.979,32.529"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,31.125"/>
-        <dia:point val="15.9205,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O5" connection="4"/>
-        <dia:connection handle="1" to="O24" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O16">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.87151,35.8489;14.5511,36.0736"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,36.0225"/>
-        <dia:point val="14.5,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="4"/>
-        <dia:connection handle="1" to="O24" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O17">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86276,39.2697;15.9803,40.9798"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,40.92"/>
-        <dia:point val="15.9205,39.3295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O3" connection="4"/>
-        <dia:connection handle="1" to="O24" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O18">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="49.9204,30.9159;57.2892,32.5296"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,30.975"/>
-        <dia:point val="49.9795,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O2" connection="3"/>
-        <dia:connection handle="1" to="O22" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O19">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="51.3498,35.8223;57.2803,35.9502"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,35.8725"/>
-        <dia:point val="51.4,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O1" connection="3"/>
-        <dia:connection handle="1" to="O22" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O20">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="50.9399,37.8657;57.2963,40.8362"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,40.77"/>
-        <dia:point val="51.0061,37.9319"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O0" connection="3"/>
-        <dia:connection handle="1" to="O22" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O21">
-      <dia:attribute name="obj_pos">
-        <dia:point val="34.8,20.45"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="34.8,19.855;34.8,20.6025"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="34.8,20.45"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O22">
-        <dia:attribute name="obj_pos">
-          <dia:point val="41.7,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="41.65,31;51.45,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="41.7,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O23">
-        <dia:attribute name="obj_pos">
-          <dia:point val="46.55,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="44.2012,35.305;48.8987,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 3
-192.168.1.102#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="46.55,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O22" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O24">
-        <dia:attribute name="obj_pos">
-          <dia:point val="14.5,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="14.45,31;24.25,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="14.5,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O25">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.35,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.0013,35.305;21.6988,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 2
-192.168.1.101#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.35,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O24" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O26">
-        <dia:attribute name="obj_pos">
-          <dia:point val="28.6,15.15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="28.55,15.1;38.35,24.9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="28.6,15.15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O27">
-        <dia:attribute name="obj_pos">
-          <dia:point val="33.45,19.7"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="30.9863,19.105;35.9138,21.4525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Commercial Router
-Route Reflector
-192.168.1.104#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="33.45,19.7"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-vnc-commercial-route-reflector.png b/doc/fig-vnc-commercial-route-reflector.png
deleted file mode 100644 (file)
index ca8a248..0000000
Binary files a/doc/fig-vnc-commercial-route-reflector.png and /dev/null differ
diff --git a/doc/fig-vnc-commercial-route-reflector.txt b/doc/fig-vnc-commercial-route-reflector.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/doc/fig-vnc-frr-route-reflector.dia b/doc/fig-vnc-frr-route-reflector.dia
deleted file mode 100644 (file)
index 634f0b1..0000000
+++ /dev/null
@@ -1,763 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#Letter#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true" active="true">
-    <dia:object type="Standard - Box" version="0" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O4">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O5">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O6">
-      <dia:attribute name="obj_pos">
-        <dia:point val="22.5347,32.178"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.4642,23.359;30.091,32.2485"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="22.5347,32.178"/>
-        <dia:point val="30.0205,23.4295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O7">
-      <dia:attribute name="obj_pos">
-        <dia:point val="43.1205,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="36.8099,23.3599;43.1901,32.5401"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="43.1205,32.4705"/>
-        <dia:point val="36.8795,23.4295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O8">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.5501,5.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="16.5501,5.5"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 4
-VN 172.16.4.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,31.125"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O5" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 5
-VN 172.16.130.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,36.0225"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 6
-VN 172.16.132.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,40.92"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O3" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 7
-VN 172.16.6.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,30.975"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O2" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O13">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 8
-VN 172.16.8.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,35.8725"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O1" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O14">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 9
-VN 172.16.134.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,40.77"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O0" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O15">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86406,31.0665;15.979,32.529"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,31.125"/>
-        <dia:point val="15.9205,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O5" connection="4"/>
-        <dia:connection handle="1" to="O23" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O16">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.87151,35.8489;14.5511,36.0736"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,36.0225"/>
-        <dia:point val="14.5,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="4"/>
-        <dia:connection handle="1" to="O23" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O17">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86276,39.2697;15.9803,40.9798"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,40.92"/>
-        <dia:point val="15.9205,39.3295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O3" connection="4"/>
-        <dia:connection handle="1" to="O23" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O18">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="49.9204,30.9159;57.2892,32.5296"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,30.975"/>
-        <dia:point val="49.9795,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O2" connection="3"/>
-        <dia:connection handle="1" to="O25" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O19">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="51.3498,35.8223;57.2803,35.9502"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,35.8725"/>
-        <dia:point val="51.4,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O1" connection="3"/>
-        <dia:connection handle="1" to="O25" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O20">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="50.9399,37.8657;57.2963,40.8362"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,40.77"/>
-        <dia:point val="51.0061,37.9319"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O0" connection="3"/>
-        <dia:connection handle="1" to="O25" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O21">
-        <dia:attribute name="obj_pos">
-          <dia:point val="28.6,15.15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="28.55,15.1;38.35,24.9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="28.6,15.15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O22">
-        <dia:attribute name="obj_pos">
-          <dia:point val="33.45,20"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="29.9225,19.405;36.9775,20.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#BGP Route Reflector 1
-192.168.1.100#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="33.45,20"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O21" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O23">
-        <dia:attribute name="obj_pos">
-          <dia:point val="14.5,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="14.45,31;24.25,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="14.5,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O24">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.35,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.0013,35.305;21.6988,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 2
-192.168.1.101#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.35,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O23" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O25">
-        <dia:attribute name="obj_pos">
-          <dia:point val="41.7,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="41.65,31;51.45,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="41.7,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O26">
-        <dia:attribute name="obj_pos">
-          <dia:point val="46.55,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="44.2012,35.305;48.8987,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 3
-192.168.1.102#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="46.55,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O25" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-vnc-frr-route-reflector.png b/doc/fig-vnc-frr-route-reflector.png
deleted file mode 100644 (file)
index 4770521..0000000
Binary files a/doc/fig-vnc-frr-route-reflector.png and /dev/null differ
diff --git a/doc/fig-vnc-frr-route-reflector.txt b/doc/fig-vnc-frr-route-reflector.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/doc/fig-vnc-gw-rr.dia b/doc/fig-vnc-gw-rr.dia
deleted file mode 100644 (file)
index dab27f7..0000000
+++ /dev/null
@@ -1,1155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#Letter#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true" active="true">
-    <dia:object type="Standard - Text" version="1" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.5501,5.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="16.5501,5.5"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="29.5,14.85"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="29.45,14.8;47.05,14.9"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="29.5,14.85"/>
-        <dia:point val="47,14.85"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O31" connection="4"/>
-        <dia:connection handle="1" to="O37" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="29.5,28.85"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="29.45,28.8;47.05,28.9"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="29.5,28.85"/>
-        <dia:point val="47,28.85"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O33" connection="4"/>
-        <dia:connection handle="1" to="O35" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24.65,24"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24.6,19.65;24.7,24.05"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="24.65,24"/>
-        <dia:point val="24.65,19.7"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O33" connection="1"/>
-        <dia:connection handle="1" to="O31" connection="6"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O4">
-      <dia:attribute name="obj_pos">
-        <dia:point val="51.85,24"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="51.8,19.65;51.9,24.05"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="51.85,24"/>
-        <dia:point val="51.85,19.7"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O35" connection="1"/>
-        <dia:connection handle="1" to="O37" connection="6"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O5">
-      <dia:attribute name="obj_pos">
-        <dia:point val="47.4933,26.6076"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="47.4933,26.6076"/>
-        <dia:point val="29.0067,17.0924"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O6">
-      <dia:attribute name="obj_pos">
-        <dia:point val="29.0067,26.6076"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="29.0067,26.6076"/>
-        <dia:point val="47.4933,17.0924"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O7">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.8594,28.6941"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.8084,28.6431;19.8026,28.803"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.8594,28.6941"/>
-        <dia:point val="19.7516,28.752"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O11" connection="8"/>
-        <dia:connection handle="1" to="O33" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O8">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.81,32.625"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.7433,30.909;20.302,32.6917"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.81,32.625"/>
-        <dia:point val="20.2352,30.9757"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O13" connection="4"/>
-        <dia:connection handle="1" to="O33" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="59.9506,31.4965"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.4448,30.3087;60.0137,31.5595"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="59.9506,31.4965"/>
-        <dia:point val="56.5079,30.3717"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O17" connection="8"/>
-        <dia:connection handle="1" to="O35" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="59.9506,28.6923"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.6981,28.6413;60.0016,28.8056"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="59.9506,28.6923"/>
-        <dia:point val="56.7491,28.7546"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O15" connection="8"/>
-        <dia:connection handle="1" to="O35" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,27"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.95,26.95;16.86,30.3"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="10,27"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="13.405,28.625"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="11.1862,28.03;15.6237,29.5775"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 1
-VN 172.16.1.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="13.405,28.625"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O11" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O13">
-        <dia:attribute name="obj_pos">
-          <dia:point val="10,31"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="9.95,30.95;16.86,34.3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="10,31"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.8100000000000023"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.2500000000000018"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O14">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13.405,32.625"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.1862,32.03;15.6237,33.5775"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVE 2
-VN 172.16.2.1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="13.405,32.625"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O13" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O15">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60,27"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="59.95,26.95;66.86,30.3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60,27"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.8100000000000023"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.2500000000000018"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O16">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63.405,28.625"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.1863,28.03;65.6238,29.5775"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVE 3
-VN 172.16.3.1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63.405,28.625"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O15" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O17">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60,31"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="59.95,30.95;66.86,34.3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60,31"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.8100000000000023"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.2500000000000018"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O18">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63.405,32.625"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.1863,32.03;65.6238,33.5775"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVE 4
-VN 172.16.4.1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63.405,32.625"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O17" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O19">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.1073,12.7602"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.0469,12.6997;19.9513,13.7462"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.1073,12.7602"/>
-        <dia:point val="19.8909,13.6858"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O23" connection="8"/>
-        <dia:connection handle="1" to="O31" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O20">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.1475,18.0292"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.0831,16.5016;20.1253,18.0935"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.1475,18.0292"/>
-        <dia:point val="20.0609,16.5659"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O25" connection="8"/>
-        <dia:connection handle="1" to="O31" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O21">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.0374,12.8937"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.5559,12.8335;60.0976,13.7714"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="60.0374,12.8937"/>
-        <dia:point val="56.6162,13.7112"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O27" connection="8"/>
-        <dia:connection handle="1" to="O37" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O22">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.3187,18.1413"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.3502,16.5594;60.3834,18.206"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="60.3187,18.1413"/>
-        <dia:point val="56.4149,16.6241"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O29" connection="8"/>
-        <dia:connection handle="1" to="O37" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O23">
-        <dia:attribute name="obj_pos">
-          <dia:point val="9.85,8.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="9.8,8.8;16.2,15.2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="9.85,8.85"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O24">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13,12"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.27,11.405;14.73,12.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 1
-172.16.1.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="13,12"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O23" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O25">
-        <dia:attribute name="obj_pos">
-          <dia:point val="10,16"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="9.95,15.95;16.35,22.35"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="10,16"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O26">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13,19"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.27,18.405;14.73,19.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 2
-172.16.2.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="13,19"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O27">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60,9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="59.95,8.95;66.35,15.35"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60,9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O28">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63,12"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.27,11.405;64.73,12.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 3
-172.16.3.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63,12"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O29">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60.15,16.15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="60.1,16.1;66.5,22.5"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60.15,16.15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O30">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63.3,19.3"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.57,18.705;65.03,20.2525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 4
-172.16.4.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63.3,19.3"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O29" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O31">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.8,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="19.75,9.95;29.55,19.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="19.8,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O32">
-        <dia:attribute name="obj_pos">
-          <dia:point val="24.65,14.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="22.15,14.255;27.15,15.8025"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#VNC Gateway 1
-192.168.1.101#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="24.65,14.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O31" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O33">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.8,24"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="19.75,23.95;29.55,33.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="19.8,24"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O34">
-        <dia:attribute name="obj_pos">
-          <dia:point val="24.65,28.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="21.4637,28.255;27.8362,29.8025"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 1 (NVA)
-192.168.1.103#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="24.65,28.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O33" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O35">
-        <dia:attribute name="obj_pos">
-          <dia:point val="47,24"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="46.95,23.95;56.75,33.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="47,24"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O36">
-        <dia:attribute name="obj_pos">
-          <dia:point val="51.85,28.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="48.6638,28.255;55.0363,29.8025"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 2 (NVA)
-192.168.1.104#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="51.85,28.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O35" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O37">
-        <dia:attribute name="obj_pos">
-          <dia:point val="47,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="46.95,9.95;56.75,19.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="47,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O38">
-        <dia:attribute name="obj_pos">
-          <dia:point val="51.85,14.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="49.35,14.255;54.35,15.8025"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#VNC Gateway 2
-192.168.1.102#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="51.85,14.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O37" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O39">
-        <dia:attribute name="obj_pos">
-          <dia:point val="35,36"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="34.95,35.95;41.35,42.35"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="35,36"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O40">
-        <dia:attribute name="obj_pos">
-          <dia:point val="38.15,39.15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="35.8087,38.555;40.4912,40.1025"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RR
-192.168.1.105#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="38.15,39.15"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O39" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O41">
-      <dia:attribute name="obj_pos">
-        <dia:point val="40.7075,37.2272"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="40.6374,31.7234;48.005,37.2972"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="40.7075,37.2272"/>
-        <dia:point val="47.935,31.7934"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O39" connection="8"/>
-        <dia:connection handle="1" to="O35" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O42">
-      <dia:attribute name="obj_pos">
-        <dia:point val="35.6122,37.2137"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="28.4724,31.7497;35.6822,37.2838"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="35.6122,37.2137"/>
-        <dia:point val="28.5425,31.8198"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O39" connection="8"/>
-        <dia:connection handle="1" to="O33" connection="8"/>
-      </dia:connections>
-    </dia:object>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-vnc-gw-rr.png b/doc/fig-vnc-gw-rr.png
deleted file mode 100644 (file)
index 7ae0630..0000000
Binary files a/doc/fig-vnc-gw-rr.png and /dev/null differ
diff --git a/doc/fig-vnc-gw-rr.txt b/doc/fig-vnc-gw-rr.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/doc/fig-vnc-gw.dia b/doc/fig-vnc-gw.dia
deleted file mode 100644 (file)
index 8270e20..0000000
+++ /dev/null
@@ -1,1058 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#Letter#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true" active="true">
-    <dia:object type="Standard - Text" version="1" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.5501,5.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="16.5501,5.5"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="29.5,14.85"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="29.45,14.8;47.05,14.9"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="29.5,14.85"/>
-        <dia:point val="47,14.85"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O31" connection="4"/>
-        <dia:connection handle="1" to="O37" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="29.5,28.85"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="29.45,28.8;47.05,28.9"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="29.5,28.85"/>
-        <dia:point val="47,28.85"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O33" connection="4"/>
-        <dia:connection handle="1" to="O35" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24.65,24"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24.6,19.65;24.7,24.05"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="24.65,24"/>
-        <dia:point val="24.65,19.7"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O33" connection="1"/>
-        <dia:connection handle="1" to="O31" connection="6"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O4">
-      <dia:attribute name="obj_pos">
-        <dia:point val="51.85,24"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="51.8,19.65;51.9,24.05"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="51.85,24"/>
-        <dia:point val="51.85,19.7"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O35" connection="1"/>
-        <dia:connection handle="1" to="O37" connection="6"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O5">
-      <dia:attribute name="obj_pos">
-        <dia:point val="47.4933,26.6076"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="47.4933,26.6076"/>
-        <dia:point val="29.0067,17.0924"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O6">
-      <dia:attribute name="obj_pos">
-        <dia:point val="29.0067,26.6076"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="29.0067,26.6076"/>
-        <dia:point val="47.4933,17.0924"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O7">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.8594,28.6941"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.8084,28.6431;19.8026,28.803"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.8594,28.6941"/>
-        <dia:point val="19.7516,28.752"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O11" connection="8"/>
-        <dia:connection handle="1" to="O33" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O8">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.81,32.625"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.7433,30.909;20.302,32.6917"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.81,32.625"/>
-        <dia:point val="20.2352,30.9757"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O13" connection="4"/>
-        <dia:connection handle="1" to="O33" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="59.9506,31.4965"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.4448,30.3087;60.0137,31.5595"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="59.9506,31.4965"/>
-        <dia:point val="56.5079,30.3717"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O17" connection="8"/>
-        <dia:connection handle="1" to="O35" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="59.9506,28.6923"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.6981,28.6413;60.0016,28.8056"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="59.9506,28.6923"/>
-        <dia:point val="56.7491,28.7546"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O15" connection="8"/>
-        <dia:connection handle="1" to="O35" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="10,27"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9.95,26.95;16.86,30.3"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="10,27"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="13.405,28.625"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="11.1862,28.03;15.6237,29.5775"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 1
-VN 172.16.1.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="13.405,28.625"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O11" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O13">
-        <dia:attribute name="obj_pos">
-          <dia:point val="10,31"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="9.95,30.95;16.86,34.3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="10,31"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.8100000000000023"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.2500000000000018"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O14">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13.405,32.625"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.1862,32.03;15.6237,33.5775"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVE 2
-VN 172.16.2.1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="13.405,32.625"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O13" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O15">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60,27"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="59.95,26.95;66.86,30.3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60,27"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.8100000000000023"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.2500000000000018"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O16">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63.405,28.625"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.1863,28.03;65.6238,29.5775"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVE 3
-VN 172.16.3.1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63.405,28.625"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O15" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O17">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60,31"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="59.95,30.95;66.86,34.3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60,31"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.8100000000000023"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3.2500000000000018"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O18">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63.405,32.625"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.1863,32.03;65.6238,33.5775"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVE 4
-VN 172.16.4.1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63.405,32.625"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O17" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O19">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.1073,12.7602"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.0469,12.6997;19.9513,13.7462"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.1073,12.7602"/>
-        <dia:point val="19.8909,13.6858"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O23" connection="8"/>
-        <dia:connection handle="1" to="O31" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O20">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.1475,18.0292"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.0831,16.5016;20.1253,18.0935"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="16.1475,18.0292"/>
-        <dia:point val="20.0609,16.5659"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O25" connection="8"/>
-        <dia:connection handle="1" to="O31" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O21">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.0374,12.8937"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.5559,12.8335;60.0976,13.7714"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="60.0374,12.8937"/>
-        <dia:point val="56.6162,13.7112"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O27" connection="8"/>
-        <dia:connection handle="1" to="O37" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O22">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.3187,18.1413"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="56.3502,16.5594;60.3834,18.206"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="60.3187,18.1413"/>
-        <dia:point val="56.4149,16.6241"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O29" connection="8"/>
-        <dia:connection handle="1" to="O37" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O23">
-        <dia:attribute name="obj_pos">
-          <dia:point val="9.85,8.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="9.8,8.8;16.2,15.2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="9.85,8.85"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O24">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13,12"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.27,11.405;14.73,12.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 1
-172.16.1.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="13,12"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O23" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O25">
-        <dia:attribute name="obj_pos">
-          <dia:point val="10,16"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="9.95,15.95;16.35,22.35"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="10,16"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O26">
-        <dia:attribute name="obj_pos">
-          <dia:point val="13,19"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="11.27,18.405;14.73,19.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 2
-172.16.2.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="13,19"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O27">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60,9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="59.95,8.95;66.35,15.35"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60,9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O28">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63,12"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.27,11.405;64.73,12.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 3
-172.16.3.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63,12"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O29">
-        <dia:attribute name="obj_pos">
-          <dia:point val="60.15,16.15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="60.1,16.1;66.5,22.5"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="60.15,16.15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="6.2999992370605469"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O30">
-        <dia:attribute name="obj_pos">
-          <dia:point val="63.3,19.3"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="61.57,18.705;65.03,20.2525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#CE 4
-172.16.4.2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="63.3,19.3"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O29" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O31">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.8,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="19.75,9.95;29.55,19.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="19.8,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O32">
-        <dia:attribute name="obj_pos">
-          <dia:point val="24.65,14.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="22.15,14.2363;27.1687,15.8399"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#VNC Gateway 1
-192.168.1.101#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="24.65,14.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O31" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O33">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.8,24"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="19.75,23.95;29.55,33.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="19.8,24"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O34">
-        <dia:attribute name="obj_pos">
-          <dia:point val="24.65,28.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="21.4637,28.2363;27.8549,29.8399"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 1 (NVA)
-192.168.1.103#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="24.65,28.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O33" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O35">
-        <dia:attribute name="obj_pos">
-          <dia:point val="47,24"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="46.95,23.95;56.75,33.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="47,24"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O36">
-        <dia:attribute name="obj_pos">
-          <dia:point val="51.85,28.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="48.6638,28.2363;55.0549,29.8399"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 2 (NVA)
-192.168.1.104#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="51.85,28.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O35" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O37">
-        <dia:attribute name="obj_pos">
-          <dia:point val="47,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="46.95,9.95;56.75,19.75"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="47,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O38">
-        <dia:attribute name="obj_pos">
-          <dia:point val="51.85,14.85"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="49.35,14.2363;54.3687,15.8399"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#VNC Gateway 2
-192.168.1.102#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="51.85,14.85"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O37" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-vnc-gw.png b/doc/fig-vnc-gw.png
deleted file mode 100644 (file)
index df8f23f..0000000
Binary files a/doc/fig-vnc-gw.png and /dev/null differ
diff --git a/doc/fig-vnc-gw.txt b/doc/fig-vnc-gw.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/doc/fig-vnc-mesh.dia b/doc/fig-vnc-mesh.dia
deleted file mode 100644 (file)
index a8f702f..0000000
+++ /dev/null
@@ -1,1071 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#Letter#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true" active="true">
-    <dia:object type="Standard - Line" version="0" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24.2,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24.15,35.85;41.75,35.95"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="24.2,35.9"/>
-        <dia:point val="41.7,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="22.5347,32.178"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.4642,23.359;30.091,32.2485"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="22.5347,32.178"/>
-        <dia:point val="30.0205,23.4295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="43.1205,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="36.8099,23.3599;43.1901,32.5401"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="43.1205,32.4705"/>
-        <dia:point val="36.8795,23.4295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.5501,5.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="16.5501,5.5"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O4">
-      <dia:attribute name="obj_pos">
-        <dia:point val="23.2957,9.72508"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="23.225,9.65437;30.0912,16.6412"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="23.2957,9.72508"/>
-        <dia:point val="30.0205,16.5705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O33" connection="8"/>
-        <dia:connection handle="1" to="O15" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O5">
-      <dia:attribute name="obj_pos">
-        <dia:point val="33.0601,9.675"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="33.0098,9.62471;33.1421,15.1003"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="33.0601,9.675"/>
-        <dia:point val="33.0918,15.05"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O35" connection="6"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O6">
-      <dia:attribute name="obj_pos">
-        <dia:point val="44.4726,9.675"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="36.8089,9.60437;44.5432,16.6411"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="44.4726,9.675"/>
-        <dia:point val="36.8795,16.5705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O37" connection="6"/>
-        <dia:connection handle="1" to="O15" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O7">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86406,31.0665;15.979,32.529"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,31.125"/>
-        <dia:point val="15.9205,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O27" connection="4"/>
-        <dia:connection handle="1" to="O17" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O8">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.87151,35.8489;14.5511,36.0736"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,36.0225"/>
-        <dia:point val="14.5,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O29" connection="4"/>
-        <dia:connection handle="1" to="O17" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86276,39.2697;15.9803,40.9798"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,40.92"/>
-        <dia:point val="15.9205,39.3295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O31" connection="4"/>
-        <dia:connection handle="1" to="O17" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="49.9204,30.9159;57.2892,32.5296"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,30.975"/>
-        <dia:point val="49.9795,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O21" connection="3"/>
-        <dia:connection handle="1" to="O19" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="51.3498,35.8223;57.2803,35.9502"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,35.8725"/>
-        <dia:point val="51.4,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O23" connection="3"/>
-        <dia:connection handle="1" to="O19" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="50.9399,37.8657;57.2963,40.8362"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,40.77"/>
-        <dia:point val="51.0061,37.9319"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O25" connection="3"/>
-        <dia:connection handle="1" to="O19" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O13">
-      <dia:attribute name="obj_pos">
-        <dia:point val="62.55,31.6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="62.55,31.005;62.55,31.7525"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="62.55,31.6"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O14">
-      <dia:attribute name="obj_pos">
-        <dia:point val="59.65,31.65"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="59.65,31.055;59.65,31.8025"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="59.65,31.65"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O15">
-        <dia:attribute name="obj_pos">
-          <dia:point val="28.6,15.15"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="28.55,15.1;38.35,24.9"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="28.6,15.15"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O16">
-        <dia:attribute name="obj_pos">
-          <dia:point val="33.45,20"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="31.1025,19.405;35.7975,20.9525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 1
-192.168.1.100#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="33.45,20"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O15" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O17">
-        <dia:attribute name="obj_pos">
-          <dia:point val="14.5,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="14.45,31;24.25,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="14.5,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O18">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.35,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="17.0013,35.305;21.6988,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 2
-192.168.1.101#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.35,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O17" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O19">
-        <dia:attribute name="obj_pos">
-          <dia:point val="41.7,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="41.65,31;51.45,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="41.7,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O20">
-        <dia:attribute name="obj_pos">
-          <dia:point val="46.55,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="44.2012,35.305;48.8987,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 3
-192.168.1.102#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="46.55,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O19" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Box" version="0" id="O21">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O22">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 7
-VN 172.16.6.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,30.975"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O21" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O23">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O24">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 8
-VN 172.16.8.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,35.8725"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O23" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O25">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O26">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 9
-VN 172.16.134.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,40.77"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O25" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O27">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O28">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 4
-VN 172.16.4.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,31.125"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O27" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O29">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O30">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 5
-VN 172.16.130.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,36.0225"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O29" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O31">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O32">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 6
-VN 172.16.132.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,40.92"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O31" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O33">
-      <dia:attribute name="obj_pos">
-        <dia:point val="18.2451,6.425"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="18.1951,6.375;25.1051,9.725"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="18.2451,6.425"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O34">
-      <dia:attribute name="obj_pos">
-        <dia:point val="21.6501,8.05"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="19.4251,7.43631;23.8938,9.03988"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 1
-VN 172.16.0.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="21.6501,8.05"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O33" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O35">
-      <dia:attribute name="obj_pos">
-        <dia:point val="29.6551,6.425"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="29.6051,6.375;36.5151,9.725"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="29.6551,6.425"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O36">
-      <dia:attribute name="obj_pos">
-        <dia:point val="33.0601,8.05"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="30.8338,7.43631;35.305,9.03988"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 2
-VN 172.16.2.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="33.0601,8.05"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O35" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O37">
-      <dia:attribute name="obj_pos">
-        <dia:point val="41.0676,6.425"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="41.0176,6.375;47.9276,9.725"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="41.0676,6.425"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O38">
-      <dia:attribute name="obj_pos">
-        <dia:point val="44.4726,8.05"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="41.8376,7.43631;47.1263,9.03988"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 3
-VN 172.16.128.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="44.4726,8.05"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O37" connection="8"/>
-      </dia:connections>
-    </dia:object>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-vnc-mesh.png b/doc/fig-vnc-mesh.png
deleted file mode 100644 (file)
index fa0762d..0000000
Binary files a/doc/fig-vnc-mesh.png and /dev/null differ
diff --git a/doc/fig-vnc-mesh.txt b/doc/fig-vnc-mesh.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/doc/fig-vnc-redundant-route-reflectors.dia b/doc/fig-vnc-redundant-route-reflectors.dia
deleted file mode 100644 (file)
index 4065b8b..0000000
+++ /dev/null
@@ -1,871 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#Letter#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.5399999618530273"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true" active="true">
-    <dia:object type="Standard - Box" version="0" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,39.145"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,34.2475"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="57.2301,29.35"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,39.295"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O4">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,34.3975"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Box" version="0" id="O5">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
-      </dia:attribute>
-      <dia:attribute name="elem_corner">
-        <dia:point val="2.1126,29.5"/>
-      </dia:attribute>
-      <dia:attribute name="elem_width">
-        <dia:real val="6.8100000000000023"/>
-      </dia:attribute>
-      <dia:attribute name="elem_height">
-        <dia:real val="3.2500000000000018"/>
-      </dia:attribute>
-      <dia:attribute name="show_background">
-        <dia:boolean val="true"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O6">
-      <dia:attribute name="obj_pos">
-        <dia:point val="22.5347,32.178"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.4648,17.4572;42.6316,32.2479"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="22.5347,32.178"/>
-        <dia:point val="42.5617,17.5271"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O26" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O7">
-      <dia:attribute name="obj_pos">
-        <dia:point val="43.1205,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="22.6348,17.9948;43.1902,32.5402"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="43.1205,32.4705"/>
-        <dia:point val="22.7045,18.0645"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="1" to="O24" connection="7"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O8">
-      <dia:attribute name="obj_pos">
-        <dia:point val="16.5501,5.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>##</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="16.5501,5.5"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="0"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O9">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 4
-VN 172.16.4.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,31.125"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O5" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O10">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 5
-VN 172.16.130.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,36.0225"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O11">
-      <dia:attribute name="obj_pos">
-        <dia:point val="5.5176,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 6
-VN 172.16.132.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="5.5176,40.92"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O3" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 7
-VN 172.16.6.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,30.975"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O2" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O13">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 8
-VN 172.16.8.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,35.8725"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O1" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Text" version="1" id="O14">
-      <dia:attribute name="obj_pos">
-        <dia:point val="60.6351,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
-      </dia:attribute>
-      <dia:attribute name="text">
-        <dia:composite type="text">
-          <dia:attribute name="string">
-            <dia:string>#NVE 9
-VN 172.16.134.1#</dia:string>
-          </dia:attribute>
-          <dia:attribute name="font">
-            <dia:font family="sans" style="0" name="Helvetica"/>
-          </dia:attribute>
-          <dia:attribute name="height">
-            <dia:real val="0.80000000000000004"/>
-          </dia:attribute>
-          <dia:attribute name="pos">
-            <dia:point val="60.6351,40.77"/>
-          </dia:attribute>
-          <dia:attribute name="color">
-            <dia:color val="#000000"/>
-          </dia:attribute>
-          <dia:attribute name="alignment">
-            <dia:enum val="1"/>
-          </dia:attribute>
-        </dia:composite>
-      </dia:attribute>
-      <dia:attribute name="valign">
-        <dia:enum val="3"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O0" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O15">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,31.125"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86398,31.0664;15.9041,32.5291"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,31.125"/>
-        <dia:point val="15.8455,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O5" connection="4"/>
-        <dia:connection handle="1" to="O28" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O16">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,36.0225"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.8715,35.8489;14.4761,36.0736"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,36.0225"/>
-        <dia:point val="14.425,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="4"/>
-        <dia:connection handle="1" to="O28" connection="3"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O17">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.9226,40.92"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="8.86267,39.2696;15.9054,40.9799"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.9226,40.92"/>
-        <dia:point val="15.8455,39.3295"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O3" connection="4"/>
-        <dia:connection handle="1" to="O28" connection="5"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O18">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,30.975"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="49.8855,30.916;57.2891,32.5295"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,30.975"/>
-        <dia:point val="49.9445,32.4705"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O2" connection="3"/>
-        <dia:connection handle="1" to="O30" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O19">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,35.8725"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="51.3148,35.8223;57.2803,35.9502"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,35.8725"/>
-        <dia:point val="51.365,35.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O1" connection="3"/>
-        <dia:connection handle="1" to="O30" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O20">
-      <dia:attribute name="obj_pos">
-        <dia:point val="57.2301,40.77"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="50.9097,37.8613;57.2963,40.8362"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="57.2301,40.77"/>
-        <dia:point val="50.9759,37.9275"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O0" connection="3"/>
-        <dia:connection handle="1" to="O30" connection="8"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O21">
-      <dia:attribute name="obj_pos">
-        <dia:point val="24.25,15.05"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="24.1999,14.9999;41.6501,15.1501"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="24.25,15.05"/>
-        <dia:point val="41.6,15.1"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O22">
-      <dia:attribute name="obj_pos">
-        <dia:point val="19.1,31"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="18.9998,19.5998;19.1502,31.0502"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="19.1,31"/>
-        <dia:point val="19.05,19.65"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O23">
-      <dia:attribute name="obj_pos">
-        <dia:point val="46.4,19.6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="46.35,19.55;46.45,30.95"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="46.4,19.6"/>
-        <dia:point val="46.4,30.9"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O24">
-        <dia:attribute name="obj_pos">
-          <dia:point val="14.425,9.785"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="14.375,9.735;24.175,19.535"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="14.425,9.785"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O25">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.275,14.635"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="15.7475,14.04;22.8025,15.5875"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#BGP Route Reflector 1
-192.168.1.100#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.275,14.635"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O24" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O26">
-        <dia:attribute name="obj_pos">
-          <dia:point val="41.665,9.785"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="41.615,9.735;51.415,19.535"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="41.665,9.785"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O27">
-        <dia:attribute name="obj_pos">
-          <dia:point val="46.565,14.285"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="44.1013,13.69;49.0288,16.0375"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#Commercial Router
-Route Reflector
-192.168.1.104#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="46.565,14.285"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O28">
-        <dia:attribute name="obj_pos">
-          <dia:point val="14.425,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="14.375,31;24.175,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="14.425,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000007629394531"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O29">
-        <dia:attribute name="obj_pos">
-          <dia:point val="19.275,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="16.9262,35.305;21.6238,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 2
-192.168.1.101#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="19.275,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O28" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O30">
-        <dia:attribute name="obj_pos">
-          <dia:point val="41.665,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="41.615,31;51.415,40.8"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="41.665,31.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="9.7000026702880859"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="1" id="O31">
-        <dia:attribute name="obj_pos">
-          <dia:point val="46.515,35.9"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="44.1662,35.305;48.8637,36.8525"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#NVA 3
-192.168.1.102#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="0.80000000000000004"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="46.515,35.9"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="1"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-        <dia:attribute name="valign">
-          <dia:enum val="3"/>
-        </dia:attribute>
-        <dia:connections>
-          <dia:connection handle="0" to="O30" connection="8"/>
-        </dia:connections>
-      </dia:object>
-    </dia:group>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig-vnc-redundant-route-reflectors.png b/doc/fig-vnc-redundant-route-reflectors.png
deleted file mode 100644 (file)
index 06a27b6..0000000
Binary files a/doc/fig-vnc-redundant-route-reflectors.png and /dev/null differ
diff --git a/doc/fig-vnc-redundant-route-reflectors.txt b/doc/fig-vnc-redundant-route-reflectors.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/doc/fig_topologies_full.dia b/doc/fig_topologies_full.dia
deleted file mode 100644 (file)
index 7ec3398..0000000
+++ /dev/null
@@ -1,533 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#A4#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true">
-    <dia:object type="Standard - Line" version="0" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8,11.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.9,11;8.1,12"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8,11.5"/>
-        <dia:point val="3,11.5"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O6" connection="3"/>
-        <dia:connection handle="1" to="O8" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="1.5,10"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="1,4.9;2,10.1"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="1.5,10"/>
-        <dia:point val="1.5,5"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O8" connection="1"/>
-        <dia:connection handle="1" to="O10" connection="6"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="2.56066,4.56066"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.1364,4.1364;8.8636,10.8636"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="2.56066,4.56066"/>
-        <dia:point val="8.43934,10.4393"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O10" connection="7"/>
-        <dia:connection handle="1" to="O6" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.43934,4.56066"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.1364,4.1364;8.8636,10.8636"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.43934,4.56066"/>
-        <dia:point val="2.56066,10.4393"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="5"/>
-        <dia:connection handle="1" to="O8" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O4">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,1.95;11.05,5.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O5">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.15,4.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.15,2.555;10.945,5.04"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.15,4.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O6">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,9.95;11.05,13.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O7">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.15,12.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.105,10.555;10.9,13.04"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF4#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.15,12.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O8">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="-0.05,9.95;3.05,13.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="0,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O9">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0.2,12.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="0.2,10.555;2.995,13.04"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF3#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="0.2,12.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O10">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0,2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="-0.05,1.95;3.05,5.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="0,2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O11">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0.2,4.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="0.155,2.555;2.95,5.04"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="0.2,4.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:object type="Standard - Line" version="0" id="O12">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8,3.5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.9,3;8.1,4"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8,3.5"/>
-        <dia:point val="3,3.5"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="3"/>
-        <dia:connection handle="1" to="O10" connection="4"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O13">
-      <dia:attribute name="obj_pos">
-        <dia:point val="9.5,5"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="9,4.9;10,10.1"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="9.5,5"/>
-        <dia:point val="9.5,10"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="6"/>
-        <dia:connection handle="1" to="O6" connection="1"/>
-      </dia:connections>
-    </dia:object>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig_topologies_full.png b/doc/fig_topologies_full.png
deleted file mode 100644 (file)
index d39e5e2..0000000
Binary files a/doc/fig_topologies_full.png and /dev/null differ
diff --git a/doc/fig_topologies_full.txt b/doc/fig_topologies_full.txt
deleted file mode 100644 (file)
index cc8025a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-(RF1)--(RF2)
-  | \  / |
-  |  \/  |
-  |  /\  |
-  | /  \ |
-(RF3)--(RF4)
diff --git a/doc/fig_topologies_rs.dia b/doc/fig_topologies_rs.dia
deleted file mode 100644 (file)
index f8aa18d..0000000
+++ /dev/null
@@ -1,499 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
-  <dia:diagramdata>
-    <dia:attribute name="background">
-      <dia:color val="#ffffff"/>
-    </dia:attribute>
-    <dia:attribute name="pagebreak">
-      <dia:color val="#000099"/>
-    </dia:attribute>
-    <dia:attribute name="paper">
-      <dia:composite type="paper">
-        <dia:attribute name="name">
-          <dia:string>#A4#</dia:string>
-        </dia:attribute>
-        <dia:attribute name="tmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="bmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="lmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="rmargin">
-          <dia:real val="2.8222000598907471"/>
-        </dia:attribute>
-        <dia:attribute name="is_portrait">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-        <dia:attribute name="scaling">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="fitto">
-          <dia:boolean val="false"/>
-        </dia:attribute>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="grid">
-      <dia:composite type="grid">
-        <dia:attribute name="width_x">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="width_y">
-          <dia:real val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_x">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:attribute name="visible_y">
-          <dia:int val="1"/>
-        </dia:attribute>
-        <dia:composite type="color"/>
-      </dia:composite>
-    </dia:attribute>
-    <dia:attribute name="color">
-      <dia:color val="#d8e5e5"/>
-    </dia:attribute>
-    <dia:attribute name="guides">
-      <dia:composite type="guides">
-        <dia:attribute name="hguides"/>
-        <dia:attribute name="vguides"/>
-      </dia:composite>
-    </dia:attribute>
-  </dia:diagramdata>
-  <dia:layer name="Background" visible="true">
-    <dia:object type="Standard - Line" version="0" id="O0">
-      <dia:attribute name="obj_pos">
-        <dia:point val="4,8.45"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.09695,8.07589;4.46371,10.8134"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="4,8.45"/>
-        <dia:point val="2.56066,10.4393"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="5"/>
-        <dia:connection handle="1" to="O10" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O1">
-      <dia:attribute name="obj_pos">
-        <dia:point val="4,6.6"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="2.09449,4.19064;4.46617,6.97002"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="4,6.6"/>
-        <dia:point val="2.56066,4.56066"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="0"/>
-        <dia:connection handle="1" to="O12" connection="7"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O2">
-      <dia:attribute name="obj_pos">
-        <dia:point val="7,8.45"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="6.53629,8.07589;8.90305,10.8134"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="7,8.45"/>
-        <dia:point val="8.43934,10.4393"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O4" connection="7"/>
-        <dia:connection handle="1" to="O8" connection="0"/>
-      </dia:connections>
-    </dia:object>
-    <dia:object type="Standard - Line" version="0" id="O3">
-      <dia:attribute name="obj_pos">
-        <dia:point val="8.43934,4.56066"/>
-      </dia:attribute>
-      <dia:attribute name="obj_bb">
-        <dia:rectangle val="6.53383,4.19064;8.90551,6.97002"/>
-      </dia:attribute>
-      <dia:attribute name="conn_endpoints">
-        <dia:point val="8.43934,4.56066"/>
-        <dia:point val="7,6.6"/>
-      </dia:attribute>
-      <dia:attribute name="numcp">
-        <dia:int val="1"/>
-      </dia:attribute>
-      <dia:attribute name="line_color">
-        <dia:color val="#ff0000"/>
-      </dia:attribute>
-      <dia:attribute name="line_width">
-        <dia:real val="0.20000000000000001"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="start_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow">
-        <dia:enum val="22"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_length">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:attribute name="end_arrow_width">
-        <dia:real val="0.5"/>
-      </dia:attribute>
-      <dia:connections>
-        <dia:connection handle="0" to="O6" connection="5"/>
-        <dia:connection handle="1" to="O4" connection="2"/>
-      </dia:connections>
-    </dia:object>
-    <dia:group>
-      <dia:object type="Standard - Box" version="0" id="O4">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4,6.6"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="3.95,6.55;7.05,8.5"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="4,6.6"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="1.8500000000000014"/>
-        </dia:attribute>
-        <dia:attribute name="show_background">
-          <dia:boolean val="true"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O5">
-        <dia:attribute name="obj_pos">
-          <dia:point val="4.55,8"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="4.55,6.55;6.55,8.9"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RS#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="4.55,8"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O6">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,1.95;11.05,5.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O7">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.15,4.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.15,2.6;10.9,4.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF2#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.15,4.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O8">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="7.95,9.95;11.05,13.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="8,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O9">
-        <dia:attribute name="obj_pos">
-          <dia:point val="8.15,12.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="8.15,10.6;10.9,12.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF4#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="8.15,12.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O10">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0,10"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="-0.05,9.95;3.05,13.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="0,10"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O11">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0.2,12.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="0.2,10.6;2.95,12.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF3#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="0.2,12.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-    <dia:group>
-      <dia:object type="Standard - Ellipse" version="0" id="O12">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0,2"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="-0.05,1.95;3.05,5.05"/>
-        </dia:attribute>
-        <dia:attribute name="elem_corner">
-          <dia:point val="0,2"/>
-        </dia:attribute>
-        <dia:attribute name="elem_width">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="elem_height">
-          <dia:real val="3"/>
-        </dia:attribute>
-        <dia:attribute name="aspect">
-          <dia:enum val="2"/>
-        </dia:attribute>
-      </dia:object>
-      <dia:object type="Standard - Text" version="0" id="O13">
-        <dia:attribute name="obj_pos">
-          <dia:point val="0.2,4.05"/>
-        </dia:attribute>
-        <dia:attribute name="obj_bb">
-          <dia:rectangle val="0.2,2.6;2.95,4.95"/>
-        </dia:attribute>
-        <dia:attribute name="text">
-          <dia:composite type="text">
-            <dia:attribute name="string">
-              <dia:string>#RF1#</dia:string>
-            </dia:attribute>
-            <dia:attribute name="font">
-              <dia:font family="sans" style="0" name="Helvetica"/>
-            </dia:attribute>
-            <dia:attribute name="height">
-              <dia:real val="2"/>
-            </dia:attribute>
-            <dia:attribute name="pos">
-              <dia:point val="0.2,4.05"/>
-            </dia:attribute>
-            <dia:attribute name="color">
-              <dia:color val="#000000"/>
-            </dia:attribute>
-            <dia:attribute name="alignment">
-              <dia:enum val="0"/>
-            </dia:attribute>
-          </dia:composite>
-        </dia:attribute>
-      </dia:object>
-    </dia:group>
-  </dia:layer>
-</dia:diagram>
diff --git a/doc/fig_topologies_rs.png b/doc/fig_topologies_rs.png
deleted file mode 100644 (file)
index 014225c..0000000
Binary files a/doc/fig_topologies_rs.png and /dev/null differ
diff --git a/doc/fig_topologies_rs.txt b/doc/fig_topologies_rs.txt
deleted file mode 100644 (file)
index 0bd1730..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-(RF1)  (RF2)
-    \  /
-    [RS]
-    /  \
-(RF3)  (RF4)
diff --git a/doc/figures/cligraph.svg b/doc/figures/cligraph.svg
new file mode 100644 (file)
index 0000000..a1dd017
--- /dev/null
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.38.0 (20140413.2041)
+ -->
+<!-- Title: %3 Pages: 1 -->
+<svg width="300pt" height="980pt"
+ viewBox="0.00 0.00 299.50 980.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 976)">
+<title>%3</title>
+<polygon fill="white" stroke="none" points="-4,4 -4,-976 295.5,-976 295.5,4 -4,4"/>
+<!-- n0xd46960 -->
+<g id="node1" class="node"><title>n0xd46960</title>
+<polygon fill="#ccffcc" stroke="black" points="158,-972 86,-972 86,-936 158,-936 158,-972"/>
+<text text-anchor="start" x="94" y="-952.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">START_TKN</text>
+</g>
+<!-- n0xd46be0 -->
+<g id="node2" class="node"><title>n0xd46be0</title>
+<polygon fill="#ffffff" stroke="black" points="159,-900 85,-900 85,-864 159,-864 159,-900"/>
+<text text-anchor="start" x="93" y="-885.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">WORD_TKN</text>
+<text text-anchor="start" x="101.5" y="-875.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+<text text-anchor="start" x="105.5" y="-875.2" font-family="Fira Mono" font-weight="bold" font-size="11.00" fill="#0055ff">show</text>
+<text text-anchor="start" x="138.5" y="-875.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+</g>
+<!-- n0xd46960&#45;&gt;n0xd46be0 -->
+<g id="edge1" class="edge"><title>n0xd46960&#45;&gt;n0xd46be0</title>
+<path fill="none" stroke="black" d="M122,-935.697C122,-927.983 122,-918.712 122,-910.112"/>
+<polygon fill="black" stroke="black" points="125.5,-910.104 122,-900.104 118.5,-910.104 125.5,-910.104"/>
+</g>
+<!-- n0xd47f80 -->
+<g id="node3" class="node"><title>n0xd47f80</title>
+<polygon fill="#aaddff" stroke="black" points="156.5,-828 87.5,-828 87.5,-792 156.5,-792 156.5,-828"/>
+<text text-anchor="start" x="95.5" y="-808.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">FORK_TKN</text>
+</g>
+<!-- n0xd46be0&#45;&gt;n0xd47f80 -->
+<g id="edge2" class="edge"><title>n0xd46be0&#45;&gt;n0xd47f80</title>
+<path fill="none" stroke="black" d="M122,-863.697C122,-855.983 122,-846.712 122,-838.112"/>
+<polygon fill="black" stroke="black" points="125.5,-838.104 122,-828.104 118.5,-838.104 125.5,-838.104"/>
+</g>
+<!-- n0xd47c70 -->
+<g id="node4" class="node"><title>n0xd47c70</title>
+<polygon fill="#ffffff" stroke="black" points="127,-756 53,-756 53,-720 127,-720 127,-756"/>
+<text text-anchor="start" x="61" y="-741.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">WORD_TKN</text>
+<text text-anchor="start" x="80.5" y="-731.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+<text text-anchor="start" x="84.5" y="-731.2" font-family="Fira Mono" font-weight="bold" font-size="11.00" fill="#0055ff">ip</text>
+<text text-anchor="start" x="95.5" y="-731.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+</g>
+<!-- n0xd47f80&#45;&gt;n0xd47c70 -->
+<g id="edge3" class="edge"><title>n0xd47f80&#45;&gt;n0xd47c70</title>
+<path fill="none" stroke="black" d="M114.09,-791.697C110.447,-783.728 106.046,-774.1 102.006,-765.264"/>
+<polygon fill="black" stroke="black" points="105.16,-763.744 97.8191,-756.104 98.7936,-766.654 105.16,-763.744"/>
+</g>
+<!-- n0xd484c0 -->
+<g id="node5" class="node"><title>n0xd484c0</title>
+<polygon fill="#ddaaff" stroke="black" points="153.5,-684 90.5,-684 90.5,-648 153.5,-648 153.5,-684"/>
+<text text-anchor="start" x="98.5" y="-664.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">JOIN_TKN</text>
+</g>
+<!-- n0xd47f80&#45;&gt;n0xd484c0 -->
+<g id="edge20" class="edge"><title>n0xd47f80&#45;&gt;n0xd484c0</title>
+<path fill="none" stroke="black" d="M127.824,-791.56C130.931,-781.33 134.431,-768.08 136,-756 138.06,-740.133 138.06,-735.867 136,-720 134.897,-711.506 132.839,-702.434 130.634,-694.24"/>
+<polygon fill="black" stroke="black" points="133.945,-693.087 127.824,-684.44 127.216,-695.017 133.945,-693.087"/>
+</g>
+<!-- n0xd47c70&#45;&gt;n0xd484c0 -->
+<g id="edge4" class="edge"><title>n0xd47c70&#45;&gt;n0xd484c0</title>
+<path fill="none" stroke="black" d="M97.9101,-719.697C101.553,-711.728 105.954,-702.1 109.994,-693.264"/>
+<polygon fill="black" stroke="black" points="113.206,-694.654 114.181,-684.104 106.84,-691.744 113.206,-694.654"/>
+</g>
+<!-- n0xd47ca0 -->
+<g id="node6" class="node"><title>n0xd47ca0</title>
+<polygon fill="#ffffff" stroke="black" points="159,-612 85,-612 85,-576 159,-576 159,-612"/>
+<text text-anchor="start" x="93" y="-597.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">WORD_TKN</text>
+<text text-anchor="start" x="106.5" y="-587.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+<text text-anchor="start" x="110.5" y="-587.2" font-family="Fira Mono" font-weight="bold" font-size="11.00" fill="#0055ff">bgp</text>
+<text text-anchor="start" x="133.5" y="-587.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+</g>
+<!-- n0xd484c0&#45;&gt;n0xd47ca0 -->
+<g id="edge5" class="edge"><title>n0xd484c0&#45;&gt;n0xd47ca0</title>
+<path fill="none" stroke="black" d="M122,-647.697C122,-639.983 122,-630.712 122,-622.112"/>
+<polygon fill="black" stroke="black" points="125.5,-622.104 122,-612.104 118.5,-622.104 125.5,-622.104"/>
+</g>
+<!-- n0xd48540 -->
+<g id="node7" class="node"><title>n0xd48540</title>
+<polygon fill="#ffffff" stroke="black" points="164.5,-540 79.5,-540 79.5,-504 164.5,-504 164.5,-540"/>
+<text text-anchor="start" x="93" y="-525.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">WORD_TKN</text>
+<text text-anchor="start" x="87.5" y="-515.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+<text text-anchor="start" x="91.5" y="-515.2" font-family="Fira Mono" font-weight="bold" font-size="11.00" fill="#0055ff">neighbors</text>
+<text text-anchor="start" x="152.5" y="-515.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+</g>
+<!-- n0xd47ca0&#45;&gt;n0xd48540 -->
+<g id="edge6" class="edge"><title>n0xd47ca0&#45;&gt;n0xd48540</title>
+<path fill="none" stroke="black" d="M122,-575.697C122,-567.983 122,-558.712 122,-550.112"/>
+<polygon fill="black" stroke="black" points="125.5,-550.104 122,-540.104 118.5,-550.104 125.5,-550.104"/>
+</g>
+<!-- n0xd490c0 -->
+<g id="node8" class="node"><title>n0xd490c0</title>
+<polygon fill="#aaddff" stroke="black" points="156.5,-468 87.5,-468 87.5,-432 156.5,-432 156.5,-468"/>
+<text text-anchor="start" x="95.5" y="-448.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">FORK_TKN</text>
+</g>
+<!-- n0xd48540&#45;&gt;n0xd490c0 -->
+<g id="edge7" class="edge"><title>n0xd48540&#45;&gt;n0xd490c0</title>
+<path fill="none" stroke="black" d="M122,-503.697C122,-495.983 122,-486.712 122,-478.112"/>
+<polygon fill="black" stroke="black" points="125.5,-478.104 122,-468.104 118.5,-478.104 125.5,-478.104"/>
+</g>
+<!-- n0xd48fc0 -->
+<g id="node9" class="node"><title>n0xd48fc0</title>
+<polygon fill="#ffffff" stroke="black" points="64,-396 0,-396 0,-360 64,-360 64,-396"/>
+<text text-anchor="start" x="8" y="-380.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">IPV4_TKN</text>
+<text text-anchor="start" x="15" y="-371.8" font-family="Fira Mono" font-size="9.00">A.B.C.D</text>
+</g>
+<!-- n0xd490c0&#45;&gt;n0xd48fc0 -->
+<g id="edge8" class="edge"><title>n0xd490c0&#45;&gt;n0xd48fc0</title>
+<path fill="none" stroke="black" d="M99.7528,-431.697C88.4181,-422.881 74.4698,-412.032 62.1811,-402.474"/>
+<polygon fill="black" stroke="black" points="64.0336,-399.481 53.9913,-396.104 59.736,-405.007 64.0336,-399.481"/>
+</g>
+<!-- n0xd491e0 -->
+<g id="node10" class="node"><title>n0xd491e0</title>
+<polygon fill="#ddaaff" stroke="black" points="153.5,-324 90.5,-324 90.5,-288 153.5,-288 153.5,-324"/>
+<text text-anchor="start" x="98.5" y="-304.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">JOIN_TKN</text>
+</g>
+<!-- n0xd490c0&#45;&gt;n0xd491e0 -->
+<g id="edge19" class="edge"><title>n0xd490c0&#45;&gt;n0xd491e0</title>
+<path fill="none" stroke="black" d="M117.536,-431.953C115.065,-421.63 112.248,-408.153 111,-396 109.366,-380.084 109.366,-375.916 111,-360 111.877,-351.455 113.531,-342.255 115.294,-333.958"/>
+<polygon fill="black" stroke="black" points="118.743,-334.573 117.536,-324.047 111.915,-333.028 118.743,-334.573"/>
+</g>
+<!-- n0xd49340 -->
+<g id="node15" class="node"><title>n0xd49340</title>
+<polygon fill="#ffffff" stroke="black" points="184,-396 120,-396 120,-360 184,-360 184,-396"/>
+<text text-anchor="start" x="128" y="-380.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">IPV6_TKN</text>
+<text text-anchor="start" x="135" y="-371.8" font-family="Fira Mono" font-size="9.00">X:X::X:X</text>
+</g>
+<!-- n0xd490c0&#45;&gt;n0xd49340 -->
+<g id="edge15" class="edge"><title>n0xd490c0&#45;&gt;n0xd49340</title>
+<path fill="none" stroke="black" d="M129.416,-431.697C132.794,-423.813 136.87,-414.304 140.623,-405.546"/>
+<polygon fill="black" stroke="black" points="143.947,-406.675 144.67,-396.104 137.513,-403.917 143.947,-406.675"/>
+</g>
+<!-- n0xd49480 -->
+<g id="node16" class="node"><title>n0xd49480</title>
+<polygon fill="#ffffff" stroke="black" points="291.5,-396 202.5,-396 202.5,-360 291.5,-360 291.5,-396"/>
+<text text-anchor="start" x="210.5" y="-380.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">VARIABLE_TKN</text>
+<text text-anchor="start" x="233" y="-371.8" font-family="Fira Mono" font-size="9.00">WORD</text>
+</g>
+<!-- n0xd490c0&#45;&gt;n0xd49480 -->
+<g id="edge17" class="edge"><title>n0xd490c0&#45;&gt;n0xd49480</title>
+<path fill="none" stroke="black" d="M152.578,-431.876C169.074,-422.639 189.624,-411.131 207.336,-401.212"/>
+<polygon fill="black" stroke="black" points="209.289,-404.13 216.304,-396.19 205.869,-398.022 209.289,-404.13"/>
+</g>
+<!-- n0xd48fc0&#45;&gt;n0xd491e0 -->
+<g id="edge9" class="edge"><title>n0xd48fc0&#45;&gt;n0xd491e0</title>
+<path fill="none" stroke="black" d="M54.2472,-359.697C65.5819,-350.881 79.5302,-340.032 91.8189,-330.474"/>
+<polygon fill="black" stroke="black" points="94.264,-333.007 100.009,-324.104 89.9664,-327.481 94.264,-333.007"/>
+</g>
+<!-- n0xd496e0 -->
+<g id="node11" class="node"><title>n0xd496e0</title>
+<polygon fill="#aaddff" stroke="black" points="156.5,-252 87.5,-252 87.5,-216 156.5,-216 156.5,-252"/>
+<text text-anchor="start" x="95.5" y="-232.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">FORK_TKN</text>
+</g>
+<!-- n0xd491e0&#45;&gt;n0xd496e0 -->
+<g id="edge10" class="edge"><title>n0xd491e0&#45;&gt;n0xd496e0</title>
+<path fill="none" stroke="black" d="M122,-287.697C122,-279.983 122,-270.712 122,-262.112"/>
+<polygon fill="black" stroke="black" points="125.5,-262.104 122,-252.104 118.5,-262.104 125.5,-262.104"/>
+</g>
+<!-- n0xd495e0 -->
+<g id="node12" class="node"><title>n0xd495e0</title>
+<polygon fill="#ffffff" stroke="black" points="127,-180 53,-180 53,-144 127,-144 127,-180"/>
+<text text-anchor="start" x="61" y="-165.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">WORD_TKN</text>
+<text text-anchor="start" x="73.5" y="-155.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+<text text-anchor="start" x="77.5" y="-155.2" font-family="Fira Mono" font-weight="bold" font-size="11.00" fill="#0055ff">json</text>
+<text text-anchor="start" x="102.5" y="-155.2" font-family="Fira Mono" font-size="9.00">&quot;</text>
+</g>
+<!-- n0xd496e0&#45;&gt;n0xd495e0 -->
+<g id="edge11" class="edge"><title>n0xd496e0&#45;&gt;n0xd495e0</title>
+<path fill="none" stroke="black" d="M114.09,-215.697C110.447,-207.728 106.046,-198.1 102.006,-189.264"/>
+<polygon fill="black" stroke="black" points="105.16,-187.744 97.8191,-180.104 98.7936,-190.654 105.16,-187.744"/>
+</g>
+<!-- n0xd497c0 -->
+<g id="node13" class="node"><title>n0xd497c0</title>
+<polygon fill="#ddaaff" stroke="black" points="153.5,-108 90.5,-108 90.5,-72 153.5,-72 153.5,-108"/>
+<text text-anchor="start" x="98.5" y="-88.8" font-family="Fira Mono" font-weight="bold" font-size="9.00">JOIN_TKN</text>
+</g>
+<!-- n0xd496e0&#45;&gt;n0xd497c0 -->
+<g id="edge14" class="edge"><title>n0xd496e0&#45;&gt;n0xd497c0</title>
+<path fill="none" stroke="black" d="M127.824,-215.56C130.931,-205.33 134.431,-192.08 136,-180 138.06,-164.133 138.06,-159.867 136,-144 134.897,-135.506 132.839,-126.434 130.634,-118.24"/>
+<polygon fill="black" stroke="black" points="133.945,-117.087 127.824,-108.44 127.216,-119.017 133.945,-117.087"/>
+</g>
+<!-- n0xd495e0&#45;&gt;n0xd497c0 -->
+<g id="edge12" class="edge"><title>n0xd495e0&#45;&gt;n0xd497c0</title>
+<path fill="none" stroke="black" d="M97.9101,-143.697C101.553,-135.728 105.954,-126.1 109.994,-117.264"/>
+<polygon fill="black" stroke="black" points="113.206,-118.654 114.181,-108.104 106.84,-115.744 113.206,-118.654"/>
+</g>
+<!-- end0xd49900 -->
+<g id="node14" class="node"><title>end0xd49900</title>
+<polygon fill="#ffddaa" stroke="black" points="149,-36 95,-36 95,-0 149,-0 149,-36"/>
+<text text-anchor="start" x="112.5" y="-15.8" font-family="Fira Mono" font-size="9.00">end</text>
+</g>
+<!-- n0xd497c0&#45;&gt;end0xd49900 -->
+<g id="edge13" class="edge"><title>n0xd497c0&#45;&gt;end0xd49900</title>
+<path fill="none" stroke="black" d="M122,-71.6966C122,-63.9827 122,-54.7125 122,-46.1124"/>
+<polygon fill="black" stroke="black" points="125.5,-46.1043 122,-36.1043 118.5,-46.1044 125.5,-46.1043"/>
+</g>
+<!-- n0xd49340&#45;&gt;n0xd491e0 -->
+<g id="edge16" class="edge"><title>n0xd49340&#45;&gt;n0xd491e0</title>
+<path fill="none" stroke="black" d="M144.584,-359.697C141.206,-351.813 137.13,-342.304 133.377,-333.546"/>
+<polygon fill="black" stroke="black" points="136.487,-331.917 129.33,-324.104 130.053,-334.675 136.487,-331.917"/>
+</g>
+<!-- n0xd49480&#45;&gt;n0xd491e0 -->
+<g id="edge18" class="edge"><title>n0xd49480&#45;&gt;n0xd491e0</title>
+<path fill="none" stroke="black" d="M216.422,-359.876C199.926,-350.639 179.376,-339.131 161.664,-329.212"/>
+<polygon fill="black" stroke="black" points="163.131,-326.022 152.696,-324.19 159.711,-332.13 163.131,-326.022"/>
+</g>
+</g>
+</svg>
diff --git a/doc/figures/fig-normal-processing.dia b/doc/figures/fig-normal-processing.dia
new file mode 100644 (file)
index 0000000..c9e8e68
--- /dev/null
@@ -0,0 +1,1738 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#A4#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="5"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="5"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true">
+    <dia:object type="Standard - Box" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="7.6,4.75"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="7.55,4.7;16.45,9.4"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="7.6,4.75"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="8.8000000000000007"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="4.5999999999999996"/>
+      </dia:attribute>
+      <dia:attribute name="inner_color">
+        <dia:color val="#8f8f8f"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20,2.95607"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="19.8989,2.49893;24.1055,3.50107"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20,2.95607"/>
+        <dia:point val="24,3"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O38" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="0,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-0.1,2.5;4.1,3.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="0,3"/>
+        <dia:point val="4,3"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O36" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="15.9914,5.70858"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="15.8513,2.57356;18.5463,5.84872"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="15.9914,5.70858"/>
+        <dia:point val="18.0879,2.95607"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O7" connection="2"/>
+        <dia:connection handle="1" to="O38" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.86018,2.86018;8.42045,6.03565"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,3"/>
+        <dia:point val="7.95858,5.65858"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O36" connection="4"/>
+        <dia:connection handle="1" to="O5" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O5">
+        <dia:attribute name="obj_pos">
+          <dia:point val="7.9,5.6"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.85,5.55;11.95,8.65"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="7.9,5.6"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="4"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3fa9bd"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O6">
+        <dia:attribute name="obj_pos">
+          <dia:point val="9.9,6.6"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.725,6;11.075,8.55"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Best
+Path
+Selection#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="9.9,6.6"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O7">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13.45,5.65"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="13.4,5.6;16.1,8.55"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="13.45,5.65"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2.6000000000000147"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2.8500000000000005"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3fa9bd"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O8">
+        <dia:attribute name="obj_pos">
+          <dia:point val="14.75,6.8"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="14.075,6.2;15.425,7.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Local
+RIB#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="14.75,6.8"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.86335,5.86335;8.23706,7.58282"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,6"/>
+        <dia:point val="7.9,7.1"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O34" connection="4"/>
+        <dia:connection handle="1" to="O5" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="19.9,5.5;24.1,6.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20,6"/>
+        <dia:point val="24,6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O40" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.05,7.075"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="15.9141,5.51385;18.329,7.21085"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.05,7.075"/>
+        <dia:point val="18,6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O7" connection="4"/>
+        <dia:connection handle="1" to="O40" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="0,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-0.1,5.5;4.1,6.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="0,6"/>
+        <dia:point val="4,6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O34" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O13">
+      <dia:attribute name="obj_pos">
+        <dia:point val="0,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-0.1,8.5;4.1,9.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="0,9"/>
+        <dia:point val="4,9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O32" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O14">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="19.9,8.5;24.1,9.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20,9"/>
+        <dia:point val="24,9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O42" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O15">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.05,7.075"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="15.9086,6.93358;18.4224,9.42608"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.05,7.075"/>
+        <dia:point val="18,9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O7" connection="4"/>
+        <dia:connection handle="1" to="O42" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O16">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.85858,6.67574;8.32426,9.14142"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,9"/>
+        <dia:point val="7.9,7.1"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O32" connection="4"/>
+        <dia:connection handle="1" to="O5" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O17">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="19.9,11.5;24.1,12.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20,12"/>
+        <dia:point val="24,12"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O44" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O18">
+      <dia:attribute name="obj_pos">
+        <dia:point val="15.9914,8.44142"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="15.8552,8.30518;18.4846,12.3329"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="15.9914,8.44142"/>
+        <dia:point val="18,12"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O7" connection="7"/>
+        <dia:connection handle="1" to="O44" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O19">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.86371,8.20802;8.44294,12.1363"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,12"/>
+        <dia:point val="7.95858,8.54142"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O30" connection="4"/>
+        <dia:connection handle="1" to="O5" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O20">
+      <dia:attribute name="obj_pos">
+        <dia:point val="0,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-0.1,11.5;4.1,12.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="0,12"/>
+        <dia:point val="4,12"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O30" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O21">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-5,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-5,2.22625;-0.82625,3.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From Peer A#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-5,3"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O22">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-5,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-5,5.22625;-0.82625,6.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From Peer B#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-5,6"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O23">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-5,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-5,8.22625;-0.77625,9.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From Peer C#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-5,9"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O24">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-5,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-5,11.2263;-0.77625,12.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From Peer D#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-5,12"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O25">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24,2.22625;27.3238,3.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#To Peer A#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="24,3"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O26">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24,5.22625;27.3238,6.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#To Peer B#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="24,6"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O27">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24,8.22625;27.3738,9.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#To Peer C#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="24,9"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O28">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24,11.2263;27.3738,12.4975"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#To Peer D#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="24,12"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O29">
+      <dia:attribute name="obj_pos">
+        <dia:point val="11.9,7.1"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="11.7476,6.07271;13.6161,8.07729"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="11.9,7.1"/>
+        <dia:point val="13.45,7.075"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.29999999999999999"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.59999999999999998"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.99999999999999967"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O5" connection="4"/>
+        <dia:connection handle="1" to="O7" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O30">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,11"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,10.95;6.05,13.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,11"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O31">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,12.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,11.3;5.4,12.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,12.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O32">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,8"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,7.95;6.05,10.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O33">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,9.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,8.3;5.4,9.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,9.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O34">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,5"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,4.95;6.05,7.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,5"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O35">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.7,6.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.7,5.3;5.4,6.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.7,6.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O36">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,1.95;6.05,4.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O37">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.75,3.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.75,2.3;5.45,3.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#A#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.75,3.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O38">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18.0879,2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.0379,1.95;20.05,3.96213"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="18.0879,2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="1.9121320343559631"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="1.9121320343559645"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3756d7"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O39">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18.65,3.45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.65,2.4;19.35,4.05"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#A#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="18.65,3.45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O40">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18,5"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.95,4.95;20.05,7.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="18,5"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3756d7"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O41">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18.7,6.45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.7,5.4;19.4,7.05"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="18.7,6.45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O42">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18,8"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.95,7.95;20.05,10.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="18,8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3756d7"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O43">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18.6,9.45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.6,8.4;19.35,10.05"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="18.6,9.45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O44">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18.0879,11"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.0379,10.95;20.05,12.9621"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="18.0879,11"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="1.9121320343559631"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="1.9121320343559649"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3756d7"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O45">
+        <dia:attribute name="obj_pos">
+          <dia:point val="18.7,12.4"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.7,11.35;19.45,13"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="18.7,12.4"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O46">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13,15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="12.95,14.95;22.05,19.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="13,15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#b7b2b2"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O47">
+          <dia:attribute name="obj_pos">
+            <dia:point val="14,16"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="13.95,15.95;15.9621,17.9621"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="14,16"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="1.9121320343559631"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="1.9121320343559649"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3756d7"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O48">
+          <dia:attribute name="obj_pos">
+            <dia:point val="14.6121,17.4"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="14.6121,16.35;15.3121,18"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#X#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="14.6121,17.4"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:object type="Standard - Text" version="0" id="O49">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19,17"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="16.525,15.95;21.475,19"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#“Out” Filter
+for Peer X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19,17"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O50">
+        <dia:attribute name="obj_pos">
+          <dia:point val="3,15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="2.95,14.95;12.05,19.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="3,15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#b7b2b2"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O51">
+        <dia:attribute name="obj_pos">
+          <dia:point val="9,17"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="9,16.4;9,17.35"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>##</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="9,17"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O52">
+        <dia:attribute name="obj_pos">
+          <dia:point val="9,17"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="6.675,15.95;11.325,19"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#“In” Filter
+for Peer X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="9,17"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O53">
+          <dia:attribute name="obj_pos">
+            <dia:point val="4,16"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="3.95,15.95;6.05,18.05"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="4,16"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#eb2020"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O54">
+          <dia:attribute name="obj_pos">
+            <dia:point val="4.65,17.35"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="4.65,16.3;5.35,17.95"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#X#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="4.65,17.35"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+    </dia:group>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-normal-processing.png b/doc/figures/fig-normal-processing.png
new file mode 100644 (file)
index 0000000..e4b8fdc
Binary files /dev/null and b/doc/figures/fig-normal-processing.png differ
diff --git a/doc/figures/fig-normal-processing.txt b/doc/figures/fig-normal-processing.txt
new file mode 100644 (file)
index 0000000..01f0e17
--- /dev/null
@@ -0,0 +1,11 @@
+
+                  _______________________________
+                 /    _________     _________    \
+From Peer A --->|(A)-|Best     |   |         |-[A]|--->To Peer A
+From Peer B --->|(B)-|Path     |-->|Local-RIB|-[B]|--->To Peer B
+From Peer C --->|(C)-|Selection|   |         |-[C]|--->To Peer C
+From Peer D --->|(D)-|_________|   |_________|-[D]|--->To Peer D
+                 \_______________________________/
+
+Key:  (X) - 'In'  Filter applied to Peer X's announcements
+      [X] - 'Out' Filter applied to announcements to Peer X
diff --git a/doc/figures/fig-rs-processing.dia b/doc/figures/fig-rs-processing.dia
new file mode 100644 (file)
index 0000000..b2bf213
--- /dev/null
@@ -0,0 +1,4239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#A4#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true">
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O0">
+        <dia:attribute name="obj_pos">
+          <dia:point val="11.95,5.25"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.9,5.2;20.8,9.9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="11.95,5.25"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="8.8000000000000007"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4.5999999999999996"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#8f8f8f"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:group>
+          <dia:object type="Standard - Box" version="0" id="O1">
+            <dia:attribute name="obj_pos">
+              <dia:point val="12.25,6.1"/>
+            </dia:attribute>
+            <dia:attribute name="obj_bb">
+              <dia:rectangle val="12.2,6.05;16.3,9.15"/>
+            </dia:attribute>
+            <dia:attribute name="elem_corner">
+              <dia:point val="12.25,6.1"/>
+            </dia:attribute>
+            <dia:attribute name="elem_width">
+              <dia:real val="4"/>
+            </dia:attribute>
+            <dia:attribute name="elem_height">
+              <dia:real val="3"/>
+            </dia:attribute>
+            <dia:attribute name="inner_color">
+              <dia:color val="#3fa9bd"/>
+            </dia:attribute>
+            <dia:attribute name="show_background">
+              <dia:boolean val="true"/>
+            </dia:attribute>
+            <dia:attribute name="corner_radius">
+              <dia:real val="0.20000000000000001"/>
+            </dia:attribute>
+          </dia:object>
+          <dia:object type="Standard - Text" version="0" id="O2">
+            <dia:attribute name="obj_pos">
+              <dia:point val="14.25,7.1"/>
+            </dia:attribute>
+            <dia:attribute name="obj_bb">
+              <dia:rectangle val="13.075,6.5;15.425,9.05"/>
+            </dia:attribute>
+            <dia:attribute name="text">
+              <dia:composite type="text">
+                <dia:attribute name="string">
+                  <dia:string>#Best
+Path
+Selection#</dia:string>
+                </dia:attribute>
+                <dia:attribute name="font">
+                  <dia:font family="sans" style="0" name="Helvetica"/>
+                </dia:attribute>
+                <dia:attribute name="height">
+                  <dia:real val="0.80000000000000004"/>
+                </dia:attribute>
+                <dia:attribute name="pos">
+                  <dia:point val="14.25,7.1"/>
+                </dia:attribute>
+                <dia:attribute name="color">
+                  <dia:color val="#000000"/>
+                </dia:attribute>
+                <dia:attribute name="alignment">
+                  <dia:enum val="1"/>
+                </dia:attribute>
+              </dia:composite>
+            </dia:attribute>
+          </dia:object>
+        </dia:group>
+        <dia:object type="Standard - Line" version="0" id="O3">
+          <dia:attribute name="obj_pos">
+            <dia:point val="16.25,7.6"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="16.0976,6.57271;17.9661,8.57729"/>
+          </dia:attribute>
+          <dia:attribute name="conn_endpoints">
+            <dia:point val="16.25,7.6"/>
+            <dia:point val="17.8,7.575"/>
+          </dia:attribute>
+          <dia:attribute name="numcp">
+            <dia:int val="1"/>
+          </dia:attribute>
+          <dia:attribute name="line_width">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+          <dia:attribute name="end_arrow">
+            <dia:enum val="3"/>
+          </dia:attribute>
+          <dia:attribute name="end_arrow_length">
+            <dia:real val="0.59999999999999998"/>
+          </dia:attribute>
+          <dia:attribute name="end_arrow_width">
+            <dia:real val="0.99999999999999967"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:group>
+          <dia:object type="Standard - Box" version="0" id="O4">
+            <dia:attribute name="obj_pos">
+              <dia:point val="17.8,6.15"/>
+            </dia:attribute>
+            <dia:attribute name="obj_bb">
+              <dia:rectangle val="17.75,6.1;20.45,9.05"/>
+            </dia:attribute>
+            <dia:attribute name="elem_corner">
+              <dia:point val="17.8,6.15"/>
+            </dia:attribute>
+            <dia:attribute name="elem_width">
+              <dia:real val="2.6000000000000147"/>
+            </dia:attribute>
+            <dia:attribute name="elem_height">
+              <dia:real val="2.8500000000000005"/>
+            </dia:attribute>
+            <dia:attribute name="inner_color">
+              <dia:color val="#3fa9bd"/>
+            </dia:attribute>
+            <dia:attribute name="show_background">
+              <dia:boolean val="true"/>
+            </dia:attribute>
+            <dia:attribute name="corner_radius">
+              <dia:real val="0.20000000000000001"/>
+            </dia:attribute>
+          </dia:object>
+          <dia:object type="Standard - Text" version="0" id="O5">
+            <dia:attribute name="obj_pos">
+              <dia:point val="19.15,7.4"/>
+            </dia:attribute>
+            <dia:attribute name="obj_bb">
+              <dia:rectangle val="18.125,6.8;20.175,8.55"/>
+            </dia:attribute>
+            <dia:attribute name="text">
+              <dia:composite type="text">
+                <dia:attribute name="string">
+                  <dia:string>#Main
+Loc-RIB#</dia:string>
+                </dia:attribute>
+                <dia:attribute name="font">
+                  <dia:font family="sans" style="0" name="Helvetica"/>
+                </dia:attribute>
+                <dia:attribute name="height">
+                  <dia:real val="0.80000000000000004"/>
+                </dia:attribute>
+                <dia:attribute name="pos">
+                  <dia:point val="19.15,7.4"/>
+                </dia:attribute>
+                <dia:attribute name="color">
+                  <dia:color val="#000000"/>
+                </dia:attribute>
+                <dia:attribute name="alignment">
+                  <dia:enum val="1"/>
+                </dia:attribute>
+              </dia:composite>
+            </dia:attribute>
+          </dia:object>
+        </dia:group>
+      </dia:group>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-1,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-1.1,2.5;4.1,3.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="-1,3"/>
+        <dia:point val="4,3"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="6"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O23" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20.4,7.575"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="20.2995,7.04947;25.1906,8.05053"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20.4,7.575"/>
+        <dia:point val="25.0879,7.55"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="4"/>
+        <dia:connection handle="1" to="O129" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.86581,2.86581;12.6219,6.65044"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,3"/>
+        <dia:point val="12.3086,6.15858"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O23" connection="4"/>
+        <dia:connection handle="1" to="O1" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.87832,5.87832;12.4709,8.10918"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,6"/>
+        <dia:point val="12.25,7.6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O21" connection="4"/>
+        <dia:connection handle="1" to="O1" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-1,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-1.1,5.5;4.1,6.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="-1,6"/>
+        <dia:point val="4,6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O21" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-1,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-1.1,8.5;4.1,9.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="-1,9"/>
+        <dia:point val="4,9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O19" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.88056,7.09023;12.4569,9.11944"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,9"/>
+        <dia:point val="12.25,7.6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O19" connection="4"/>
+        <dia:connection handle="1" to="O1" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O13">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.867,8.54627;12.6114,12.133"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,12"/>
+        <dia:point val="12.3086,9.04142"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O17" connection="4"/>
+        <dia:connection handle="1" to="O1" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O14">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-1,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-1.1,11.5;4.1,12.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="-1,12"/>
+        <dia:point val="4,12"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="2"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O17" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O15">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-6,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-6,2.25;-1.85,3.45"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From Peer A#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-6,3"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O16">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-7,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-7,5.25;-1.25,6.45"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From RS-Client B#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-7,6"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O17">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,11"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,10.95;6.05,13.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,11"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O18">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,12.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,11.3;5.4,12.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,12.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O19">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,8"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,7.95;6.05,10.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O20">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,9.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,8.3;5.4,9.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,9.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O21">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,5"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,4.95;6.05,7.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,5"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O22">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.7,6.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.7,5.3;5.4,6.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.7,6.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O23">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,1.95;6.05,4.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#eb2020"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O24">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.75,3.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.75,2.3;5.45,3.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#A#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.75,3.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O25">
+        <dia:attribute name="obj_pos">
+          <dia:point val="5,43"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.95,42.95;14.05,47.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="5,43"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#b7b2b2"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O26">
+          <dia:attribute name="obj_pos">
+            <dia:point val="6,44"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="5.95,43.95;7.96213,45.9621"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="6,44"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="1.9121320343559631"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="1.9121320343559649"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3756d7"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O27">
+          <dia:attribute name="obj_pos">
+            <dia:point val="6.61213,45.4"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="6.61213,44.35;7.31213,46"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#X#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="6.61213,45.4"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:object type="Standard - Text" version="0" id="O28">
+        <dia:attribute name="obj_pos">
+          <dia:point val="11,45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.525,43.95;13.475,47"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#“Out” Filter
+for Peer X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="11,45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O29">
+        <dia:attribute name="obj_pos">
+          <dia:point val="-6,43"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="-6.05,42.95;3.05,47.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="-6,43"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#b7b2b2"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O30">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0,45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="0,44.4;0,45.35"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>##</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="0,45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O31">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0,45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="-2.325,43.95;2.325,47"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#“In” Filter
+for Peer X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="0,45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O32">
+          <dia:attribute name="obj_pos">
+            <dia:point val="-5,44"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="-5.05,43.95;-2.95,46.05"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="-5,44"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#eb2020"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O33">
+          <dia:attribute name="obj_pos">
+            <dia:point val="-4.35,45.35"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="-4.35,44.3;-3.65,45.95"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#X#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="-4.35,45.35"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+    </dia:group>
+    <dia:object type="Standard - Text" version="0" id="O34">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-7,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-7,11.25;-1.2,12.45"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From RS-Client D#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-7,12"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="0" id="O35">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-7,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-7,8.25;-1.2,9.45"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#From RS-Client C#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="1"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="-7,9"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O36">
+        <dia:attribute name="obj_pos">
+          <dia:point val="12,26"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.95,25.95;20.85,30.65"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="12,26"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="8.8000000000000007"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4.5999999999999996"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#8f8f8f"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O37">
+          <dia:attribute name="obj_pos">
+            <dia:point val="12.3,26.85"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="12.25,26.8;16.35,29.9"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="12.3,26.85"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="4"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="3"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3fa9bd"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.20000000000000001"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O38">
+          <dia:attribute name="obj_pos">
+            <dia:point val="14.3,27.85"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="13.125,27.25;15.475,29.8"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#Best
+Path
+Selection#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="0.80000000000000004"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="14.3,27.85"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="1"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:object type="Standard - Box" version="0" id="O39">
+        <dia:attribute name="obj_pos">
+          <dia:point val="17.85,26.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.8,26.85;20.5,29.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="17.85,26.9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2.6000000000000147"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2.8500000000000005"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3fa9bd"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O40">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.1,28.2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.075,27.6;20.125,29.35"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Loc-RIB
+For C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.1,28.2"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Line" version="0" id="O41">
+        <dia:attribute name="obj_pos">
+          <dia:point val="16.3,28.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="16.1476,27.3227;18.0161,29.3273"/>
+        </dia:attribute>
+        <dia:attribute name="conn_endpoints">
+          <dia:point val="16.3,28.35"/>
+          <dia:point val="17.85,28.325"/>
+        </dia:attribute>
+        <dia:attribute name="numcp">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="line_width">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_length">
+          <dia:real val="0.59999999999999998"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_width">
+          <dia:real val="0.99999999999999967"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="1" to="O39" connection="3"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O42">
+        <dia:attribute name="obj_pos">
+          <dia:point val="12,36"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.95,35.95;20.85,40.65"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="12,36"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="8.8000000000000007"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4.5999999999999996"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#8f8f8f"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O43">
+          <dia:attribute name="obj_pos">
+            <dia:point val="12.3,36.85"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="12.25,36.8;16.35,39.9"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="12.3,36.85"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="4"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="3"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3fa9bd"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.20000000000000001"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O44">
+          <dia:attribute name="obj_pos">
+            <dia:point val="14.3,37.85"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="13.125,37.25;15.475,39.8"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#Best
+Path
+Selection#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="0.80000000000000004"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="14.3,37.85"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="1"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:object type="Standard - Box" version="0" id="O45">
+        <dia:attribute name="obj_pos">
+          <dia:point val="17.85,36.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.8,36.85;20.5,39.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="17.85,36.9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2.6000000000000147"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2.8500000000000005"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3fa9bd"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O46">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.1,38.2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.075,37.6;20.125,39.35"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Loc-RIB
+For D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.1,38.2"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Line" version="0" id="O47">
+        <dia:attribute name="obj_pos">
+          <dia:point val="16.3,38.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="16.1476,37.3227;18.0161,39.3273"/>
+        </dia:attribute>
+        <dia:attribute name="conn_endpoints">
+          <dia:point val="16.3,38.35"/>
+          <dia:point val="17.85,38.325"/>
+        </dia:attribute>
+        <dia:attribute name="numcp">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="line_width">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_length">
+          <dia:real val="0.59999999999999998"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_width">
+          <dia:real val="0.99999999999999967"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="1" to="O45" connection="3"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O48">
+        <dia:attribute name="obj_pos">
+          <dia:point val="12,15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.95,14.95;20.85,19.65"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="12,15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="8.8000000000000007"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="4.5999999999999996"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#8f8f8f"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O49">
+          <dia:attribute name="obj_pos">
+            <dia:point val="12.3,15.85"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="12.25,15.8;16.35,18.9"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="12.3,15.85"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="4"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="3"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3fa9bd"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.20000000000000001"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O50">
+          <dia:attribute name="obj_pos">
+            <dia:point val="14.3,16.85"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="13.125,16.25;15.475,18.8"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#Best
+Path
+Selection#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="0.80000000000000004"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="14.3,16.85"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="1"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:object type="Standard - Box" version="0" id="O51">
+        <dia:attribute name="obj_pos">
+          <dia:point val="17.85,15.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.8,15.85;20.5,18.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="17.85,15.9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2.6000000000000147"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2.8500000000000005"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#3fa9bd"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O52">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.1,17.2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.075,16.6;20.125,18.35"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Loc-RIB
+For B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.1,17.2"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Line" version="0" id="O53">
+        <dia:attribute name="obj_pos">
+          <dia:point val="16.3,17.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="16.1476,16.3227;18.0161,18.3273"/>
+        </dia:attribute>
+        <dia:attribute name="conn_endpoints">
+          <dia:point val="16.3,17.35"/>
+          <dia:point val="17.85,17.325"/>
+        </dia:attribute>
+        <dia:attribute name="numcp">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="line_width">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_length">
+          <dia:real val="0.59999999999999998"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_width">
+          <dia:real val="0.99999999999999967"/>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O54">
+      <dia:attribute name="obj_pos">
+        <dia:point val="0.666667,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="0.566667,11.9;4.1,21.5"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="0.666667,12"/>
+        <dia:point val="0.666667,21"/>
+        <dia:point val="4,21"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O14" connection="0"/>
+        <dia:connection handle="1" to="O55" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O55">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,20"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,19.95;6.05,22.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,20"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#00c0bb"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O56">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,21.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,20.3;5.4,21.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,21.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O57">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,21"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.9,20.5;8.1,21.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,21"/>
+        <dia:point val="8,21"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O55" connection="4"/>
+        <dia:connection handle="1" to="O65" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O58">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,17"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,16.95;6.05,19.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,17"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#00c0bb"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O59">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,18.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,17.3;5.4,18.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,18.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O60">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,21"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.85865,18.3581;12.7734,21.1413"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,21"/>
+        <dia:point val="12.3586,18.7914"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O65" connection="4"/>
+        <dia:connection handle="1" to="O49" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O61">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,14"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,13.95;10.05,16.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,14"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O62">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,15.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,14.3;9.35,15.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,15.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O63">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,17"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,16.95;10.05,19.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,17"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O64">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,18.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,17.3;9.35,18.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,18.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O65">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,20"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,19.95;10.05,22.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,20"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O66">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,21.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,20.3;9.35,21.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,21.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O67">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,24"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,23.95;10.05,26.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,24"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O68">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,25.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,24.3;9.4,25.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,25.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O69">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,30"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,29.95;10.05,32.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,30"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O70">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,31.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,30.3;9.4,31.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,31.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O71">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,27"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,26.95;10.05,29.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,27"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O72">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,28.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,27.3;9.4,28.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,28.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O73">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,30"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,29.95;6.05,32.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,30"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#00c0bb"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O74">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,31.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,30.3;5.4,31.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,31.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O75">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,27"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,26.95;6.05,29.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,27"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#00c0bb"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O76">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,28.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,27.3;5.35,28.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,28.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O77">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,34"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,33.95;10.05,36.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,34"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O78">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,35.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,34.3;9.4,35.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,35.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O79">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,40"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,39.95;10.05,42.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,40"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O80">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,41.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,40.3;9.4,41.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,41.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O81">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,37"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,36.95;10.05,39.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,37"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O82">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.65,38.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.65,37.3;9.4,38.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.65,38.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O83">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,37"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,36.95;6.05,39.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,37"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#00c0bb"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O84">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,38.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,37.3;5.35,38.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,38.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O85">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,40"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,39.95;6.05,42.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,40"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#00c0bb"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O86">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.65,41.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.65,40.3;5.4,41.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.65,41.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O87">
+      <dia:attribute name="obj_pos">
+        <dia:point val="1.5,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="1.4,8.9;4.1,18.5"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="1.5,9"/>
+        <dia:point val="1.5,18"/>
+        <dia:point val="4,18"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O11" connection="1"/>
+        <dia:connection handle="1" to="O58" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O88">
+      <dia:attribute name="obj_pos">
+        <dia:point val="1.5,9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="1.4,8.9;4.1,41.5"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="1.5,9"/>
+        <dia:point val="1.5,41"/>
+        <dia:point val="4,41"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O11" connection="1"/>
+        <dia:connection handle="1" to="O85" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O89">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.75,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.65,5.9;4.14142,28.1"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="2.75,6"/>
+        <dia:point val="2.75,28"/>
+        <dia:point val="4,28"/>
+        <dia:point val="4,28"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+        <dia:enum val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O75" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O90">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.75,6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.65,5.9;4.14142,38.1"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="2.75,6"/>
+        <dia:point val="2.75,38"/>
+        <dia:point val="4,38"/>
+        <dia:point val="4,38"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+        <dia:enum val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O83" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O91">
+      <dia:attribute name="obj_pos">
+        <dia:point val="0.666667,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="0.566667,11.9;4.1,31.5"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="0.666667,12"/>
+        <dia:point val="0.666667,31"/>
+        <dia:point val="4,31"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O14" connection="0"/>
+        <dia:connection handle="1" to="O73" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O92">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-0.285714,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-0.385714,2.9;8.1,15.5"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="-0.285714,3"/>
+        <dia:point val="-0.285714,15"/>
+        <dia:point val="8,15"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O6" connection="0"/>
+        <dia:connection handle="1" to="O61" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O93">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-0.285714,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-0.385714,2.9;8.1,25.5"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="-0.285714,3"/>
+        <dia:point val="-0.285714,25"/>
+        <dia:point val="8,25"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O6" connection="0"/>
+        <dia:connection handle="1" to="O67" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - ZigZagLine" version="0" id="O94">
+      <dia:attribute name="obj_pos">
+        <dia:point val="-0.285714,3"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="-0.385714,2.9;8.1,35.5"/>
+      </dia:attribute>
+      <dia:attribute name="orth_points">
+        <dia:point val="-0.285714,3"/>
+        <dia:point val="-0.285714,35"/>
+        <dia:point val="8,35"/>
+      </dia:attribute>
+      <dia:attribute name="orth_orient">
+        <dia:enum val="1"/>
+        <dia:enum val="0"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O6" connection="0"/>
+        <dia:connection handle="1" to="O77" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O95">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,31"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.9,30.5;8.1,31.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,31"/>
+        <dia:point val="8,31"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O73" connection="4"/>
+        <dia:connection handle="1" to="O69" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O96">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,31"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.8654,29.3008;12.6756,31.1346"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,31"/>
+        <dia:point val="12.3586,29.7914"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O69" connection="4"/>
+        <dia:connection handle="1" to="O37" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O97">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,41"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.8654,39.3008;12.6756,41.1346"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,41"/>
+        <dia:point val="12.3586,39.7914"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O79" connection="4"/>
+        <dia:connection handle="1" to="O43" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O98">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,41"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.9,40.5;8.1,41.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,41"/>
+        <dia:point val="8,41"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O85" connection="4"/>
+        <dia:connection handle="1" to="O79" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O99">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,18"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.87657,16.8416;12.5322,18.1234"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,18"/>
+        <dia:point val="12.3,17.35"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O63" connection="4"/>
+        <dia:connection handle="1" to="O49" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O100">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,18"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.9,17.5;8.1,18.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,18"/>
+        <dia:point val="8,18"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O58" connection="4"/>
+        <dia:connection handle="1" to="O63" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O101">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,28"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.9,27.5;8.1,28.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,28"/>
+        <dia:point val="8,28"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O75" connection="4"/>
+        <dia:connection handle="1" to="O71" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O102">
+      <dia:attribute name="obj_pos">
+        <dia:point val="6,38"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="5.9,37.5;8.1,38.5"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="6,38"/>
+        <dia:point val="8,38"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O83" connection="4"/>
+        <dia:connection handle="1" to="O81" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O103">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,38"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.88609,37.8406;12.4741,38.8594"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,38"/>
+        <dia:point val="12.3,38.35"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O81" connection="4"/>
+        <dia:connection handle="1" to="O43" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O104">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,28"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.88609,27.8406;12.4741,28.8594"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,28"/>
+        <dia:point val="12.3,28.35"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="3"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O71" connection="4"/>
+        <dia:connection handle="1" to="O37" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O105">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,15"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.87074,14.8707;12.6317,16.4111"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,15"/>
+        <dia:point val="12.3586,15.9086"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O61" connection="4"/>
+        <dia:connection handle="1" to="O49" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O106">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,25"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.85936,24.8594;12.7509,27.3602"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,25"/>
+        <dia:point val="12.3586,26.9086"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O67" connection="4"/>
+        <dia:connection handle="1" to="O37" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O107">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,35"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.85936,34.8594;12.7509,37.3602"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="10,35"/>
+        <dia:point val="12.3586,36.9086"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#e5aa2a"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O77" connection="4"/>
+        <dia:connection handle="1" to="O43" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O108">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20.45,17.325"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="20.3481,16.7482;24.5095,17.7518"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20.45,17.325"/>
+        <dia:point val="24.4,17.25"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#3c8d37"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O51" connection="4"/>
+        <dia:connection handle="1" to="O123" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O109">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20.45,28.325"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="20.3494,27.8494;24.4532,28.8506"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20.45,28.325"/>
+        <dia:point val="24.35,28.35"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#972360"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O39" connection="4"/>
+        <dia:connection handle="1" to="O126" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O110">
+      <dia:attribute name="obj_pos">
+        <dia:point val="20.45,38.325"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="20.3494,37.8494;24.4411,38.8506"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="20.45,38.325"/>
+        <dia:point val="24.3379,38.35"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#618ccd"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O45" connection="4"/>
+        <dia:connection handle="1" to="O134" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O111">
+        <dia:attribute name="obj_pos">
+          <dia:point val="16,43"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="15.95,42.95;25.05,46.735"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="16,43"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.6849999999999952"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#b7b2b2"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O112">
+        <dia:attribute name="obj_pos">
+          <dia:point val="22,45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="22,44.4;22,45.35"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>##</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="22,45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O113">
+        <dia:attribute name="obj_pos">
+          <dia:point val="21.45,44.7"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="18.15,43.65;24.75,46.7"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Export Policy
+of RS-Client X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="21.45,44.7"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Box" version="0" id="O114">
+        <dia:attribute name="obj_pos">
+          <dia:point val="16.3,43.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="16.25,43.3;18.35,45.4"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="16.3,43.35"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#00c0bb"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O115">
+        <dia:attribute name="obj_pos">
+          <dia:point val="17.015,44.735"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.015,43.685;17.715,45.335"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="17.015,44.735"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O116">
+        <dia:attribute name="obj_pos">
+          <dia:point val="27,43"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="26.95,42.95;36.05,46.735"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="27,43"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.6849999999999952"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#b7b2b2"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O117">
+        <dia:attribute name="obj_pos">
+          <dia:point val="33,45"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="33,44.4;33,45.35"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>##</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="33,45"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O118">
+        <dia:attribute name="obj_pos">
+          <dia:point val="32.45,44.7"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="29.15,43.65;35.75,46.7"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Import Policy
+of RS-Client X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="32.45,44.7"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Box" version="0" id="O119">
+        <dia:attribute name="obj_pos">
+          <dia:point val="27.3,43.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="27.25,43.3;29.35,45.4"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="27.3,43.35"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="2"/>
+        </dia:attribute>
+        <dia:attribute name="inner_color">
+          <dia:color val="#a8e400"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="corner_radius">
+          <dia:real val="0.29999999999999999"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O120">
+        <dia:attribute name="obj_pos">
+          <dia:point val="28.015,44.735"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="28.015,43.685;28.715,45.335"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#X#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1.3999999999999999"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="28.015,44.735"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Line" version="0" id="O121">
+        <dia:attribute name="obj_pos">
+          <dia:point val="26.4,17.25"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="26.3,16.75;30.5,17.75"/>
+        </dia:attribute>
+        <dia:attribute name="conn_endpoints">
+          <dia:point val="26.4,17.25"/>
+          <dia:point val="30.4,17.25"/>
+        </dia:attribute>
+        <dia:attribute name="numcp">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="line_color">
+          <dia:color val="#3c8d37"/>
+        </dia:attribute>
+        <dia:attribute name="line_width">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow">
+          <dia:enum val="22"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_length">
+          <dia:real val="0.5"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_width">
+          <dia:real val="0.5"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O122">
+        <dia:attribute name="obj_pos">
+          <dia:point val="30.4,17.25"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="30.4,16.5;35.3,17.7"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#To RS-Client B#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="30.4,17.25"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O123">
+          <dia:attribute name="obj_pos">
+            <dia:point val="24.4,16.25"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="24.35,16.2;26.45,18.3"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="24.4,16.25"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3756d7"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O124">
+          <dia:attribute name="obj_pos">
+            <dia:point val="25.1,17.7"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="25.1,16.65;25.8,18.3"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#B#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="25.1,17.7"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Line" version="0" id="O125">
+        <dia:attribute name="obj_pos">
+          <dia:point val="26.35,28.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="26.2488,27.8988;30.5561,28.9012"/>
+        </dia:attribute>
+        <dia:attribute name="conn_endpoints">
+          <dia:point val="26.35,28.35"/>
+          <dia:point val="30.45,28.4"/>
+        </dia:attribute>
+        <dia:attribute name="numcp">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="line_color">
+          <dia:color val="#972360"/>
+        </dia:attribute>
+        <dia:attribute name="line_width">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow">
+          <dia:enum val="22"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_length">
+          <dia:real val="0.5"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_width">
+          <dia:real val="0.5"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O126">
+          <dia:attribute name="obj_pos">
+            <dia:point val="24.35,27.35"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="24.3,27.3;26.4,29.4"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="24.35,27.35"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="2"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3756d7"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O127">
+          <dia:attribute name="obj_pos">
+            <dia:point val="24.95,28.8"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="24.95,27.75;25.7,29.4"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#C#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="24.95,28.8"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:object type="Standard - Text" version="0" id="O128">
+        <dia:attribute name="obj_pos">
+          <dia:point val="30.35,28.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="30.35,27.6;35.3,28.8"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#To RS-Client C#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="30.35,28.35"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O129">
+          <dia:attribute name="obj_pos">
+            <dia:point val="25.0879,6.59393"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="25.0379,6.54393;27.05,8.55606"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="25.0879,6.59393"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="1.9121320343559631"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="1.9121320343559645"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3756d7"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O130">
+          <dia:attribute name="obj_pos">
+            <dia:point val="25.65,8.04393"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="25.65,6.99393;26.35,8.64393"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#A#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="25.65,8.04393"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:group>
+        <dia:object type="Standard - Line" version="0" id="O131">
+          <dia:attribute name="obj_pos">
+            <dia:point val="27,7.55"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="26.8988,7.09885;31.306,8.10117"/>
+          </dia:attribute>
+          <dia:attribute name="conn_endpoints">
+            <dia:point val="27,7.55"/>
+            <dia:point val="31.2001,7.60001"/>
+          </dia:attribute>
+          <dia:attribute name="numcp">
+            <dia:int val="1"/>
+          </dia:attribute>
+          <dia:attribute name="line_color">
+            <dia:color val="#e5aa2a"/>
+          </dia:attribute>
+          <dia:attribute name="line_width">
+            <dia:real val="0.20000000000000001"/>
+          </dia:attribute>
+          <dia:attribute name="end_arrow">
+            <dia:enum val="22"/>
+          </dia:attribute>
+          <dia:attribute name="end_arrow_length">
+            <dia:real val="0.5"/>
+          </dia:attribute>
+          <dia:attribute name="end_arrow_width">
+            <dia:real val="0.5"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O132">
+          <dia:attribute name="obj_pos">
+            <dia:point val="31.3,7.6"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="31.3,6.85;34.6,8.05"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#To Peer A#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="31.3,7.6"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Line" version="0" id="O133">
+        <dia:attribute name="obj_pos">
+          <dia:point val="26.25,38.35"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="26.1499,37.8438;30.5386,38.844"/>
+        </dia:attribute>
+        <dia:attribute name="conn_endpoints">
+          <dia:point val="26.25,38.35"/>
+          <dia:point val="30.4379,38.3439"/>
+        </dia:attribute>
+        <dia:attribute name="numcp">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="line_color">
+          <dia:color val="#618ccd"/>
+        </dia:attribute>
+        <dia:attribute name="line_width">
+          <dia:real val="0.20000000000000001"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow">
+          <dia:enum val="22"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_length">
+          <dia:real val="0.5"/>
+        </dia:attribute>
+        <dia:attribute name="end_arrow_width">
+          <dia:real val="0.5"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:group>
+        <dia:object type="Standard - Box" version="0" id="O134">
+          <dia:attribute name="obj_pos">
+            <dia:point val="24.3379,37.3939"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="24.2879,37.3439;26.3,39.356"/>
+          </dia:attribute>
+          <dia:attribute name="elem_corner">
+            <dia:point val="24.3379,37.3939"/>
+          </dia:attribute>
+          <dia:attribute name="elem_width">
+            <dia:real val="1.9121320343559631"/>
+          </dia:attribute>
+          <dia:attribute name="elem_height">
+            <dia:real val="1.9121320343559649"/>
+          </dia:attribute>
+          <dia:attribute name="inner_color">
+            <dia:color val="#3756d7"/>
+          </dia:attribute>
+          <dia:attribute name="show_background">
+            <dia:boolean val="true"/>
+          </dia:attribute>
+          <dia:attribute name="corner_radius">
+            <dia:real val="0.29999999999999999"/>
+          </dia:attribute>
+        </dia:object>
+        <dia:object type="Standard - Text" version="0" id="O135">
+          <dia:attribute name="obj_pos">
+            <dia:point val="24.95,38.7939"/>
+          </dia:attribute>
+          <dia:attribute name="obj_bb">
+            <dia:rectangle val="24.95,37.7439;25.7,39.3939"/>
+          </dia:attribute>
+          <dia:attribute name="text">
+            <dia:composite type="text">
+              <dia:attribute name="string">
+                <dia:string>#D#</dia:string>
+              </dia:attribute>
+              <dia:attribute name="font">
+                <dia:font family="sans" style="0" name="Helvetica"/>
+              </dia:attribute>
+              <dia:attribute name="height">
+                <dia:real val="1.3999999999999999"/>
+              </dia:attribute>
+              <dia:attribute name="pos">
+                <dia:point val="24.95,38.7939"/>
+              </dia:attribute>
+              <dia:attribute name="color">
+                <dia:color val="#000000"/>
+              </dia:attribute>
+              <dia:attribute name="alignment">
+                <dia:enum val="0"/>
+              </dia:attribute>
+            </dia:composite>
+          </dia:attribute>
+        </dia:object>
+      </dia:group>
+      <dia:object type="Standard - Text" version="0" id="O136">
+        <dia:attribute name="obj_pos">
+          <dia:point val="30.4379,38.3439"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="30.4379,37.5939;35.3879,38.7939"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#To RS-Client D#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="1"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="30.4379,38.3439"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-rs-processing.png b/doc/figures/fig-rs-processing.png
new file mode 100644 (file)
index 0000000..1f77263
Binary files /dev/null and b/doc/figures/fig-rs-processing.png differ
diff --git a/doc/figures/fig-rs-processing.txt b/doc/figures/fig-rs-processing.txt
new file mode 100644 (file)
index 0000000..eafe146
--- /dev/null
@@ -0,0 +1,47 @@
+From Peer A
+ | From RS-Client B
+ |  | From RS-Client C
+ |  |  | From RS-Client D
+ |  |  |  |
+ |  |  |  |           Main / Normal RIB
+ |  |  |  |      ________________________________
+ |  |  |  |     /    _________     _________     \
+ |  |  |  +--->|(D)-|Best     |   | Main    |     |
+ |  |  +--|--->|(C)-|Path     |-->|Local-RIB|->[A]|--->To Peer A
+ |  +--|--|--->|(B)-|Selection|   |         |     |
+ +--|--|--|--->|(A)-|_________|   |_________|     |
+ |  |  |  |     \________________________________/
+ |  |  |  |
+ |  |  |  |          ________________________________
+ |  |  |  |          /    _________     _________     \
+ |  |  |  +--->*D*->|{B}-|Best     |   |RS-Client|     |
+ |  |  +--|--->*C*->|{B}-|Path     |-->|Local-RIB|->[B]|--->To RS-Client B
+ |  |  |  |         |    |Selection|   |  for B  |     |
+ +--|--|--|-------->|{B}-|_________|   |_________|     |
+ |  |  |  |          \________________________________/
+ |  |  |  |
+ |  |  |  |          ________________________________
+ |  |  |  |          /    _________     _________     \
+ |  |  |  +--->*D*->|{C}-|Best     |   |RS-Client|     |
+ |  |  |  |         |    |Path     |-->|Local-RIB|->[C]|--->To RS-Client C
+ |  +--|--|--->*B*->|{C}-|Selection|   |  for C  |     |
+ +--|--|--|-------->|{C}-|_________|   |_________|     |
+ |  |  |             \________________________________/
+ |  |  |
+ |  |  |              ________________________________
+ |  |  |             /    _________     _________     \
+ |  |  |            |    |Best     |   |RS-Client|     |
+ |  |  +------>*C*->|{D}-|Path     |-->|Local-RIB|->[D]|--->To RS-Client D
+ |  +--------->*B*->|{D}-|Selection|   |  for D  |     |
+ +----------------->|{D}-|_________|   |_________|     |
+                     \________________________________/
+
+
+Key:  (X) - 'In'  Filter applied to Peer X's announcements before
+            considering announcement for the normal main Local-RIB
+      [X] - 'Out' Filter applied to announcements to Peer X
+      *X* - 'Export' Filter of RS-Client X, to apply X's policies
+           before its routes may be considered for other RS-Clients
+            RIBs.
+      {X} - 'Import' Filter of RS-Client X, to apply X's policies
+            on routes before allowing them into X's RIB.
diff --git a/doc/figures/fig-vnc-commercial-route-reflector.dia b/doc/figures/fig-vnc-commercial-route-reflector.dia
new file mode 100644 (file)
index 0000000..0da5bd1
--- /dev/null
@@ -0,0 +1,794 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#Letter#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true" active="true">
+    <dia:object type="Standard - Box" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O5">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="22.5347,32.178"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="22.4642,23.359;30.091,32.2485"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="22.5347,32.178"/>
+        <dia:point val="30.0205,23.4295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="43.1205,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="36.8099,23.3599;43.1901,32.5401"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="43.1205,32.4705"/>
+        <dia:point val="36.8795,23.4295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.5501,5.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="16.5501,5.5"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 4
+VN 172.16.4.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,31.125"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O5" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 5
+VN 172.16.130.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,36.0225"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 6
+VN 172.16.132.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,40.92"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O3" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 7
+VN 172.16.6.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,30.975"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O2" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O13">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 8
+VN 172.16.8.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,35.8725"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O1" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O14">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 9
+VN 172.16.134.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,40.77"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O15">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86406,31.0665;15.979,32.529"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,31.125"/>
+        <dia:point val="15.9205,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O5" connection="4"/>
+        <dia:connection handle="1" to="O24" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O16">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.87151,35.8489;14.5511,36.0736"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,36.0225"/>
+        <dia:point val="14.5,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="4"/>
+        <dia:connection handle="1" to="O24" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O17">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86276,39.2697;15.9803,40.9798"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,40.92"/>
+        <dia:point val="15.9205,39.3295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O3" connection="4"/>
+        <dia:connection handle="1" to="O24" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O18">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="49.9204,30.9159;57.2892,32.5296"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,30.975"/>
+        <dia:point val="49.9795,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O2" connection="3"/>
+        <dia:connection handle="1" to="O22" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O19">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="51.3498,35.8223;57.2803,35.9502"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,35.8725"/>
+        <dia:point val="51.4,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O1" connection="3"/>
+        <dia:connection handle="1" to="O22" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O20">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="50.9399,37.8657;57.2963,40.8362"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,40.77"/>
+        <dia:point val="51.0061,37.9319"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="3"/>
+        <dia:connection handle="1" to="O22" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O21">
+      <dia:attribute name="obj_pos">
+        <dia:point val="34.8,20.45"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="34.8,19.855;34.8,20.6025"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="34.8,20.45"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O22">
+        <dia:attribute name="obj_pos">
+          <dia:point val="41.7,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="41.65,31;51.45,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="41.7,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O23">
+        <dia:attribute name="obj_pos">
+          <dia:point val="46.55,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="44.2012,35.305;48.8987,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 3
+192.168.1.102#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="46.55,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O22" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O24">
+        <dia:attribute name="obj_pos">
+          <dia:point val="14.5,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="14.45,31;24.25,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="14.5,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O25">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.35,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.0013,35.305;21.6988,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 2
+192.168.1.101#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.35,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O24" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O26">
+        <dia:attribute name="obj_pos">
+          <dia:point val="28.6,15.15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="28.55,15.1;38.35,24.9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="28.6,15.15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O27">
+        <dia:attribute name="obj_pos">
+          <dia:point val="33.45,19.7"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="30.9863,19.105;35.9138,21.4525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Commercial Router
+Route Reflector
+192.168.1.104#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="33.45,19.7"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-vnc-commercial-route-reflector.png b/doc/figures/fig-vnc-commercial-route-reflector.png
new file mode 100644 (file)
index 0000000..ca8a248
Binary files /dev/null and b/doc/figures/fig-vnc-commercial-route-reflector.png differ
diff --git a/doc/figures/fig-vnc-commercial-route-reflector.txt b/doc/figures/fig-vnc-commercial-route-reflector.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/figures/fig-vnc-frr-route-reflector.dia b/doc/figures/fig-vnc-frr-route-reflector.dia
new file mode 100644 (file)
index 0000000..634f0b1
--- /dev/null
@@ -0,0 +1,763 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#Letter#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true" active="true">
+    <dia:object type="Standard - Box" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O5">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="22.5347,32.178"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="22.4642,23.359;30.091,32.2485"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="22.5347,32.178"/>
+        <dia:point val="30.0205,23.4295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="43.1205,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="36.8099,23.3599;43.1901,32.5401"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="43.1205,32.4705"/>
+        <dia:point val="36.8795,23.4295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.5501,5.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="16.5501,5.5"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 4
+VN 172.16.4.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,31.125"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O5" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 5
+VN 172.16.130.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,36.0225"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 6
+VN 172.16.132.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,40.92"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O3" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 7
+VN 172.16.6.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,30.975"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O2" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O13">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 8
+VN 172.16.8.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,35.8725"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O1" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O14">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 9
+VN 172.16.134.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,40.77"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O15">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86406,31.0665;15.979,32.529"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,31.125"/>
+        <dia:point val="15.9205,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O5" connection="4"/>
+        <dia:connection handle="1" to="O23" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O16">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.87151,35.8489;14.5511,36.0736"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,36.0225"/>
+        <dia:point val="14.5,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="4"/>
+        <dia:connection handle="1" to="O23" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O17">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86276,39.2697;15.9803,40.9798"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,40.92"/>
+        <dia:point val="15.9205,39.3295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O3" connection="4"/>
+        <dia:connection handle="1" to="O23" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O18">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="49.9204,30.9159;57.2892,32.5296"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,30.975"/>
+        <dia:point val="49.9795,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O2" connection="3"/>
+        <dia:connection handle="1" to="O25" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O19">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="51.3498,35.8223;57.2803,35.9502"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,35.8725"/>
+        <dia:point val="51.4,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O1" connection="3"/>
+        <dia:connection handle="1" to="O25" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O20">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="50.9399,37.8657;57.2963,40.8362"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,40.77"/>
+        <dia:point val="51.0061,37.9319"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="3"/>
+        <dia:connection handle="1" to="O25" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O21">
+        <dia:attribute name="obj_pos">
+          <dia:point val="28.6,15.15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="28.55,15.1;38.35,24.9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="28.6,15.15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O22">
+        <dia:attribute name="obj_pos">
+          <dia:point val="33.45,20"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="29.9225,19.405;36.9775,20.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#BGP Route Reflector 1
+192.168.1.100#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="33.45,20"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O21" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O23">
+        <dia:attribute name="obj_pos">
+          <dia:point val="14.5,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="14.45,31;24.25,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="14.5,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O24">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.35,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.0013,35.305;21.6988,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 2
+192.168.1.101#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.35,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O23" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O25">
+        <dia:attribute name="obj_pos">
+          <dia:point val="41.7,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="41.65,31;51.45,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="41.7,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O26">
+        <dia:attribute name="obj_pos">
+          <dia:point val="46.55,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="44.2012,35.305;48.8987,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 3
+192.168.1.102#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="46.55,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O25" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-vnc-frr-route-reflector.png b/doc/figures/fig-vnc-frr-route-reflector.png
new file mode 100644 (file)
index 0000000..4770521
Binary files /dev/null and b/doc/figures/fig-vnc-frr-route-reflector.png differ
diff --git a/doc/figures/fig-vnc-frr-route-reflector.txt b/doc/figures/fig-vnc-frr-route-reflector.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/figures/fig-vnc-gw-rr.dia b/doc/figures/fig-vnc-gw-rr.dia
new file mode 100644 (file)
index 0000000..dab27f7
--- /dev/null
@@ -0,0 +1,1155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#Letter#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true" active="true">
+    <dia:object type="Standard - Text" version="1" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.5501,5.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="16.5501,5.5"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.5,14.85"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="29.45,14.8;47.05,14.9"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.5,14.85"/>
+        <dia:point val="47,14.85"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O31" connection="4"/>
+        <dia:connection handle="1" to="O37" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.5,28.85"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="29.45,28.8;47.05,28.9"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.5,28.85"/>
+        <dia:point val="47,28.85"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O33" connection="4"/>
+        <dia:connection handle="1" to="O35" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24.65,24"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24.6,19.65;24.7,24.05"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="24.65,24"/>
+        <dia:point val="24.65,19.7"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O33" connection="1"/>
+        <dia:connection handle="1" to="O31" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="51.85,24"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="51.8,19.65;51.9,24.05"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="51.85,24"/>
+        <dia:point val="51.85,19.7"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O35" connection="1"/>
+        <dia:connection handle="1" to="O37" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O5">
+      <dia:attribute name="obj_pos">
+        <dia:point val="47.4933,26.6076"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="47.4933,26.6076"/>
+        <dia:point val="29.0067,17.0924"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.0067,26.6076"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.0067,26.6076"/>
+        <dia:point val="47.4933,17.0924"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.8594,28.6941"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.8084,28.6431;19.8026,28.803"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.8594,28.6941"/>
+        <dia:point val="19.7516,28.752"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O11" connection="8"/>
+        <dia:connection handle="1" to="O33" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.81,32.625"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.7433,30.909;20.302,32.6917"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.81,32.625"/>
+        <dia:point val="20.2352,30.9757"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O13" connection="4"/>
+        <dia:connection handle="1" to="O33" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="59.9506,31.4965"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.4448,30.3087;60.0137,31.5595"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="59.9506,31.4965"/>
+        <dia:point val="56.5079,30.3717"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O17" connection="8"/>
+        <dia:connection handle="1" to="O35" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="59.9506,28.6923"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.6981,28.6413;60.0016,28.8056"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="59.9506,28.6923"/>
+        <dia:point val="56.7491,28.7546"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O15" connection="8"/>
+        <dia:connection handle="1" to="O35" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,27"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.95,26.95;16.86,30.3"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="10,27"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="13.405,28.625"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="11.1862,28.03;15.6237,29.5775"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 1
+VN 172.16.1.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="13.405,28.625"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O11" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O13">
+        <dia:attribute name="obj_pos">
+          <dia:point val="10,31"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="9.95,30.95;16.86,34.3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="10,31"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.8100000000000023"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.2500000000000018"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O14">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13.405,32.625"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.1862,32.03;15.6237,33.5775"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVE 2
+VN 172.16.2.1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="13.405,32.625"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O13" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O15">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60,27"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="59.95,26.95;66.86,30.3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60,27"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.8100000000000023"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.2500000000000018"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O16">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63.405,28.625"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.1863,28.03;65.6238,29.5775"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVE 3
+VN 172.16.3.1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63.405,28.625"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O15" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O17">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60,31"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="59.95,30.95;66.86,34.3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60,31"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.8100000000000023"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.2500000000000018"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O18">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63.405,32.625"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.1863,32.03;65.6238,33.5775"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVE 4
+VN 172.16.4.1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63.405,32.625"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O17" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O19">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.1073,12.7602"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.0469,12.6997;19.9513,13.7462"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.1073,12.7602"/>
+        <dia:point val="19.8909,13.6858"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O23" connection="8"/>
+        <dia:connection handle="1" to="O31" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O20">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.1475,18.0292"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.0831,16.5016;20.1253,18.0935"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.1475,18.0292"/>
+        <dia:point val="20.0609,16.5659"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O25" connection="8"/>
+        <dia:connection handle="1" to="O31" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O21">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.0374,12.8937"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.5559,12.8335;60.0976,13.7714"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="60.0374,12.8937"/>
+        <dia:point val="56.6162,13.7112"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O27" connection="8"/>
+        <dia:connection handle="1" to="O37" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O22">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.3187,18.1413"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.3502,16.5594;60.3834,18.206"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="60.3187,18.1413"/>
+        <dia:point val="56.4149,16.6241"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O29" connection="8"/>
+        <dia:connection handle="1" to="O37" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O23">
+        <dia:attribute name="obj_pos">
+          <dia:point val="9.85,8.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="9.8,8.8;16.2,15.2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="9.85,8.85"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O24">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13,12"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.27,11.405;14.73,12.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 1
+172.16.1.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="13,12"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O23" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O25">
+        <dia:attribute name="obj_pos">
+          <dia:point val="10,16"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="9.95,15.95;16.35,22.35"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="10,16"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O26">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13,19"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.27,18.405;14.73,19.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 2
+172.16.2.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="13,19"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O27">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60,9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="59.95,8.95;66.35,15.35"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60,9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O28">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63,12"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.27,11.405;64.73,12.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 3
+172.16.3.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63,12"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O29">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60.15,16.15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="60.1,16.1;66.5,22.5"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60.15,16.15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O30">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63.3,19.3"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.57,18.705;65.03,20.2525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 4
+172.16.4.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63.3,19.3"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O29" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O31">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.8,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="19.75,9.95;29.55,19.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="19.8,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O32">
+        <dia:attribute name="obj_pos">
+          <dia:point val="24.65,14.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="22.15,14.255;27.15,15.8025"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#VNC Gateway 1
+192.168.1.101#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="24.65,14.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O31" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O33">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.8,24"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="19.75,23.95;29.55,33.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="19.8,24"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O34">
+        <dia:attribute name="obj_pos">
+          <dia:point val="24.65,28.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="21.4637,28.255;27.8362,29.8025"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 1 (NVA)
+192.168.1.103#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="24.65,28.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O33" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O35">
+        <dia:attribute name="obj_pos">
+          <dia:point val="47,24"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="46.95,23.95;56.75,33.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="47,24"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O36">
+        <dia:attribute name="obj_pos">
+          <dia:point val="51.85,28.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="48.6638,28.255;55.0363,29.8025"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 2 (NVA)
+192.168.1.104#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="51.85,28.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O35" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O37">
+        <dia:attribute name="obj_pos">
+          <dia:point val="47,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="46.95,9.95;56.75,19.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="47,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O38">
+        <dia:attribute name="obj_pos">
+          <dia:point val="51.85,14.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="49.35,14.255;54.35,15.8025"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#VNC Gateway 2
+192.168.1.102#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="51.85,14.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O37" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O39">
+        <dia:attribute name="obj_pos">
+          <dia:point val="35,36"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="34.95,35.95;41.35,42.35"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="35,36"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O40">
+        <dia:attribute name="obj_pos">
+          <dia:point val="38.15,39.15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="35.8087,38.555;40.4912,40.1025"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RR
+192.168.1.105#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="38.15,39.15"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O39" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O41">
+      <dia:attribute name="obj_pos">
+        <dia:point val="40.7075,37.2272"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="40.6374,31.7234;48.005,37.2972"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="40.7075,37.2272"/>
+        <dia:point val="47.935,31.7934"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O39" connection="8"/>
+        <dia:connection handle="1" to="O35" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O42">
+      <dia:attribute name="obj_pos">
+        <dia:point val="35.6122,37.2137"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="28.4724,31.7497;35.6822,37.2838"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="35.6122,37.2137"/>
+        <dia:point val="28.5425,31.8198"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O39" connection="8"/>
+        <dia:connection handle="1" to="O33" connection="8"/>
+      </dia:connections>
+    </dia:object>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-vnc-gw-rr.png b/doc/figures/fig-vnc-gw-rr.png
new file mode 100644 (file)
index 0000000..7ae0630
Binary files /dev/null and b/doc/figures/fig-vnc-gw-rr.png differ
diff --git a/doc/figures/fig-vnc-gw-rr.txt b/doc/figures/fig-vnc-gw-rr.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/figures/fig-vnc-gw.dia b/doc/figures/fig-vnc-gw.dia
new file mode 100644 (file)
index 0000000..8270e20
--- /dev/null
@@ -0,0 +1,1058 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#Letter#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true" active="true">
+    <dia:object type="Standard - Text" version="1" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.5501,5.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="16.5501,5.5"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.5,14.85"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="29.45,14.8;47.05,14.9"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.5,14.85"/>
+        <dia:point val="47,14.85"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O31" connection="4"/>
+        <dia:connection handle="1" to="O37" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.5,28.85"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="29.45,28.8;47.05,28.9"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.5,28.85"/>
+        <dia:point val="47,28.85"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O33" connection="4"/>
+        <dia:connection handle="1" to="O35" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24.65,24"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24.6,19.65;24.7,24.05"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="24.65,24"/>
+        <dia:point val="24.65,19.7"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O33" connection="1"/>
+        <dia:connection handle="1" to="O31" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="51.85,24"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="51.8,19.65;51.9,24.05"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="51.85,24"/>
+        <dia:point val="51.85,19.7"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O35" connection="1"/>
+        <dia:connection handle="1" to="O37" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O5">
+      <dia:attribute name="obj_pos">
+        <dia:point val="47.4933,26.6076"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="47.4933,26.6076"/>
+        <dia:point val="29.0067,17.0924"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.0067,26.6076"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="28.9394,17.0251;47.5606,26.6749"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.0067,26.6076"/>
+        <dia:point val="47.4933,17.0924"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.8594,28.6941"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.8084,28.6431;19.8026,28.803"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.8594,28.6941"/>
+        <dia:point val="19.7516,28.752"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O11" connection="8"/>
+        <dia:connection handle="1" to="O33" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.81,32.625"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.7433,30.909;20.302,32.6917"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.81,32.625"/>
+        <dia:point val="20.2352,30.9757"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O13" connection="4"/>
+        <dia:connection handle="1" to="O33" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="59.9506,31.4965"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.4448,30.3087;60.0137,31.5595"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="59.9506,31.4965"/>
+        <dia:point val="56.5079,30.3717"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O17" connection="8"/>
+        <dia:connection handle="1" to="O35" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="59.9506,28.6923"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.6981,28.6413;60.0016,28.8056"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="59.9506,28.6923"/>
+        <dia:point val="56.7491,28.7546"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O15" connection="8"/>
+        <dia:connection handle="1" to="O35" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="10,27"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9.95,26.95;16.86,30.3"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="10,27"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="13.405,28.625"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="11.1862,28.03;15.6237,29.5775"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 1
+VN 172.16.1.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="13.405,28.625"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O11" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O13">
+        <dia:attribute name="obj_pos">
+          <dia:point val="10,31"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="9.95,30.95;16.86,34.3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="10,31"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.8100000000000023"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.2500000000000018"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O14">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13.405,32.625"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.1862,32.03;15.6237,33.5775"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVE 2
+VN 172.16.2.1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="13.405,32.625"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O13" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O15">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60,27"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="59.95,26.95;66.86,30.3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60,27"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.8100000000000023"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.2500000000000018"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O16">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63.405,28.625"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.1863,28.03;65.6238,29.5775"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVE 3
+VN 172.16.3.1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63.405,28.625"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O15" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O17">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60,31"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="59.95,30.95;66.86,34.3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60,31"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.8100000000000023"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3.2500000000000018"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O18">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63.405,32.625"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.1863,32.03;65.6238,33.5775"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVE 4
+VN 172.16.4.1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63.405,32.625"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O17" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O19">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.1073,12.7602"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.0469,12.6997;19.9513,13.7462"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.1073,12.7602"/>
+        <dia:point val="19.8909,13.6858"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O23" connection="8"/>
+        <dia:connection handle="1" to="O31" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O20">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.1475,18.0292"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.0831,16.5016;20.1253,18.0935"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="16.1475,18.0292"/>
+        <dia:point val="20.0609,16.5659"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O25" connection="8"/>
+        <dia:connection handle="1" to="O31" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O21">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.0374,12.8937"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.5559,12.8335;60.0976,13.7714"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="60.0374,12.8937"/>
+        <dia:point val="56.6162,13.7112"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O27" connection="8"/>
+        <dia:connection handle="1" to="O37" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O22">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.3187,18.1413"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="56.3502,16.5594;60.3834,18.206"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="60.3187,18.1413"/>
+        <dia:point val="56.4149,16.6241"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O29" connection="8"/>
+        <dia:connection handle="1" to="O37" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O23">
+        <dia:attribute name="obj_pos">
+          <dia:point val="9.85,8.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="9.8,8.8;16.2,15.2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="9.85,8.85"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O24">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13,12"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.27,11.405;14.73,12.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 1
+172.16.1.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="13,12"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O23" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O25">
+        <dia:attribute name="obj_pos">
+          <dia:point val="10,16"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="9.95,15.95;16.35,22.35"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="10,16"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O26">
+        <dia:attribute name="obj_pos">
+          <dia:point val="13,19"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="11.27,18.405;14.73,19.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 2
+172.16.2.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="13,19"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O27">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60,9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="59.95,8.95;66.35,15.35"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60,9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O28">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63,12"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.27,11.405;64.73,12.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 3
+172.16.3.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63,12"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O29">
+        <dia:attribute name="obj_pos">
+          <dia:point val="60.15,16.15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="60.1,16.1;66.5,22.5"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="60.15,16.15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="6.2999992370605469"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O30">
+        <dia:attribute name="obj_pos">
+          <dia:point val="63.3,19.3"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="61.57,18.705;65.03,20.2525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#CE 4
+172.16.4.2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="63.3,19.3"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O29" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O31">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.8,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="19.75,9.95;29.55,19.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="19.8,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O32">
+        <dia:attribute name="obj_pos">
+          <dia:point val="24.65,14.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="22.15,14.2363;27.1687,15.8399"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#VNC Gateway 1
+192.168.1.101#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="24.65,14.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O31" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O33">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.8,24"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="19.75,23.95;29.55,33.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="19.8,24"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O34">
+        <dia:attribute name="obj_pos">
+          <dia:point val="24.65,28.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="21.4637,28.2363;27.8549,29.8399"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 1 (NVA)
+192.168.1.103#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="24.65,28.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O33" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O35">
+        <dia:attribute name="obj_pos">
+          <dia:point val="47,24"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="46.95,23.95;56.75,33.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="47,24"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O36">
+        <dia:attribute name="obj_pos">
+          <dia:point val="51.85,28.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="48.6638,28.2363;55.0549,29.8399"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 2 (NVA)
+192.168.1.104#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="51.85,28.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O35" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O37">
+        <dia:attribute name="obj_pos">
+          <dia:point val="47,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="46.95,9.95;56.75,19.75"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="47,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O38">
+        <dia:attribute name="obj_pos">
+          <dia:point val="51.85,14.85"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="49.35,14.2363;54.3687,15.8399"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#VNC Gateway 2
+192.168.1.102#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="51.85,14.85"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O37" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-vnc-gw.png b/doc/figures/fig-vnc-gw.png
new file mode 100644 (file)
index 0000000..df8f23f
Binary files /dev/null and b/doc/figures/fig-vnc-gw.png differ
diff --git a/doc/figures/fig-vnc-gw.txt b/doc/figures/fig-vnc-gw.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/figures/fig-vnc-mesh.dia b/doc/figures/fig-vnc-mesh.dia
new file mode 100644 (file)
index 0000000..a8f702f
--- /dev/null
@@ -0,0 +1,1071 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#Letter#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true" active="true">
+    <dia:object type="Standard - Line" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24.2,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24.15,35.85;41.75,35.95"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="24.2,35.9"/>
+        <dia:point val="41.7,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="22.5347,32.178"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="22.4642,23.359;30.091,32.2485"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="22.5347,32.178"/>
+        <dia:point val="30.0205,23.4295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="43.1205,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="36.8099,23.3599;43.1901,32.5401"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="43.1205,32.4705"/>
+        <dia:point val="36.8795,23.4295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.5501,5.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="16.5501,5.5"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="23.2957,9.72508"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="23.225,9.65437;30.0912,16.6412"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="23.2957,9.72508"/>
+        <dia:point val="30.0205,16.5705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O33" connection="8"/>
+        <dia:connection handle="1" to="O15" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O5">
+      <dia:attribute name="obj_pos">
+        <dia:point val="33.0601,9.675"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="33.0098,9.62471;33.1421,15.1003"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="33.0601,9.675"/>
+        <dia:point val="33.0918,15.05"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O35" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="44.4726,9.675"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="36.8089,9.60437;44.5432,16.6411"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="44.4726,9.675"/>
+        <dia:point val="36.8795,16.5705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O37" connection="6"/>
+        <dia:connection handle="1" to="O15" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86406,31.0665;15.979,32.529"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,31.125"/>
+        <dia:point val="15.9205,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O27" connection="4"/>
+        <dia:connection handle="1" to="O17" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.87151,35.8489;14.5511,36.0736"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,36.0225"/>
+        <dia:point val="14.5,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O29" connection="4"/>
+        <dia:connection handle="1" to="O17" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86276,39.2697;15.9803,40.9798"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,40.92"/>
+        <dia:point val="15.9205,39.3295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O31" connection="4"/>
+        <dia:connection handle="1" to="O17" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="49.9204,30.9159;57.2892,32.5296"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,30.975"/>
+        <dia:point val="49.9795,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O21" connection="3"/>
+        <dia:connection handle="1" to="O19" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="51.3498,35.8223;57.2803,35.9502"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,35.8725"/>
+        <dia:point val="51.4,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O23" connection="3"/>
+        <dia:connection handle="1" to="O19" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="50.9399,37.8657;57.2963,40.8362"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,40.77"/>
+        <dia:point val="51.0061,37.9319"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O25" connection="3"/>
+        <dia:connection handle="1" to="O19" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O13">
+      <dia:attribute name="obj_pos">
+        <dia:point val="62.55,31.6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="62.55,31.005;62.55,31.7525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="62.55,31.6"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O14">
+      <dia:attribute name="obj_pos">
+        <dia:point val="59.65,31.65"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="59.65,31.055;59.65,31.8025"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="59.65,31.65"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O15">
+        <dia:attribute name="obj_pos">
+          <dia:point val="28.6,15.15"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="28.55,15.1;38.35,24.9"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="28.6,15.15"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O16">
+        <dia:attribute name="obj_pos">
+          <dia:point val="33.45,20"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="31.1025,19.405;35.7975,20.9525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 1
+192.168.1.100#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="33.45,20"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O15" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O17">
+        <dia:attribute name="obj_pos">
+          <dia:point val="14.5,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="14.45,31;24.25,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="14.5,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O18">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.35,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="17.0013,35.305;21.6988,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 2
+192.168.1.101#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.35,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O17" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O19">
+        <dia:attribute name="obj_pos">
+          <dia:point val="41.7,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="41.65,31;51.45,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="41.7,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O20">
+        <dia:attribute name="obj_pos">
+          <dia:point val="46.55,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="44.2012,35.305;48.8987,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 3
+192.168.1.102#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="46.55,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O19" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Box" version="0" id="O21">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O22">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 7
+VN 172.16.6.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,30.975"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O21" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O23">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O24">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 8
+VN 172.16.8.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,35.8725"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O23" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O25">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O26">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 9
+VN 172.16.134.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,40.77"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O25" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O27">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O28">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 4
+VN 172.16.4.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,31.125"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O27" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O29">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O30">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 5
+VN 172.16.130.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,36.0225"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O29" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O31">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O32">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 6
+VN 172.16.132.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,40.92"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O31" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O33">
+      <dia:attribute name="obj_pos">
+        <dia:point val="18.2451,6.425"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="18.1951,6.375;25.1051,9.725"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="18.2451,6.425"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O34">
+      <dia:attribute name="obj_pos">
+        <dia:point val="21.6501,8.05"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="19.4251,7.43631;23.8938,9.03988"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 1
+VN 172.16.0.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="21.6501,8.05"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O33" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O35">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.6551,6.425"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="29.6051,6.375;36.5151,9.725"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="29.6551,6.425"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O36">
+      <dia:attribute name="obj_pos">
+        <dia:point val="33.0601,8.05"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="30.8338,7.43631;35.305,9.03988"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 2
+VN 172.16.2.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="33.0601,8.05"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O35" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O37">
+      <dia:attribute name="obj_pos">
+        <dia:point val="41.0676,6.425"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="41.0176,6.375;47.9276,9.725"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="41.0676,6.425"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O38">
+      <dia:attribute name="obj_pos">
+        <dia:point val="44.4726,8.05"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="41.8376,7.43631;47.1263,9.03988"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 3
+VN 172.16.128.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="44.4726,8.05"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O37" connection="8"/>
+      </dia:connections>
+    </dia:object>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-vnc-mesh.png b/doc/figures/fig-vnc-mesh.png
new file mode 100644 (file)
index 0000000..fa0762d
Binary files /dev/null and b/doc/figures/fig-vnc-mesh.png differ
diff --git a/doc/figures/fig-vnc-mesh.txt b/doc/figures/fig-vnc-mesh.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/figures/fig-vnc-redundant-route-reflectors.dia b/doc/figures/fig-vnc-redundant-route-reflectors.dia
new file mode 100644 (file)
index 0000000..4065b8b
--- /dev/null
@@ -0,0 +1,871 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#Letter#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.5399999618530273"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true" active="true">
+    <dia:object type="Standard - Box" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,39.095;64.0901,42.445"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,39.145"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,34.1975;64.0901,37.5475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,34.2475"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="57.1801,29.3;64.0901,32.65"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="57.2301,29.35"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,39.245;8.9726,42.595"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,39.295"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O4">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,34.3475;8.9726,37.6975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,34.3975"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Box" version="0" id="O5">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.0626,29.45;8.9726,32.8"/>
+      </dia:attribute>
+      <dia:attribute name="elem_corner">
+        <dia:point val="2.1126,29.5"/>
+      </dia:attribute>
+      <dia:attribute name="elem_width">
+        <dia:real val="6.8100000000000023"/>
+      </dia:attribute>
+      <dia:attribute name="elem_height">
+        <dia:real val="3.2500000000000018"/>
+      </dia:attribute>
+      <dia:attribute name="show_background">
+        <dia:boolean val="true"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O6">
+      <dia:attribute name="obj_pos">
+        <dia:point val="22.5347,32.178"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="22.4648,17.4572;42.6316,32.2479"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="22.5347,32.178"/>
+        <dia:point val="42.5617,17.5271"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O26" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O7">
+      <dia:attribute name="obj_pos">
+        <dia:point val="43.1205,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="22.6348,17.9948;43.1902,32.5402"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="43.1205,32.4705"/>
+        <dia:point val="22.7045,18.0645"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="1" to="O24" connection="7"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O8">
+      <dia:attribute name="obj_pos">
+        <dia:point val="16.5501,5.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="16.5501,4.905;16.5501,5.6525"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>##</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="16.5501,5.5"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O9">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="3.29385,30.5113;7.76004,32.1149"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 4
+VN 172.16.4.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,31.125"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O5" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O10">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.88385,35.4088;8.17004,37.0124"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 5
+VN 172.16.130.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,36.0225"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O11">
+      <dia:attribute name="obj_pos">
+        <dia:point val="5.5176,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.8826,40.3063;8.17129,41.9099"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 6
+VN 172.16.132.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="5.5176,40.92"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O3" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,30.3613;62.8788,31.9649"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 7
+VN 172.16.6.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,30.975"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O2" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O13">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.4101,35.2588;62.8788,36.8624"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 8
+VN 172.16.8.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,35.8725"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O1" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O14">
+      <dia:attribute name="obj_pos">
+        <dia:point val="60.6351,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="58.0026,40.1563;63.2863,41.7599"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#NVE 9
+VN 172.16.134.1#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.80000000000000004"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="60.6351,40.77"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O15">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,31.125"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86398,31.0664;15.9041,32.5291"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,31.125"/>
+        <dia:point val="15.8455,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O5" connection="4"/>
+        <dia:connection handle="1" to="O28" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O16">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,36.0225"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.8715,35.8489;14.4761,36.0736"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,36.0225"/>
+        <dia:point val="14.425,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="4"/>
+        <dia:connection handle="1" to="O28" connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O17">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.9226,40.92"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="8.86267,39.2696;15.9054,40.9799"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.9226,40.92"/>
+        <dia:point val="15.8455,39.3295"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O3" connection="4"/>
+        <dia:connection handle="1" to="O28" connection="5"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O18">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,30.975"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="49.8855,30.916;57.2891,32.5295"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,30.975"/>
+        <dia:point val="49.9445,32.4705"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O2" connection="3"/>
+        <dia:connection handle="1" to="O30" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O19">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,35.8725"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="51.3148,35.8223;57.2803,35.9502"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,35.8725"/>
+        <dia:point val="51.365,35.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O1" connection="3"/>
+        <dia:connection handle="1" to="O30" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O20">
+      <dia:attribute name="obj_pos">
+        <dia:point val="57.2301,40.77"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="50.9097,37.8613;57.2963,40.8362"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="57.2301,40.77"/>
+        <dia:point val="50.9759,37.9275"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O0" connection="3"/>
+        <dia:connection handle="1" to="O30" connection="8"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O21">
+      <dia:attribute name="obj_pos">
+        <dia:point val="24.25,15.05"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="24.1999,14.9999;41.6501,15.1501"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="24.25,15.05"/>
+        <dia:point val="41.6,15.1"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O22">
+      <dia:attribute name="obj_pos">
+        <dia:point val="19.1,31"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="18.9998,19.5998;19.1502,31.0502"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="19.1,31"/>
+        <dia:point val="19.05,19.65"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O23">
+      <dia:attribute name="obj_pos">
+        <dia:point val="46.4,19.6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="46.35,19.55;46.45,30.95"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="46.4,19.6"/>
+        <dia:point val="46.4,30.9"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O24">
+        <dia:attribute name="obj_pos">
+          <dia:point val="14.425,9.785"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="14.375,9.735;24.175,19.535"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="14.425,9.785"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O25">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.275,14.635"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="15.7475,14.04;22.8025,15.5875"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#BGP Route Reflector 1
+192.168.1.100#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.275,14.635"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O24" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O26">
+        <dia:attribute name="obj_pos">
+          <dia:point val="41.665,9.785"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="41.615,9.735;51.415,19.535"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="41.665,9.785"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O27">
+        <dia:attribute name="obj_pos">
+          <dia:point val="46.565,14.285"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="44.1013,13.69;49.0288,16.0375"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#Commercial Router
+Route Reflector
+192.168.1.104#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="46.565,14.285"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O28">
+        <dia:attribute name="obj_pos">
+          <dia:point val="14.425,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="14.375,31;24.175,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="14.425,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000007629394531"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O29">
+        <dia:attribute name="obj_pos">
+          <dia:point val="19.275,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="16.9262,35.305;21.6238,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 2
+192.168.1.101#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="19.275,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O28" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O30">
+        <dia:attribute name="obj_pos">
+          <dia:point val="41.665,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="41.615,31;51.415,40.8"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="41.665,31.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="9.7000026702880859"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="1" id="O31">
+        <dia:attribute name="obj_pos">
+          <dia:point val="46.515,35.9"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="44.1662,35.305;48.8637,36.8525"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#NVA 3
+192.168.1.102#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="0.80000000000000004"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="46.515,35.9"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="1"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+        <dia:attribute name="valign">
+          <dia:enum val="3"/>
+        </dia:attribute>
+        <dia:connections>
+          <dia:connection handle="0" to="O30" connection="8"/>
+        </dia:connections>
+      </dia:object>
+    </dia:group>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig-vnc-redundant-route-reflectors.png b/doc/figures/fig-vnc-redundant-route-reflectors.png
new file mode 100644 (file)
index 0000000..06a27b6
Binary files /dev/null and b/doc/figures/fig-vnc-redundant-route-reflectors.png differ
diff --git a/doc/figures/fig-vnc-redundant-route-reflectors.txt b/doc/figures/fig-vnc-redundant-route-reflectors.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/doc/figures/fig_topologies_full.dia b/doc/figures/fig_topologies_full.dia
new file mode 100644 (file)
index 0000000..7ec3398
--- /dev/null
@@ -0,0 +1,533 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#A4#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true">
+    <dia:object type="Standard - Line" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8,11.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.9,11;8.1,12"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8,11.5"/>
+        <dia:point val="3,11.5"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O6" connection="3"/>
+        <dia:connection handle="1" to="O8" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="1.5,10"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="1,4.9;2,10.1"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="1.5,10"/>
+        <dia:point val="1.5,5"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O8" connection="1"/>
+        <dia:connection handle="1" to="O10" connection="6"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="2.56066,4.56066"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.1364,4.1364;8.8636,10.8636"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="2.56066,4.56066"/>
+        <dia:point val="8.43934,10.4393"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O10" connection="7"/>
+        <dia:connection handle="1" to="O6" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.43934,4.56066"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.1364,4.1364;8.8636,10.8636"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.43934,4.56066"/>
+        <dia:point val="2.56066,10.4393"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="5"/>
+        <dia:connection handle="1" to="O8" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O4">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,1.95;11.05,5.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O5">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.15,4.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.15,2.555;10.945,5.04"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.15,4.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O6">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,9.95;11.05,13.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O7">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.15,12.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.105,10.555;10.9,13.04"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF4#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.15,12.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O8">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="-0.05,9.95;3.05,13.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="0,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O9">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0.2,12.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="0.2,10.555;2.995,13.04"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF3#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="0.2,12.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O10">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0,2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="-0.05,1.95;3.05,5.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="0,2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O11">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0.2,4.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="0.155,2.555;2.95,5.04"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="0.2,4.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:object type="Standard - Line" version="0" id="O12">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8,3.5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.9,3;8.1,4"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8,3.5"/>
+        <dia:point val="3,3.5"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="3"/>
+        <dia:connection handle="1" to="O10" connection="4"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O13">
+      <dia:attribute name="obj_pos">
+        <dia:point val="9.5,5"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="9,4.9;10,10.1"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="9.5,5"/>
+        <dia:point val="9.5,10"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="6"/>
+        <dia:connection handle="1" to="O6" connection="1"/>
+      </dia:connections>
+    </dia:object>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig_topologies_full.png b/doc/figures/fig_topologies_full.png
new file mode 100644 (file)
index 0000000..d39e5e2
Binary files /dev/null and b/doc/figures/fig_topologies_full.png differ
diff --git a/doc/figures/fig_topologies_full.txt b/doc/figures/fig_topologies_full.txt
new file mode 100644 (file)
index 0000000..cc8025a
--- /dev/null
@@ -0,0 +1,6 @@
+(RF1)--(RF2)
+  | \  / |
+  |  \/  |
+  |  /\  |
+  | /  \ |
+(RF3)--(RF4)
diff --git a/doc/figures/fig_topologies_rs.dia b/doc/figures/fig_topologies_rs.dia
new file mode 100644 (file)
index 0000000..f8aa18d
--- /dev/null
@@ -0,0 +1,499 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute name="background">
+      <dia:color val="#ffffff"/>
+    </dia:attribute>
+    <dia:attribute name="pagebreak">
+      <dia:color val="#000099"/>
+    </dia:attribute>
+    <dia:attribute name="paper">
+      <dia:composite type="paper">
+        <dia:attribute name="name">
+          <dia:string>#A4#</dia:string>
+        </dia:attribute>
+        <dia:attribute name="tmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="bmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="lmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="rmargin">
+          <dia:real val="2.8222000598907471"/>
+        </dia:attribute>
+        <dia:attribute name="is_portrait">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+        <dia:attribute name="scaling">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="fitto">
+          <dia:boolean val="false"/>
+        </dia:attribute>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="grid">
+      <dia:composite type="grid">
+        <dia:attribute name="width_x">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="width_y">
+          <dia:real val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_x">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:attribute name="visible_y">
+          <dia:int val="1"/>
+        </dia:attribute>
+        <dia:composite type="color"/>
+      </dia:composite>
+    </dia:attribute>
+    <dia:attribute name="color">
+      <dia:color val="#d8e5e5"/>
+    </dia:attribute>
+    <dia:attribute name="guides">
+      <dia:composite type="guides">
+        <dia:attribute name="hguides"/>
+        <dia:attribute name="vguides"/>
+      </dia:composite>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer name="Background" visible="true">
+    <dia:object type="Standard - Line" version="0" id="O0">
+      <dia:attribute name="obj_pos">
+        <dia:point val="4,8.45"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.09695,8.07589;4.46371,10.8134"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="4,8.45"/>
+        <dia:point val="2.56066,10.4393"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="5"/>
+        <dia:connection handle="1" to="O10" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O1">
+      <dia:attribute name="obj_pos">
+        <dia:point val="4,6.6"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="2.09449,4.19064;4.46617,6.97002"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="4,6.6"/>
+        <dia:point val="2.56066,4.56066"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="0"/>
+        <dia:connection handle="1" to="O12" connection="7"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O2">
+      <dia:attribute name="obj_pos">
+        <dia:point val="7,8.45"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="6.53629,8.07589;8.90305,10.8134"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="7,8.45"/>
+        <dia:point val="8.43934,10.4393"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O4" connection="7"/>
+        <dia:connection handle="1" to="O8" connection="0"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O3">
+      <dia:attribute name="obj_pos">
+        <dia:point val="8.43934,4.56066"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="6.53383,4.19064;8.90551,6.97002"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="8.43934,4.56066"/>
+        <dia:point val="7,6.6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#ff0000"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.20000000000000001"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="start_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow">
+        <dia:enum val="22"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_length">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:attribute name="end_arrow_width">
+        <dia:real val="0.5"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection handle="0" to="O6" connection="5"/>
+        <dia:connection handle="1" to="O4" connection="2"/>
+      </dia:connections>
+    </dia:object>
+    <dia:group>
+      <dia:object type="Standard - Box" version="0" id="O4">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4,6.6"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="3.95,6.55;7.05,8.5"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="4,6.6"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="1.8500000000000014"/>
+        </dia:attribute>
+        <dia:attribute name="show_background">
+          <dia:boolean val="true"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O5">
+        <dia:attribute name="obj_pos">
+          <dia:point val="4.55,8"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="4.55,6.55;6.55,8.9"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RS#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="4.55,8"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O6">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,1.95;11.05,5.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O7">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.15,4.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.15,2.6;10.9,4.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF2#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.15,4.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O8">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="7.95,9.95;11.05,13.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="8,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O9">
+        <dia:attribute name="obj_pos">
+          <dia:point val="8.15,12.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="8.15,10.6;10.9,12.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF4#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="8.15,12.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O10">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0,10"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="-0.05,9.95;3.05,13.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="0,10"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O11">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0.2,12.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="0.2,10.6;2.95,12.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF3#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="0.2,12.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+    <dia:group>
+      <dia:object type="Standard - Ellipse" version="0" id="O12">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0,2"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="-0.05,1.95;3.05,5.05"/>
+        </dia:attribute>
+        <dia:attribute name="elem_corner">
+          <dia:point val="0,2"/>
+        </dia:attribute>
+        <dia:attribute name="elem_width">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="elem_height">
+          <dia:real val="3"/>
+        </dia:attribute>
+        <dia:attribute name="aspect">
+          <dia:enum val="2"/>
+        </dia:attribute>
+      </dia:object>
+      <dia:object type="Standard - Text" version="0" id="O13">
+        <dia:attribute name="obj_pos">
+          <dia:point val="0.2,4.05"/>
+        </dia:attribute>
+        <dia:attribute name="obj_bb">
+          <dia:rectangle val="0.2,2.6;2.95,4.95"/>
+        </dia:attribute>
+        <dia:attribute name="text">
+          <dia:composite type="text">
+            <dia:attribute name="string">
+              <dia:string>#RF1#</dia:string>
+            </dia:attribute>
+            <dia:attribute name="font">
+              <dia:font family="sans" style="0" name="Helvetica"/>
+            </dia:attribute>
+            <dia:attribute name="height">
+              <dia:real val="2"/>
+            </dia:attribute>
+            <dia:attribute name="pos">
+              <dia:point val="0.2,4.05"/>
+            </dia:attribute>
+            <dia:attribute name="color">
+              <dia:color val="#000000"/>
+            </dia:attribute>
+            <dia:attribute name="alignment">
+              <dia:enum val="0"/>
+            </dia:attribute>
+          </dia:composite>
+        </dia:attribute>
+      </dia:object>
+    </dia:group>
+  </dia:layer>
+</dia:diagram>
diff --git a/doc/figures/fig_topologies_rs.png b/doc/figures/fig_topologies_rs.png
new file mode 100644 (file)
index 0000000..014225c
Binary files /dev/null and b/doc/figures/fig_topologies_rs.png differ
diff --git a/doc/figures/fig_topologies_rs.txt b/doc/figures/fig_topologies_rs.txt
new file mode 100644 (file)
index 0000000..0bd1730
--- /dev/null
@@ -0,0 +1,5 @@
+(RF1)  (RF2)
+    \  /
+    [RS]
+    /  \
+(RF3)  (RF4)
diff --git a/doc/figures/frr-icon.svg b/doc/figures/frr-icon.svg
new file mode 100644 (file)
index 0000000..f7bdebc
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   viewBox="0 0 255.16251 264.35001"
+   height="264.35001"
+   width="255.16251"
+   xml:space="preserve"
+   version="1.1"
+   id="svg2"><metadata
+     id="metadata8"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+     id="defs6" /><g
+     transform="matrix(1.25,0,0,-1.25,0,264.35)"
+     id="g10"><g
+       transform="scale(0.1,0.1)"
+       id="g12"><path
+         id="path14"
+         style="fill:#f36f16;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 260.984,905.711 c 0,-431.5 345.223,-786.52 788.866,-832.2696 l 0,290.4566 c -274.799,44.071 -483.912,269.543 -484.475,541.813 0.563,272.249 209.676,497.819 484.475,541.849 l 0,290.5 C 606.207,1692.18 261.063,1337.24 260.984,905.711" /><path
+         id="path16"
+         style="fill:#f36f16;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 709.863,908.891 c 0,-197.121 146.297,-362.243 343.647,-408.469 l 0,816.938 C 856.16,1271.14 709.863,1106.06 709.863,908.891" /><path
+         id="path18"
+         style="fill:#f36f16;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 748.035,2114.83 1.395,-202.42 C 349.336,1773.27 53.4609,1430.82 2.73828,1017.01 L 0,994.961 l 133.66,0 2.309,17.319 c 60.746,449.24 447.246,801.35 928.931,838.53 l 19.35,1.55 -336.215,262.47" /><path
+         id="path20"
+         style="fill:#393536;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 1395.52,1123.39 c 0,-51.43 -41.66,-93.14 -93.14,-93.14 -51.42,0 -93.17,41.71 -93.17,93.14 0,51.46 41.75,93.19 93.17,93.19 51.48,0 93.14,-41.73 93.14,-93.19" /><path
+         id="path22"
+         style="fill:#f36f16;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 1529.56,476.52 49.41,-72.372 c 118.33,73.59 206.07,171.122 264.08,280.274 l -90.08,18.258 C 1701.77,615.23 1627.9,537.191 1529.56,476.52 Z m 338.86,848.67 -95.9,0 c 44.87,-92.73 68.09,-194.02 68.42,-295.5 0,-11.12 -0.48,-22.22 -1.06,-33.311 l 80.2,-75.578 c 5.3,36.097 8.22,72.5 8.14,108.889 0.34,100.55 -20.33,201.15 -59.8,295.5" /><path
+         id="path24"
+         style="fill:#f36f16;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 1663.19,790.07 378.12,-76.73 -321,302.64 c 0.23,6.25 0.73,12.42 0.73,18.71 0,284.04 -218.31,520.69 -508.02,574.72 l 0,-127.07 c 215.24,-51.78 373.82,-232.3 374.38,-447.49 -0.56,-215.42 -159.14,-395.901 -374.38,-447.709 l 0,-127.129 C 1214.79,460.289 1537.38,0 1537.38,0 l 164.55,0 -353.76,500.422 c 139.05,58.219 251.25,161.488 315.02,289.648" /></g></g></svg>
\ No newline at end of file
diff --git a/doc/figures/frr-logo-icon.png b/doc/figures/frr-logo-icon.png
new file mode 100644 (file)
index 0000000..37973fc
Binary files /dev/null and b/doc/figures/frr-logo-icon.png differ
diff --git a/doc/figures/frr-logo-medium.png b/doc/figures/frr-logo-medium.png
new file mode 100644 (file)
index 0000000..04e18eb
Binary files /dev/null and b/doc/figures/frr-logo-medium.png differ
diff --git a/doc/figures/frr-logo-small.png b/doc/figures/frr-logo-small.png
new file mode 100644 (file)
index 0000000..2a9a2c7
Binary files /dev/null and b/doc/figures/frr-logo-small.png differ
diff --git a/doc/figures/frr-logo.png b/doc/figures/frr-logo.png
new file mode 100644 (file)
index 0000000..6e66414
Binary files /dev/null and b/doc/figures/frr-logo.png differ
diff --git a/doc/figures/git_branches.png b/doc/figures/git_branches.png
new file mode 100644 (file)
index 0000000..21001c3
Binary files /dev/null and b/doc/figures/git_branches.png differ
diff --git a/doc/figures/git_branches.svg b/doc/figures/git_branches.svg
new file mode 100644 (file)
index 0000000..0c2c96e
--- /dev/null
@@ -0,0 +1,720 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   viewBox="52 37 349.25195 651.46875"
+   width="349.25195"
+   height="651.46875"
+   id="svg2"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="git_branches.svg">
+  <metadata
+     id="metadata376">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs374" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1596"
+     inkscape:window-height="848"
+     id="namedview372"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:zoom="0.89517435"
+     inkscape:cx="53.149337"
+     inkscape:cy="353.95197"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg2" />
+  <g
+     id="g12"
+     transform="translate(-3.09375,-3.7812531)">
+    <path
+       d="M 216,98.125 216,684"
+       id="path14"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#000100;stroke-width:8" />
+    <path
+       d="M 205,99.5 216,72 227,99.5"
+       id="path16"
+       inkscape:connector-curvature="0"
+       style="fill:#000100" />
+    <path
+       d="M 225.625,692.25 216,684 l -9.625,8.25 0,-30.25 9.625,-8.25 9.625,8.25"
+       id="path18"
+       inkscape:connector-curvature="0"
+       style="fill:#000100" />
+  </g>
+  <path
+     d="m 212.90625,644.21875 -72,-36"
+     id="path20"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 212.90625,428.21875 -72,-36"
+     id="path22"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <text
+     font-weight="bold"
+     font-size="12"
+     xml:space="preserve"
+     id="text30"
+     style="font-weight:bold;font-size:12px;font-family:Helvetica;text-anchor:middle;fill:#ff0000"
+     x="143.89426"
+     y="427.82574"><tspan
+       id="tspan32">1.0</tspan><tspan
+       x="143.89426"
+       y="443.82574"
+       id="tspan34">Release</tspan><tspan
+       x="143.89426"
+       y="459.82574"
+       id="tspan36">Branch</tspan></text>
+  <path
+     d="m 213.73825,392.21875 -72.832,-36"
+     id="path42"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 212.73825,356.21875 -71.832,-36"
+     id="path44"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 220.90625,644.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path46"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,464.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path48"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,428.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path50"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,608.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path52"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,140.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path54"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,356.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path58"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,392.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path60"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <text
+     font-weight="bold"
+     font-size="12"
+     xml:space="preserve"
+     id="text62"
+     style="font-weight:bold;font-size:12px;font-family:Helvetica;text-anchor:middle;fill:#000100"
+     x="213.21825"
+     y="45.748047"><tspan
+       id="tspan64">Master</tspan><tspan
+       x="213.21825"
+       y="61.748047"
+       id="tspan66">(Stable)</tspan></text>
+  <g
+     id="g82"
+     transform="translate(-3.09375,-3.7812531)">
+    <path
+       d="m 144.832,612 0,-117.875"
+       id="path84"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#ff0000;stroke-width:8" />
+    <path
+       d="m 133.832,495.5 11,-27.5 11,27.5"
+       id="path86"
+       inkscape:connector-curvature="0"
+       style="fill:#ff0000" />
+  </g>
+  <g
+     id="g88"
+     transform="translate(-3.09375,-3.7812531)">
+    <path
+       d="m 144.832,396 0,-189.875"
+       id="path90"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#ff0000;stroke-width:8" />
+    <path
+       d="m 133.832,207.5 11,-27.5 11,27.5"
+       id="path92"
+       inkscape:connector-curvature="0"
+       style="fill:#ff0000" />
+  </g>
+  <text
+     font-weight="bold"
+     font-size="12"
+     xml:space="preserve"
+     id="text94"
+     style="font-weight:bold;font-size:12px;font-family:Helvetica;text-anchor:middle;fill:#ff0000"
+     x="143.89426"
+     y="138.82574"><tspan
+       id="tspan96">1.1</tspan><tspan
+       x="143.89426"
+       y="154.82574"
+       id="tspan98">Release</tspan><tspan
+       x="143.89426"
+       y="170.82574"
+       id="tspan100">Branch</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text102"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="51.90625"
+     y="611.97876"><tspan
+       id="tspan104">Version 1.</tspan><tspan
+       id="tspan106">0.a1</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text108"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="52.679649"
+     y="395.97876"><tspan
+       id="tspan110">Version 1.1.a1</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text112"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="51.90625"
+     y="359.97876"><tspan
+       id="tspan114">Version 1.1.a2</tspan></text>
+  <path
+     d="m 148.90625,608.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path116"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,392.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path118"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,356.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path120"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,320.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path122"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text124"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="52.679649"
+     y="323.97876"><tspan
+       id="tspan126">Version 1.</tspan><tspan
+       id="tspan128">1.b1</tspan></text>
+  <g
+     id="g156"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,540 -127.375,0"
+       id="path158"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,547 -17.5,-7 17.5,-7"
+       id="path160"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g162"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,504 -127.375,0"
+       id="path164"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,511 -17.5,-7 17.5,-7"
+       id="path166"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g168"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,468 -127.375,0"
+       id="path170"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,475 -17.5,-7 17.5,-7"
+       id="path172"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g174"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,432 -127.375,0"
+       id="path176"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,439 -17.5,-7 17.5,-7"
+       id="path178"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g180"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,396 -127.375,0"
+       id="path182"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,403 -17.5,-7 17.5,-7"
+       id="path184"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g186"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,360 -127.375,0"
+       id="path188"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,367 -17.5,-7 17.5,-7"
+       id="path190"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g192"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,324 -127.375,0"
+       id="path194"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,331 -17.5,-7 17.5,-7"
+       id="path196"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g198"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,288 -127.375,0"
+       id="path200"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,295 -17.5,-7 17.5,-7"
+       id="path202"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g204"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,252 -127.375,0"
+       id="path206"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,259 -17.5,-7 17.5,-7"
+       id="path208"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g210"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,216 -127.375,0"
+       id="path212"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,223 -17.5,-7 17.5,-7"
+       id="path214"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g216"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 404,180 -99.375,0"
+       id="path218"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,187 -17.5,-7 17.5,-7"
+       id="path220"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g222"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,180 -127.375,0"
+       id="path224"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,187 -17.5,-7 17.5,-7"
+       id="path226"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g228"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,144 -127.375,0"
+       id="path230"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,151 -17.5,-7 17.5,-7"
+       id="path232"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text234"
+     x="256.90625"
+     y="531.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan236">Patch Email (Patchwork)</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text238"
+     x="256.90625"
+     y="495.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan240">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text242"
+     x="256.90625"
+     y="459.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan244">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text246"
+     x="256.90625"
+     y="423.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan248">Patch Email (Patchwork)</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text250"
+     x="256.90625"
+     y="387.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan252">Patch Email (Patchwork)</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text254"
+     x="256.90625"
+     y="351.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan256">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text258"
+     x="256.90625"
+     y="315.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan260">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text262"
+     x="256.90625"
+     y="279.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan264">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text266"
+     x="256.90625"
+     y="243.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan268">Patch Email (Patchwork)</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text270"
+     x="256.90625"
+     y="207.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan272">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text274"
+     x="256.90625"
+     y="171.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan276">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text278"
+     x="256.90625"
+     y="135.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan280">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text282"
+     x="256.90625"
+     y="603.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan284">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text286"
+     x="256.90625"
+     y="567.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan288">Github Pull Request</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text290"
+     x="256.90625"
+     y="567.21875"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
+       id="tspan292">Github Pull Request</tspan></text>
+  <g
+     id="g294"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,612 -127.72,0"
+       id="path296"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.155,619 -17.5,-7 17.5,-7"
+       id="path298"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <g
+     id="g300"
+     transform="translate(-67.09375,-3.7812531)">
+    <path
+       d="m 432,576 -127.375,0"
+       id="path302"
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#666666;stroke-width:4" />
+    <path
+       d="m 305.5,583 -17.5,-7 17.5,-7"
+       id="path304"
+       inkscape:connector-curvature="0"
+       style="fill:#666666" />
+  </g>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text306"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="52.90625"
+     y="577.21875"><tspan
+       id="tspan308">Version 1.</tspan><tspan
+       id="tspan310">0.a2</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text312"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="52.90625"
+     y="541.21875"><tspan
+       id="tspan314">Version 1.</tspan><tspan
+       id="tspan316">0.b1</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text318"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="52.90625"
+     y="505.21875"><tspan
+       id="tspan320">Version 1.</tspan><tspan
+       id="tspan322">0.0</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text324"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="52.679649"
+     y="288.97876"><tspan
+       id="tspan326">Version 1.1.0</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text328"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="51.90625"
+     y="252.97874"><tspan
+       id="tspan330">Version 1.1.1</tspan></text>
+  <text
+     font-size="12"
+     xml:space="preserve"
+     id="text332"
+     style="font-size:12px;font-family:Helvetica;fill:#000100"
+     x="52.679649"
+     y="216.97874"><tspan
+       id="tspan334">Version 1.</tspan><tspan
+       id="tspan336">1.2</tspan></text>
+  <path
+     d="m 212.90625,608.21875 -72,-36"
+     id="path338"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 212.90625,572.21875 -72,-36"
+     id="path340"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 212.90625,536.21875 -72,-36"
+     id="path342"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 212.90625,320.21875 -72,-36"
+     id="path344"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 212.90625,284.21875 -72,-36"
+     id="path346"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 212.90625,248.21875 -72,-36"
+     id="path348"
+     inkscape:connector-curvature="0"
+     style="fill:none;stroke:#ff0000;stroke-width:8" />
+  <path
+     d="m 148.90625,571.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path350"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,535.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path352"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,499.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path354"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,284.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path356"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,248.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path358"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 148.90625,212.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path360"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,572.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path362"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,536.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path364"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,320.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path366"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,248.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path368"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+  <path
+     d="m 220.90625,284.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
+     id="path370"
+     inkscape:connector-curvature="0"
+     style="fill:#fffffe;stroke:#000100" />
+</svg>
diff --git a/doc/figures/ospf_api_architecture.png b/doc/figures/ospf_api_architecture.png
new file mode 100644 (file)
index 0000000..bd10a38
Binary files /dev/null and b/doc/figures/ospf_api_architecture.png differ
diff --git a/doc/figures/ospf_api_msghdr.png b/doc/figures/ospf_api_msghdr.png
new file mode 100644 (file)
index 0000000..5bc840f
Binary files /dev/null and b/doc/figures/ospf_api_msghdr.png differ
diff --git a/doc/figures/ospf_api_msgs1.png b/doc/figures/ospf_api_msgs1.png
new file mode 100644 (file)
index 0000000..a23cc61
Binary files /dev/null and b/doc/figures/ospf_api_msgs1.png differ
diff --git a/doc/figures/ospf_api_msgs2.png b/doc/figures/ospf_api_msgs2.png
new file mode 100644 (file)
index 0000000..8997ac4
Binary files /dev/null and b/doc/figures/ospf_api_msgs2.png differ
diff --git a/doc/filter.texi b/doc/filter.texi
deleted file mode 100644 (file)
index a494043..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-@node Filtering
-@comment  node-name,  next,  previous,  up
-@chapter Filtering
-
-Frr provides many very flexible filtering features.  Filtering is used
-for both input and output of the routing information.  Once filtering is
-defined, it can be applied in any direction.
-
-@menu
-* IP Access List::              
-* IP Prefix List::              
-@end menu
-
-@node IP Access List
-@comment  node-name,  next,  previous,  up
-@section IP Access List
-
-@deffn {Command} {access-list @var{name} permit @var{ipv4-network}} {}
-@deffnx {Command} {access-list @var{name} deny @var{ipv4-network}} {}
-@end deffn
-
-Basic filtering is done by @code{access-list} as shown in the
-following example.
-
-@example
-access-list filter deny 10.0.0.0/9
-access-list filter permit 10.0.0.0/8
-@end example
-
-@node IP Prefix List
-@comment  node-name,  next,  previous,  up
-@section IP Prefix List
-
-@command{ip prefix-list} provides the most powerful prefix based
-filtering mechanism.  In addition to @command{access-list} functionality,
-@command{ip prefix-list} has prefix length range specification and
-sequential number specification.  You can add or delete prefix based
-filters to arbitrary points of prefix-list using sequential number specification.
-
-If no ip prefix-list is specified, it acts as permit.  If @command{ip prefix-list} 
-is defined, and no match is found, default deny is applied.
-
-@c @deffn {Command} {ip prefix-list @var{name} [seq @var{number}] permit|deny [le @var{prefixlen}] [ge @var{prefixlen}]} {}
-@deffn {Command} {ip prefix-list @var{name} (permit|deny) @var{prefix} [le @var{len}] [ge @var{len}]} {}
-@deffnx {Command} {ip prefix-list @var{name} seq @var{number} (permit|deny) @var{prefix} [le @var{len}] [ge @var{len}]} {}
-
-You can create @command{ip prefix-list} using above commands.
-
-@table @asis
-
-@item @asis{seq}
-seq @var{number} can be set either automatically or manually.  In the
-case that sequential numbers are set manually, the user may pick any
-number less than 4294967295.  In the case that sequential number are set
-automatically, the sequential number will increase by a unit of five (5)
-per list.  If a list with no specified sequential number is created
-after a list with a specified sequential number, the list will
-automatically pick the next multiple of five (5) as the list number.
-For example, if a list with number 2 already exists and a new list with
-no specified number is created, the next list will be numbered 5.  If
-lists 2 and 7 already exist and a new list with no specified number is
-created, the new list will be numbered 10.
-
-@item @asis{le}
-@command{le} command specifies prefix length.  The prefix list will be 
-applied if the prefix length is less than or equal to the le prefix length.
-
-@item @asis{ge}
-@command{ge} command specifies prefix length.  The prefix list will be 
-applied if the prefix length is greater than or equal to the ge prefix length.
-
-@end table
-
-@end deffn
-
-Less than or equal to prefix numbers and greater than or equal to
-prefix numbers can be used together.  The order of the le and ge
-commands does not matter.
-
-If a prefix list with a different sequential number but with the exact
-same rules as a previous list is created, an error will result.
-However, in the case that the sequential number and the rules are
-exactly similar, no error will result.
-
-If a list with the same sequential number as a previous list is created,
-the new list will overwrite the old list.
-
-Matching of IP Prefix is performed from the smaller sequential number to the
-larger.  The matching will stop once any rule has been applied.
-
-In the case of no le or ge command, the prefix length must match exactly the
-length specified in the prefix list.
-
-@deffn {Command} {no ip prefix-list @var{name}} {}
-@end deffn
-
-@menu
-* ip prefix-list description::  
-* ip prefix-list sequential number control::  
-* Showing ip prefix-list::      
-* Clear counter of ip prefix-list::  
-@end menu
-
-@node ip prefix-list description
-@subsection ip prefix-list description
-
-@deffn {Command} {ip prefix-list @var{name} description @var{desc}} {}
-Descriptions may be added to prefix lists.  This command adds a
-description to the prefix list.
-@end deffn
-
-@deffn {Command} {no ip prefix-list @var{name} description [@var{desc}]} {}
-Deletes the description from a prefix list.  It is possible to use the
-command without the full description.
-@end deffn
-
-@node  ip prefix-list sequential number control
-@subsection ip prefix-list sequential number control
-
-@deffn {Command} {ip prefix-list sequence-number} {}
-With this command, the IP prefix list sequential number is displayed.
-This is the default behavior.
-@end deffn
-
-@deffn {Command} {no ip prefix-list sequence-number} {}
-With this command, the IP prefix list sequential number is not
-displayed.
-@end deffn
-
-@node  Showing ip prefix-list
-@subsection Showing ip prefix-list
-
-@deffn {Command} {show ip prefix-list} {}
-Display all IP prefix lists.
-@end deffn
-
-@deffn {Command} {show ip prefix-list @var{name}} {}
-Show IP prefix list can be used with a prefix list name.
-@end deffn
-
-@deffn {Command} {show ip prefix-list @var{name} seq @var{num}} {}
-Show IP prefix list can be used with a prefix list name and sequential
-number.
-@end deffn
-
-@deffn {Command} {show ip prefix-list @var{name} @var{a.b.c.d/m}} {}
-If the command longer is used, all prefix lists with prefix lengths equal to
-or longer than the specified length will be displayed.
-If the command first match is used, the first prefix length match will be
-displayed.
-@end deffn
-
-@deffn {Command} {show ip prefix-list @var{name} @var{a.b.c.d/m} longer} {}
-@end deffn
-
-@deffn {Command} {show ip prefix-list @var{name} @var{a.b.c.d/m} first-match} {}
-@end deffn
-
-@deffn {Command} {show ip prefix-list summary} {}
-@end deffn
-@deffn {Command} {show ip prefix-list summary @var{name}} {}
-@end deffn
-
-@deffn {Command} {show ip prefix-list detail} {}
-@end deffn
-@deffn {Command} {show ip prefix-list detail @var{name}} {}
-@end deffn
-
-@node  Clear counter of ip prefix-list
-@subsection Clear counter of ip prefix-list
-
-@deffn {Command} {clear ip prefix-list} {}
-Clears the counters of all IP prefix lists.  Clear IP Prefix List can be
-used with a specified name and prefix.
-@end deffn
-
-@deffn {Command} {clear ip prefix-list @var{name}} {}
-@end deffn
-
-@deffn {Command} {clear ip prefix-list @var{name} @var{a.b.c.d/m}} {}
-@end deffn
-
diff --git a/doc/frr-args.8.in b/doc/frr-args.8.in
deleted file mode 100644 (file)
index 3dc84e1..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-.TH frr-args 8 "28 August 2017" "@PACKAGE_FULLNAME@ general options" "Version @PACKAGE_VERSION@"
-.SH NAME
-frr-args \- common command line options for all @PACKAGE_FULLNAME@ daemons.
-.SH SYNOPSIS
-<\fBzebra\fR|\fBbgpd\fR|\fB...\fR>
-[\fB\-h\fR] [\fB\-v\fR]
-
-<\fBzebra\fR|\fBbgpd\fR|\fB...\fR>
-[\fB\-d\fR|\fB\-t\fR|\fB\-dt\fR]
-[\fB\-C\fR]
-[\fB\-f\fR \fIconfig-file\fR]
-[\fB\-i\fR \fIpid-file\fR]
-[\fB\-z\fR \fIzclient-path\fR]
-[\fB\-u\fR \fIuser\fR]
-[\fB\-g\fR \fIgroup\fR]
-[\fB\-A\fR \fIvty-addr\fR]
-[\fB\-P\fR \fIvty-port\fR]
-[\fB\-M\fR \fImodule\fR[\fB:\fIoptions\fR]]
-[\fB\-N\fR \fIpathspace\fR]
-[\fB\-\-vty_socket\fR \fIvty-path\fR]
-[\fB\-\-moduledir\fR \fImodule-path\fR]
-
-.SH DESCRIPTION
-@PACKAGE_NAME@ daemons share a large part of their command line options;
-this man page documents these.  For options on specific daemons please refer
-to their respective man pages.  Most of the common options are related to
-process control, configuration and common library functionality.
-
-.SH HELP AND VERSION
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Print a short description of the daemon's command line options.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print version and build information for the daemon.
-.PP
-Both of these options inhibit normal operation and will immediately exit.
-
-.SH PROCESS CONTROL
-These options control background operation:
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Launches the process in background/daemon mode, forking and detaching from
-the terminal.
-
-The parent process will delay its exit until the daemon/child has finished
-its initialization and has entered its main loop.  This is important for
-\fBzebra\fR startup because the other daemons will attempt to connect to
-\fBzebra\fR.  A return from \fBzebra -d\fR guarantees its readiness to
-accept these connections.
-.TP
-\fB\-t\fR, \fB\-\-terminal\fR
-Opens an interactive VTY session on the terminal, allowing for both state
-and configuration operations.  Note that the terminal starts operating after
-startup has completed and the configuration file has been loaded.
-
-The process will exit when end of file is detected on the terminal.  It is
-possible to daemonize a process started with \fB-t\fR (but without \fB-d\fR)
-by sending \fISIGQUIT\fR to the process (normally mapped to a \fI^\\\fR
-keypress.)
-.TP
-\fB\-dt\fR, \fB\-\-daemon \-\-terminal\fR
-This combination of the previous two options will delay the daemon from
-going into background until the terminal session ends (by end of file.)
-
-If the process receives \fISIGINT\fR (e.g. a \fI^C\fR keypress) in this
-mode, it will exit instead of daemonizing.
-.PP
-It is safe to suspend (\fISIGTSTP\fR / \fI^Z\fR) the terminal session
-opened by the previous two options;  this will only stop the terminal but
-not the protocol daemon itself (which runs in a separate second process.)
-
-.SH CONFIGURATION AND PATHS
-The following options control configuration and file system locations for
-@PACKAGE_NAME@ processes:
-.TP
-\fB\-f\fR, \fB\-\-config_file\fR \fIconfig-file\fR
-Specify a configuration file to be used instead of the default 
-\fB\fI@CFG_SYSCONF@/<daemon>.conf\fR file.
-
-Note that the daemon will attempt to write to this file if the
-\fIwrite file\fR command is issued on its VTY interface or through
-\fBvtysh\fR.
-.TP
-\fB\-C\fR, \fB\-\-dryrun\fR
-Load the configuration file and check its validity, then exit.
-.TP
-\fB\-i\fR, \fB\-\-pid_file\fR \fIpid-file\fR
-Output a pid file to a location other than the default 
-\fB\fI@CFG_STATE@/<daemon>.pid\fR.
-.TP
-\fB\-z\fR, \fB\-\-socket\fR \fIzclient-path\fR
-Override the path of the ZAPI socket used to communicate between \fBzebra\fR
-and the various protocol daemons. The default is
-\fB\fI@CFG_STATE@/zserv.api\fR.  The value of this option must be the same
-across all daemons.
-.TP
-\fB\-N\fR, \fB\-\-pathspace\fR \fIpathspace\fR
-Insert \fIpathspace\fR into all default paths, changing the defaults to:
-.IP
-\fB@CFG_SYSCONF@/\fIpathspace\fB/<daemon>.conf\fR
-.br
-\fB@CFG_STATE@/\fIpathspace\fB/<daemon>.pid\fR
-.br
-\fB@CFG_STATE@/\fIpathspace\fB/<daemon>.vty\fR
-.br
-\fB@CFG_STATE@/\fIpathspace\fB/zserv.api\fR
-
-\'.\' and \'/\' characters will not be accepted in \fIpathspace\fR, but the
-empty string will be accepted.
-
-Note that this only changes the respective defaults, it has no effect on
-the respective path if the \fB\-f\fR, \fB\-i\fR, \fB\-z\fR or
-\fB\-\-vty_socket\fR options are used.
-
-The purpose of this option is to easily group all file system related
-bits together for running multiple fully-separate "logical routers" on a
-system, particularly with Linux network namespaces.  Groups of daemons
-running with distinct \fIpathspace\fR values will be completely unaware
-of each other and not interact in any way.
-
-This option does not do any system setup (like network namespaces.) This
-must be done by the user, for example by running:
-.IP
-\fBip netns exec \fInamespace \fB<daemon> -N \fInamespace\fR
-
-.SH PROCESS CREDENTIALS
-.TP
-\fB\-u\fR, \fB\-\-user\fR \fIuser\fR
-(default: \fB@enable_user@\fR)
-.TP
-\fB\-g\fR, \fB\-\-group\fR \fIgroup\fR
-(default: \fB@enable_group@\fR)
-.IP
-Change the user/group which the daemon will switch to.
-.PP
-Note that there is an additional group, \fB@enable_vty_group@\fR, which
-controls group ownership of the VTY sockets.  The name of this group cannot
-currently be changed, and \fIuser\fR must be a member of this group.
-
-.SH VTY SETUP
-These following options control the daemon's VTY (interactive command line)
-interface.  The interface is available over TCP, using the telnet protocol,
-as well as through the \fBvtysh\fR frontend.
-.TP
-\fB\-A\fR, \fB--vty_addr\fR \fIvty-addr\fR
-Specify an IP/IPv6 address to bind the TCP VTY interface to.  It is
-generally recommended to specify \fI::1\fR or \fI127.0.0.1\fR.  For reasons
-of backwards compatibility, the default is to listen on all interfaces.
-.TP
-\fB\-P\fR, \fB--vty_port\fR \fIvty-port\fR
-Override the daemon's default TCP VTY port (each daemon has a different
-default value upwards of 2600, listed below.)  Specifying \fI0\fR disables
-the TCP VTY interface.
-
-Default ports are:
-
-.ta 16m
-zebra  2601
-.br
-ripd   2602
-.br
-ripngd 2603
-.br
-ospfd  2604
-.br
-bgpd   2605
-.br
-ospf6d 2606
-.br
-isisd  2608
-.br
-babeld 2609
-.br
-nhrpd  2610
-.br
-pimd   2611
-.br
-ldpd   2612
-.br
-eigrpd 2613
-
-Port 2607 is used for ospfd's Opaque LSA API, while port 2600 is used for
-the (insecure) TCP-ZEBRA interface.
-.TP
-\fB\-\-vty_socket\fR \fIvty-path\fR
-Overrides the directory used for the \fB<daemon>.vty\fR sockets.
-\fBvtysh\fR connects to these sockets in order to access each daemon's
-VTY.
-.br
-Default: \fB\fI@CFG_STATE@\fR[\fB/\fI<pathspace>\fR]
-
-NB: Unlike the other options, this option specifies a \fBdirectory\fR,
-not a full path.
-
-This option is primarily used by the SNAP packaging system, its semantics
-may change.  It should not be neccessary in most other scenarios.
-
-.SH MODULE LOADING
-@PACKAGE_NAME@ supports optional dynamically loadable modules, although
-these can only be loaded at startup.  The set of available modules may vary
-across distributions and packages, and modules may be available for
-installation as separate packages.
-.TP
-\fB\-M\fR, \fB\-\-module\fR \fImodule\fR[\fB:\fIoptions\fR]
-Load a module named \fImodule\fR, optionally passing \fIoptions\fR to it.
-
-If there is a \'/\' character in \fImodule\fR, the value is assumed to be
-a pathname to a module.
-
-If there is no \'/\' character, the module directory (see next option)
-is searched first for a module named "\fI<daemon>\fB_\fI<module>\fB.so\fR",
-then for "\fI<module>\fB.so\fR".
-This allows for a module to exist in variations appropriate for particular
-daemons, e.g. \fIzebra_snmp\fR and \fIbgp_snmp\fR, with the correct one
-selected by \fI\-M snmp\fR.
-
-The meaning of \fIoptions\fR is specific to the module being loaded.  Most
-modules currently ignore it.
-
-Modules are loaded in the order as listed on the command line.  This is
-not generally relevant.
-.TP
-\fB\-\-moduledir\fR \fImodule-path\fR
-Look for modules in the \fImodule-path\fR directory instead of the default
-\fI@CFG_MODULE@\fR.  (This path is \fBnot\fR affected by the \fB\-N\fR
-option.)
-.PP
-The list of loaded modules can be inspected at runtime with the
-\fBshow modules\fR VTY command.
-
-
-.SH "SEE ALSO"
-.BR zebra (8),
-.BR vtysh (1),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR bgpd (8),
-.BR isisd (8),
-.BR babeld (8),
-.BR nhrpd (8),
-.BR pimd (8),
-.BR ldpd (8),
-.BR eigrpd (8)
-
-\fIhttps://frrouting.org/
diff --git a/doc/frr-sphinx.mk b/doc/frr-sphinx.mk
new file mode 100644 (file)
index 0000000..df40567
--- /dev/null
@@ -0,0 +1,224 @@
+# Makefile for Sphinx documentation
+#
+
+# Sphinx is not designed to be invoked multiple times against the same toctree.
+.NOTPARALLEL:
+
+# You can set these variables from the command line.
+SPHINXOPTS    ?=
+SPHINXBUILD   ?= sphinx-build
+PAPER         ?=
+BUILDDIR      = _build
+
+# User-friendly check for sphinx-build
+ifneq ($(MAKECMDGOALS), clean)
+    ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+        SPHINXBUILD = sphinx-1.0-build
+    endif
+    ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+        $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/")
+    endif
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help
+help:
+       @echo "Please use \`make <target>' where <target> is one of"
+       @echo "  html       to make standalone HTML files"
+       @echo "  dirhtml    to make HTML files named index.html in directories"
+       @echo "  singlehtml to make a single large HTML file"
+       @echo "  pickle     to make pickle files"
+       @echo "  json       to make JSON files"
+       @echo "  htmlhelp   to make HTML files and a HTML help project"
+       @echo "  qthelp     to make HTML files and a qthelp project"
+       @echo "  applehelp  to make an Apple Help Book"
+       @echo "  devhelp    to make HTML files and a Devhelp project"
+       @echo "  epub       to make an epub"
+       @echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+       @echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+       @echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+       @echo "  text       to make text files"
+       @echo "  man        to make manual pages"
+       @echo "  texinfo    to make Texinfo files"
+       @echo "  info       to make Texinfo files and run them through makeinfo"
+       @echo "  gettext    to make PO message catalogs"
+       @echo "  changes    to make an overview of all changed/added/deprecated items"
+       @echo "  xml        to make Docutils-native XML files"
+       @echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+       @echo "  linkcheck  to check all external links for integrity"
+       @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+       @echo "  coverage   to run coverage check of the documentation (if enabled)"
+
+.PHONY: clean
+clean:
+       rm -rf $(BUILDDIR)/*
+
+.PHONY: html
+html:
+       $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+       @echo
+       @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+.PHONY: dirhtml
+dirhtml:
+       $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+       @echo
+       @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+.PHONY: singlehtml
+singlehtml:
+       $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+       @echo
+       @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+.PHONY: pickle
+pickle:
+       $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+       @echo
+       @echo "Build finished; now you can process the pickle files."
+
+.PHONY: json
+json:
+       $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+       @echo
+       @echo "Build finished; now you can process the JSON files."
+
+.PHONY: htmlhelp
+htmlhelp:
+       $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+       @echo
+       @echo "Build finished; now you can run HTML Help Workshop with the" \
+             ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+.PHONY: qthelp
+qthelp:
+       $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+       @echo
+       @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+             ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+       @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FRR.qhcp"
+       @echo "To view the help file:"
+       @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FRR.qhc"
+
+.PHONY: applehelp
+applehelp:
+       $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
+       @echo
+       @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
+       @echo "N.B. You won't be able to view it unless you put it in" \
+             "~/Library/Documentation/Help or install it in your application" \
+             "bundle."
+
+.PHONY: devhelp
+devhelp:
+       $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+       @echo
+       @echo "Build finished."
+       @echo "To view the help file:"
+       @echo "# mkdir -p $$HOME/.local/share/devhelp/FRR"
+       @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FRR"
+       @echo "# devhelp"
+
+.PHONY: epub
+epub:
+       $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+       @echo
+       @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+.PHONY: latex
+latex:
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+       @echo
+       @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+       @echo "Run \`make' in that directory to run these through (pdf)latex" \
+             "(use \`make latexpdf' here to do that automatically)."
+
+.PHONY: latexpdf
+latexpdf:
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+       @echo "Running LaTeX files through pdflatex..."
+       $(MAKE) -C $(BUILDDIR)/latex all-pdf
+       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+.PHONY: latexpdfja
+latexpdfja:
+       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+       @echo "Running LaTeX files through platex and dvipdfmx..."
+       $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+.PHONY: text
+text:
+       $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+       @echo
+       @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+.PHONY: man
+man:
+       $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+       @echo
+       @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+.PHONY: texinfo
+texinfo:
+       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+       @echo
+       @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+       @echo "Run \`make' in that directory to run these through makeinfo" \
+             "(use \`make info' here to do that automatically)."
+
+.PHONY: info
+info:
+       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+       @echo "Running Texinfo files through makeinfo..."
+       $(MAKE) -C $(BUILDDIR)/texinfo info
+       @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+.PHONY: gettext
+gettext:
+       $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+       @echo
+       @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+.PHONY: changes
+changes:
+       $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+       @echo
+       @echo "The overview file is in $(BUILDDIR)/changes."
+
+.PHONY: linkcheck
+linkcheck:
+       $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+       @echo
+       @echo "Link check complete; look for any errors in the above output " \
+             "or in $(BUILDDIR)/linkcheck/output.txt."
+
+.PHONY: doctest
+doctest:
+       $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+       @echo "Testing of doctests in the sources finished, look at the " \
+             "results in $(BUILDDIR)/doctest/output.txt."
+
+.PHONY: coverage
+coverage:
+       $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
+       @echo "Testing of coverage in the sources finished, look at the " \
+             "results in $(BUILDDIR)/coverage/python.txt."
+
+.PHONY: xml
+xml:
+       $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+       @echo
+       @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+.PHONY: pseudoxml
+pseudoxml:
+       $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+       @echo
+       @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/doc/frr.1.in b/doc/frr.1.in
deleted file mode 100644 (file)
index 528358a..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-.TH Frr 1 "27 July 2006" "@PACKAGE_FULLNAME@ Systemd Script" "Version @PACKAGE_VERSION@"
-.SH NAME
-frr \- a systemd interaction script
-.SH SYNOPSIS
-.B frr
-[
-.B start
-]
-.br
-.B frr
-[
-.B stop
-]
-.br
-.B frr
-[
-.B reload
-]
-.br
-.B frr
-[
-.B restart
-]
-.br
-.B frr
-[
-.B status
-]
-.br
-.SH DESCRIPTION
-.B @PACKAGE_NAME@
-is a systemd interaction script for the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B frr
-command:
-.IP start
-Start enabled Frr daemons
-.IP stop
-Stop enabled Frr daemons
-.IP reload
-Reload modified configuration files
-.IP restart
-Stop all running daemons and then restart them
-.IP status
-Status of all the daemons
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR zebra (8)
-.SH BUGS
-.B frr
-eats bugs for breakfast. If you have food for the maintainers try 
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/doc/frr.texi b/doc/frr.texi
deleted file mode 100644 (file)
index d268b4b..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-\input texinfo @c -*- texinfo -*-
-
-@c Set variables - sourced from defines.texi
-@include defines.texi
-
-@c %**start of header
-@setfilename frr.info
-@c Set variables - sourced from defines.texi
-@include defines.texi
-@settitle @uref{@value{PACKAGE_URL},,@value{PACKAGE_NAME}}
-@c %**end of header
-
-@copying
-@value{COPYRIGHT_STR}
-@quotation
-
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation
-approved by Kunihiro Ishiguro.
-
-@end quotation
-@end copying
-
-@c Info entry
-@dircategory Routing Software:
-@direntry
-* @value{PACKAGE_NAME}: (frr).         The Frr Suite
-@end direntry
-
-@c @smallbook
-
-@ifinfo
-This file documents the @uref{@value{PACKAGE_URL},,Frr Software Routing Suite}
-which manages common TCP/IP routing protocols.
-
-This document was generated for version @value{PACKAGE_VERSION}.
-
-@insertcopying
-@end ifinfo
-
-@titlepage
-@title @uref{@value{PACKAGE_URL},,Frr}
-@subtitle A routing software package for TCP/IP networks
-@subtitle @uref{@value{PACKAGE_URL},,@value{PACKAGE_NAME}} @value{PACKAGE_VERSION}
-@author @value{AUTHORS}
-
-@page
-@vskip 0pt plus 1filll
-
-@insertcopying
-@end titlepage
-@page
-
-@ifnottex
-@node Top
-@top Frr -- With Virtual Network Control
-                    
-@uref{@value{PACKAGE_URL},,Frr} is an advanced routing software package
-that provides a suite of TCP/IP based routing protocols.  This is the Manual
-for @value{PACKAGE_STRING}. @uref{@value{PACKAGE_URL},,Frr} is a fork of 
-@uref{http://www.quagga.net,,Quagga}.
-
-@insertcopying
-@end ifnottex
-
-@menu
-* Overview::
-* Installation::
-* Basic commands::
-* Zebra::
-* RIP::
-* RIPng::
-* OSPFv2::
-* OSPFv3::
-* ISIS::
-* NHRP::
-* BGP::
-* Configuring Frr as a Route Server::
-* VNC and VNC-GW::
-* VTY shell::
-* Filtering::
-* Route Map::
-* IPv6 Support::
-* Kernel Interface::
-* SNMP Support::
-* Zebra Protocol::
-* Packet Binary Dump Format::
-* Command Index::
-* VTY Key Index::
-* Index::
-@end menu
-@contents
-
-@include overview.texi
-@include install.texi
-@include basic.texi
-@include main.texi
-@include ripd.texi
-@include ripngd.texi
-@include ospfd.texi
-@include ospf6d.texi
-@include isisd.texi
-@include nhrpd.texi
-@include bgpd.texi
-@include routeserver.texi
-@include vnc.texi
-@include vtysh.texi
-@include filter.texi
-@include routemap.texi
-@include ipv6.texi
-@include kernel.texi
-@include snmp.texi
-@include protocol.texi
-@include appendix.texi
-
-@node Command Index
-@unnumbered Command Index
-
-@printindex fn
-
-@node VTY Key Index
-@unnumbered VTY Key Index
-
-@printindex ky
-
-@node Index
-@unnumbered Index
-
-@printindex cp
-@bye
diff --git a/doc/git_branches.svg b/doc/git_branches.svg
deleted file mode 100644 (file)
index 0c2c96e..0000000
+++ /dev/null
@@ -1,720 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   version="1.1"
-   viewBox="52 37 349.25195 651.46875"
-   width="349.25195"
-   height="651.46875"
-   id="svg2"
-   inkscape:version="0.91 r13725"
-   sodipodi:docname="git_branches.svg">
-  <metadata
-     id="metadata376">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <defs
-     id="defs374" />
-  <sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1596"
-     inkscape:window-height="848"
-     id="namedview372"
-     showgrid="false"
-     fit-margin-top="0"
-     fit-margin-left="0"
-     fit-margin-right="0"
-     fit-margin-bottom="0"
-     inkscape:zoom="0.89517435"
-     inkscape:cx="53.149337"
-     inkscape:cy="353.95197"
-     inkscape:window-x="0"
-     inkscape:window-y="0"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="svg2" />
-  <g
-     id="g12"
-     transform="translate(-3.09375,-3.7812531)">
-    <path
-       d="M 216,98.125 216,684"
-       id="path14"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#000100;stroke-width:8" />
-    <path
-       d="M 205,99.5 216,72 227,99.5"
-       id="path16"
-       inkscape:connector-curvature="0"
-       style="fill:#000100" />
-    <path
-       d="M 225.625,692.25 216,684 l -9.625,8.25 0,-30.25 9.625,-8.25 9.625,8.25"
-       id="path18"
-       inkscape:connector-curvature="0"
-       style="fill:#000100" />
-  </g>
-  <path
-     d="m 212.90625,644.21875 -72,-36"
-     id="path20"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 212.90625,428.21875 -72,-36"
-     id="path22"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <text
-     font-weight="bold"
-     font-size="12"
-     xml:space="preserve"
-     id="text30"
-     style="font-weight:bold;font-size:12px;font-family:Helvetica;text-anchor:middle;fill:#ff0000"
-     x="143.89426"
-     y="427.82574"><tspan
-       id="tspan32">1.0</tspan><tspan
-       x="143.89426"
-       y="443.82574"
-       id="tspan34">Release</tspan><tspan
-       x="143.89426"
-       y="459.82574"
-       id="tspan36">Branch</tspan></text>
-  <path
-     d="m 213.73825,392.21875 -72.832,-36"
-     id="path42"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 212.73825,356.21875 -71.832,-36"
-     id="path44"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 220.90625,644.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path46"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,464.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path48"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,428.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path50"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,608.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path52"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,140.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path54"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,356.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path58"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,392.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path60"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <text
-     font-weight="bold"
-     font-size="12"
-     xml:space="preserve"
-     id="text62"
-     style="font-weight:bold;font-size:12px;font-family:Helvetica;text-anchor:middle;fill:#000100"
-     x="213.21825"
-     y="45.748047"><tspan
-       id="tspan64">Master</tspan><tspan
-       x="213.21825"
-       y="61.748047"
-       id="tspan66">(Stable)</tspan></text>
-  <g
-     id="g82"
-     transform="translate(-3.09375,-3.7812531)">
-    <path
-       d="m 144.832,612 0,-117.875"
-       id="path84"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#ff0000;stroke-width:8" />
-    <path
-       d="m 133.832,495.5 11,-27.5 11,27.5"
-       id="path86"
-       inkscape:connector-curvature="0"
-       style="fill:#ff0000" />
-  </g>
-  <g
-     id="g88"
-     transform="translate(-3.09375,-3.7812531)">
-    <path
-       d="m 144.832,396 0,-189.875"
-       id="path90"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#ff0000;stroke-width:8" />
-    <path
-       d="m 133.832,207.5 11,-27.5 11,27.5"
-       id="path92"
-       inkscape:connector-curvature="0"
-       style="fill:#ff0000" />
-  </g>
-  <text
-     font-weight="bold"
-     font-size="12"
-     xml:space="preserve"
-     id="text94"
-     style="font-weight:bold;font-size:12px;font-family:Helvetica;text-anchor:middle;fill:#ff0000"
-     x="143.89426"
-     y="138.82574"><tspan
-       id="tspan96">1.1</tspan><tspan
-       x="143.89426"
-       y="154.82574"
-       id="tspan98">Release</tspan><tspan
-       x="143.89426"
-       y="170.82574"
-       id="tspan100">Branch</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text102"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="51.90625"
-     y="611.97876"><tspan
-       id="tspan104">Version 1.</tspan><tspan
-       id="tspan106">0.a1</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text108"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="52.679649"
-     y="395.97876"><tspan
-       id="tspan110">Version 1.1.a1</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text112"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="51.90625"
-     y="359.97876"><tspan
-       id="tspan114">Version 1.1.a2</tspan></text>
-  <path
-     d="m 148.90625,608.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path116"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,392.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path118"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,356.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path120"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,320.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path122"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text124"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="52.679649"
-     y="323.97876"><tspan
-       id="tspan126">Version 1.</tspan><tspan
-       id="tspan128">1.b1</tspan></text>
-  <g
-     id="g156"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,540 -127.375,0"
-       id="path158"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,547 -17.5,-7 17.5,-7"
-       id="path160"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g162"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,504 -127.375,0"
-       id="path164"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,511 -17.5,-7 17.5,-7"
-       id="path166"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g168"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,468 -127.375,0"
-       id="path170"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,475 -17.5,-7 17.5,-7"
-       id="path172"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g174"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,432 -127.375,0"
-       id="path176"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,439 -17.5,-7 17.5,-7"
-       id="path178"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g180"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,396 -127.375,0"
-       id="path182"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,403 -17.5,-7 17.5,-7"
-       id="path184"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g186"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,360 -127.375,0"
-       id="path188"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,367 -17.5,-7 17.5,-7"
-       id="path190"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g192"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,324 -127.375,0"
-       id="path194"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,331 -17.5,-7 17.5,-7"
-       id="path196"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g198"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,288 -127.375,0"
-       id="path200"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,295 -17.5,-7 17.5,-7"
-       id="path202"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g204"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,252 -127.375,0"
-       id="path206"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,259 -17.5,-7 17.5,-7"
-       id="path208"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g210"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,216 -127.375,0"
-       id="path212"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,223 -17.5,-7 17.5,-7"
-       id="path214"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g216"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 404,180 -99.375,0"
-       id="path218"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,187 -17.5,-7 17.5,-7"
-       id="path220"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g222"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,180 -127.375,0"
-       id="path224"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,187 -17.5,-7 17.5,-7"
-       id="path226"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g228"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,144 -127.375,0"
-       id="path230"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,151 -17.5,-7 17.5,-7"
-       id="path232"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text234"
-     x="256.90625"
-     y="531.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan236">Patch Email (Patchwork)</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text238"
-     x="256.90625"
-     y="495.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan240">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text242"
-     x="256.90625"
-     y="459.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan244">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text246"
-     x="256.90625"
-     y="423.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan248">Patch Email (Patchwork)</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text250"
-     x="256.90625"
-     y="387.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan252">Patch Email (Patchwork)</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text254"
-     x="256.90625"
-     y="351.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan256">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text258"
-     x="256.90625"
-     y="315.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan260">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text262"
-     x="256.90625"
-     y="279.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan264">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text266"
-     x="256.90625"
-     y="243.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan268">Patch Email (Patchwork)</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text270"
-     x="256.90625"
-     y="207.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan272">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text274"
-     x="256.90625"
-     y="171.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan276">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text278"
-     x="256.90625"
-     y="135.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan280">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text282"
-     x="256.90625"
-     y="603.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan284">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text286"
-     x="256.90625"
-     y="567.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan288">Github Pull Request</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text290"
-     x="256.90625"
-     y="567.21875"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"><tspan
-       id="tspan292">Github Pull Request</tspan></text>
-  <g
-     id="g294"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,612 -127.72,0"
-       id="path296"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.155,619 -17.5,-7 17.5,-7"
-       id="path298"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <g
-     id="g300"
-     transform="translate(-67.09375,-3.7812531)">
-    <path
-       d="m 432,576 -127.375,0"
-       id="path302"
-       inkscape:connector-curvature="0"
-       style="fill:none;stroke:#666666;stroke-width:4" />
-    <path
-       d="m 305.5,583 -17.5,-7 17.5,-7"
-       id="path304"
-       inkscape:connector-curvature="0"
-       style="fill:#666666" />
-  </g>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text306"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="52.90625"
-     y="577.21875"><tspan
-       id="tspan308">Version 1.</tspan><tspan
-       id="tspan310">0.a2</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text312"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="52.90625"
-     y="541.21875"><tspan
-       id="tspan314">Version 1.</tspan><tspan
-       id="tspan316">0.b1</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text318"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="52.90625"
-     y="505.21875"><tspan
-       id="tspan320">Version 1.</tspan><tspan
-       id="tspan322">0.0</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text324"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="52.679649"
-     y="288.97876"><tspan
-       id="tspan326">Version 1.1.0</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text328"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="51.90625"
-     y="252.97874"><tspan
-       id="tspan330">Version 1.1.1</tspan></text>
-  <text
-     font-size="12"
-     xml:space="preserve"
-     id="text332"
-     style="font-size:12px;font-family:Helvetica;fill:#000100"
-     x="52.679649"
-     y="216.97874"><tspan
-       id="tspan334">Version 1.</tspan><tspan
-       id="tspan336">1.2</tspan></text>
-  <path
-     d="m 212.90625,608.21875 -72,-36"
-     id="path338"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 212.90625,572.21875 -72,-36"
-     id="path340"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 212.90625,536.21875 -72,-36"
-     id="path342"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 212.90625,320.21875 -72,-36"
-     id="path344"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 212.90625,284.21875 -72,-36"
-     id="path346"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 212.90625,248.21875 -72,-36"
-     id="path348"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#ff0000;stroke-width:8" />
-  <path
-     d="m 148.90625,571.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path350"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,535.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path352"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,499.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path354"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,284.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path356"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,248.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path358"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 148.90625,212.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path360"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,572.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path362"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,536.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path364"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,320.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path366"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,248.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path368"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-  <path
-     d="m 220.90625,284.21875 c 0,4.418 -3.582,8 -8,8 -4.418,0 -8,-3.582 -8,-8 0,-4.418 3.582,-8 8,-8 4.418,0 8,3.582 8,8 z"
-     id="path370"
-     inkscape:connector-curvature="0"
-     style="fill:#fffffe;stroke:#000100" />
-</svg>
diff --git a/doc/install.texi b/doc/install.texi
deleted file mode 100644 (file)
index d0d5680..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-@node  Installation
-@chapter Installation
-
-@cindex How to install Frr
-@cindex Installation
-@cindex Installing Frr
-@cindex Building the system
-@cindex Making Frr
-
-There are three steps for installing the software: configuration,
-compilation, and installation.
-
-@menu
-* Configure the Software::
-* Build the Software::
-* Install the Software::
-@end menu
-
-The easiest way to get Frr running is to issue the following
-commands:
-
-@example
-% configure
-% make
-% make install
-@end example
-
-@node Configure the Software
-@section Configure the Software
-
-@menu
-* The Configure script and its options::
-* Least-Privilege support::
-* Linux notes::
-@end menu
-
-@node The Configure script and its options
-@subsection The Configure script and its options
-
-@cindex Configuration options
-@cindex Options for configuring
-@cindex Build options
-@cindex Distribution configuration
-@cindex Options to @code{./configure}
-Frr has an excellent configure script which automatically detects most
-host configurations.  There are several additional configure options to
-customize the build to include or exclude specific features and dependencies.
-
-@table @option
-@item --disable-zebra
-Do not build zebra daemon.
-@item --disable-ripd
-Do not build ripd.
-@item --disable-ripngd
-Do not build ripngd.
-@item --disable-ospfd
-Do not build ospfd.
-@item --disable-ospf6d
-Do not build ospf6d.
-@item --disable-bgpd
-Do not build bgpd.
-@item --disable-bgp-announce
-Make @command{bgpd} which does not make bgp announcements at all.  This
-feature is good for using @command{bgpd} as a BGP announcement listener.
-@item --enable-datacenter
-Enable system defaults to work as if in a Data Center. See defaults.h
-for what is changed by this configure option.
-@item --enable-snmp
-Enable SNMP support.  By default, SNMP support is disabled.
-@item --disable-ospfapi
-Disable support for OSPF-API, an API to interface directly with ospfd.
-OSPF-API is enabled if --enable-opaque-lsa is set.
-@item --disable-ospfclient
-Disable building of the example OSPF-API client.
-@item --disable-ospf-ri
-Disable support for OSPF Router Information (RFC4970 & RFC5088) this
-requires support for Opaque LSAs and Traffic Engineering.
-@item --disable-isisd
-Do not build isisd.
-@item --enable-isis-topology
-Enable IS-IS topology generator.
-@item --enable-isis-te
-Enable Traffic Engineering Extension for ISIS (RFC5305)
-@item --enable-multipath=@var{ARG}
-Enable support for Equal Cost Multipath. @var{ARG} is the maximum number
-of ECMP paths to allow, set to 0 to allow unlimited number of paths.
-@item --enable-realms
-Enable the support of linux Realms.  Convert tag values from 1-255
-into a realm value when inserting into the linux kernel.  Then
-routing policy can be assigned to the realm.  See the tc man page.
-@item --disable-rtadv
-Disable support IPV6 router advertisement in zebra.
-@item --enable-gcc-rdynamic
-Pass the @command{-rdynamic} option to the linker driver.  This is in most
-cases neccessary for getting usable backtraces.  This option defaults to on
-if the compiler is detected as gcc, but giving an explicit enable/disable is
-suggested.
-@item --disable-backtrace
-Controls backtrace support for the crash handlers. This is autodetected by
-default. Using the switch will enforce the requested behaviour, failing with
-an error if support is requested but not available.  On BSD systems, this
-needs libexecinfo, while on glibc support for this is part of libc itself.
-@item --enable-dev-build
-Turn on some options for compiling FRR within a development environment in
-mind.  Specifically turn on -g3 -O0 for compiling options and add inclusion
-of grammar sandbox.
-@item --enable-fuzzing
-Turn on some compile options to allow you to run fuzzing tools
-against the system.  This tools is intended as a developer
-only tool and should not be used for normal operations
-@end table
-
-You may specify any combination of the above options to the configure
-script.  By default, the executables are placed in @file{/usr/local/sbin} 
-and the configuration files in @file{/usr/local/etc}. The @file{/usr/local/}
-installation prefix and other directories may be changed using the following 
-options to the configuration script.
-
-@table @option
-@item --prefix=@var{prefix}
-Install architecture-independent files in @var{prefix} [/usr/local].
-@item --sysconfdir=@var{dir}
-Look for configuration files in @var{dir} [@var{prefix}/etc]. Note
-that sample configuration files will be installed here.
-@item --localstatedir=@var{dir}
-Configure zebra to use @var{dir} for local state files, such
-as pid files and unix sockets.
-@end table
-
-@example
-% ./configure --disable-snmp
-@end example
-
-This command will configure zebra and the routing daemons.
-
-@node Least-Privilege support
-@subsection Least-Privilege support
-
-@cindex Frr Least-Privileges
-@cindex Frr Privileges
-
-Additionally, you may configure zebra to drop its elevated privileges
-shortly after startup and switch to another user. The configure script will
-automatically try to configure this support. There are three configure
-options to control the behaviour of Frr daemons.
-
-@table @option
-@item --enable-user=@var{user}
-Switch to user @var{ARG} shortly after startup, and run as user @var{ARG}
-in normal operation.
-@item --enable-group=@var{group}
-Switch real and effective group to @var{group} shortly after
-startup. 
-@item --enable-vty-group=@var{group}
-Create Unix Vty sockets (for use with vtysh) with group owndership set to
-@var{group}. This allows one to create a seperate group which is
-restricted to accessing only the Vty sockets, hence allowing one to
-delegate this group to individual users, or to run vtysh setgid to
-this group.
-@end table
-
-The default user and group which will be configured is 'frr' if no user
-or group is specified. Note that this user or group requires write access to
-the local state directory (see --localstatedir) and requires at least read
-access, and write access if you wish to allow daemons to write out their
-configuration, to the configuration directory (see --sysconfdir).
-
-On systems which have the 'libcap' capabilities manipulation library
-(currently only linux), the frr system will retain only minimal
-capabilities required, further it will only raise these capabilities for
-brief periods. On systems without libcap, frr will run as the user
-specified and only raise its uid back to uid 0 for brief periods.
-
-@node Linux notes
-@subsection Linux Notes
-
-@cindex Configuring Frr
-@cindex Building on Linux boxes
-@cindex Linux configurations
-
-There are several options available only to @sc{gnu}/Linux systems:
-@footnote{@sc{gnu}/Linux has very flexible kernel configuration features}.  If
-you use @sc{gnu}/Linux, make sure that the current kernel configuration is
-what you want.  Frr will run with any kernel configuration but some
-recommendations do exist.
-
-@table @var
-
-@item CONFIG_NETLINK
-Kernel/User netlink socket. This is a brand new feature which enables an
-advanced interface between the Linux kernel and zebra (@pxref{Kernel Interface}).
-
-@item CONFIG_RTNETLINK
-Routing messages.
-This makes it possible to receive netlink routing messages.  If you
-specify this option, @command{zebra} can detect routing information
-updates directly from the kernel (@pxref{Kernel Interface}).
-
-@item CONFIG_IP_MULTICAST
-IP: multicasting.  
-This option should be specified when you use @command{ripd} (@pxref{RIP}) or
-@command{ospfd} (@pxref{OSPFv2}) because these protocols use multicast.
-
-@end table
-
-IPv6 support has been added in @sc{gnu}/Linux kernel version 2.2.  If you
-try to use the Frr IPv6 feature on a @sc{gnu}/Linux kernel, please
-make sure the following libraries have been installed.  Please note that
-these libraries will not be needed when you uses @sc{gnu} C library 2.1
-or upper.
-
-@table @code
-
-@item inet6-apps
-The @code{inet6-apps} package includes basic IPv6 related libraries such
-as @code{inet_ntop} and @code{inet_pton}.  Some basic IPv6 programs such
-as @command{ping}, @command{ftp}, and @command{inetd} are also
-included. The @code{inet-apps} can be found at
-@uref{ftp://ftp.inner.net/pub/ipv6/}.
-
-@item net-tools
-The @code{net-tools} package provides an IPv6 enabled interface and
-routing utility.  It contains @command{ifconfig}, @command{route},
-@command{netstat}, and other tools.  @code{net-tools} may be found at
-@uref{http://www.tazenda.demon.co.uk/phil/net-tools/}.
-
-@end table
-@c A - end of footnote 
-
-@node Build the Software
-@section Build the Software
-
-After configuring the software, you will need to compile it for your
-system. Simply issue the command @command{make} in the root of the source
-directory and the software will be compiled. Cliff Note versions of
-different compilation examples can be found in the doc/Building_FRR_on_XXX.md
-files.  If you have *any* problems at this stage, be certain to send a
-bug report @xref{Bug Reports}.
-
-@example
-% ./bootstrap.sh
-% ./configure <appropriate to your system>
-% make
-@end example
-@c A - End of node, Building the Software
-
-
-@node Install the Software
-@comment  node-name,  next,  previous,  up
-@section Install the Software
-
-Installing the software to your system consists of copying the compiled
-programs and supporting files to a standard location. After the
-installation process has completed, these files have been copied
-from your work directory to @file{/usr/local/bin}, and @file{/usr/local/etc}.
-
-To install the Frr suite, issue the following command at your shell
-prompt: @command{make install}.
-
-@example
-%
-% make install
-%
-@end example
-
-Frr daemons have their own terminal interface or VTY.  After
-installation, you have to setup each beast's port number to connect to
-them.  Please add the following entries to @file{/etc/services}.
-
-@example
-zebrasrv      2600/tcp           # zebra service
-zebra         2601/tcp           # zebra vty
-ripd          2602/tcp           # RIPd vty
-ripngd        2603/tcp           # RIPngd vty
-ospfd         2604/tcp           # OSPFd vty
-bgpd          2605/tcp           # BGPd vty
-ospf6d        2606/tcp           # OSPF6d vty
-ospfapi       2607/tcp           # ospfapi
-isisd         2608/tcp           # ISISd vty
-nhrpd         2610/tcp           # nhrpd vty
-pimd          2611/tcp           # PIMd vty
-@end example
-
-If you use a FreeBSD newer than 2.2.8, the above entries are already
-added to @file{/etc/services} so there is no need to add it. If you
-specify a port number when starting the daemon, these entries may not be
-needed.
-
-You may need to make changes to the config files in
-@file{@value{INSTALL_PREFIX_ETC}/*.conf}. @xref{Config Commands}.
diff --git a/doc/ipv6.texi b/doc/ipv6.texi
deleted file mode 100644 (file)
index 859f6a9..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-@node IPv6 Support
-@chapter IPv6 Support
-
-Frr fully supports IPv6 routing.  As described so far, Frr supports
-RIPng, OSPFv3, and BGP-4+.  You can give IPv6 addresses to an interface
-and configure static IPv6 routing information.  Frr IPv6 also provides
-automatic address configuration via a feature called @code{address
-auto configuration}.  To do it, the router must send router advertisement
-messages to the all nodes that exist on the network.
-
-Previous versions of Frr could be built without IPv6 support.  This is
-no longer possible.
-
-@menu
-* Router Advertisement::        
-@end menu
-
-@node Router Advertisement
-@section Router Advertisement
-
-@deffn {Interface Command} {no ipv6 nd suppress-ra} {}
-Send router advertisment messages.
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd suppress-ra} {}
-Don't send router advertisment messages.
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd prefix @var{ipv6prefix} [@var{valid-lifetime}] [@var{preferred-lifetime}] [off-link] [no-autoconfig] [router-address]} {}
-Configuring the IPv6 prefix to include in router advertisements. Several prefix
-specific optional parameters and flags may follow:
-@itemize @bullet
-@item
-@var{valid-lifetime} - the length of time in seconds during what the prefix is
-valid for the purpose of on-link determination. Value @var{infinite} represents
-infinity (i.e. a value of all one bits (@code{0xffffffff})).
-
-Range: @code{<0-4294967295>}  Default: @code{2592000}
-
-@item
-@var{preferred-lifetime} - the length of time in seconds during what addresses
-generated from the prefix remain preferred. Value @var{infinite} represents
-infinity.
-
-Range: @code{<0-4294967295>}  Default: @code{604800}
-
-@item
-@var{off-link} - indicates that advertisement makes no statement about on-link or
-off-link properties of the prefix.
-
-Default: not set, i.e. this prefix can be used for on-link determination.
-
-@item
-@var{no-autoconfig} - indicates to hosts on the local link that the specified prefix
-cannot be used for IPv6 autoconfiguration.
-
-Default: not set, i.e. prefix can be used for autoconfiguration.
-
-@item
-@var{router-address} - indicates to hosts on the local link that the specified 
-prefix 
-contains a complete IP address by setting R flag.
-
-Default: not set, i.e. hosts do not assume a complete IP address is placed.
-@end itemize
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd ra-interval <1-1800>} {}
-@deffnx {Interface Command} {no ipv6 nd ra-interval [<1-1800>]} {}
-The  maximum  time allowed between sending unsolicited multicast router
-advertisements from the interface, in seconds.
-
-Default: @code{600}
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd ra-interval msec <70-1800000>} {}
-@deffnx {Interface Command} {no ipv6 nd ra-interval [msec <70-1800000>]} {}
-The  maximum  time allowed between sending unsolicited multicast router
-advertisements from the interface, in milliseconds.
-
-Default: @code{600000}
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd ra-lifetime <0-9000>} {}
-@deffnx {Interface Command} {no ipv6 nd ra-lifetime [<0-9000>]} {}
-The value to be placed in the Router Lifetime field of router advertisements
-sent from the interface, in seconds. Indicates the usefulness of the router
-as a default router on this interface. Setting the value to zero indicates
-that the router should not be considered a default router on this interface.
-Must be either zero or between value specified with @var{ipv6 nd ra-interval}
-(or default) and 9000 seconds.
-
-Default: @code{1800}
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd reachable-time <1-3600000>} {}
-@deffnx {Interface Command} {no ipv6 nd reachable-time [<1-3600000>]} {}
-The value to be placed in the Reachable Time field in the Router Advertisement
-messages sent by the router, in milliseconds. The configured time enables the
-router to detect unavailable neighbors. The value zero means unspecified (by
-this router).
-
-Default: @code{0}
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd managed-config-flag} {}
-@deffnx {Interface Command} {no ipv6 nd managed-config-flag} {}
-Set/unset flag in IPv6 router advertisements which indicates to hosts that they
-should use managed (stateful) protocol for addresses autoconfiguration in
-addition to any addresses autoconfigured using stateless address
-autoconfiguration.
-
-Default: not set
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd other-config-flag} {}
-@deffnx {Interface Command} {no ipv6 nd other-config-flag} {}
-Set/unset flag in IPv6 router advertisements which indicates to hosts that
-they should use administered (stateful) protocol to obtain autoconfiguration
-information other than addresses.
-
-Default: not set
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd home-agent-config-flag} {}
-@deffnx {Interface Command} {no ipv6 nd home-agent-config-flag} {}
-Set/unset flag in IPv6 router advertisements which indicates to hosts that
-the router acts as a Home Agent and includes a Home Agent Option.
-
-Default: not set
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd home-agent-preference <0-65535>} {}
-@deffnx {Interface Command} {no ipv6 nd home-agent-preference [<0-65535>]} {}
-The value to be placed in Home Agent Option, when Home Agent config flag is set, 
-which indicates to hosts Home Agent preference. The default value of 0 stands
-for the lowest preference possible.
-
-Default: 0
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd home-agent-lifetime <0-65520>} {}
-@deffnx {Interface Command} {no ipv6 nd home-agent-lifetime [<0-65520>]} {}
-The value to be placed in Home Agent Option, when Home Agent config flag is set, 
-which indicates to hosts Home Agent Lifetime. The default value of 0 means to
-place the current Router Lifetime value.
-
-Default: 0
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd adv-interval-option} {}
-@deffnx {Interface Command} {no ipv6 nd adv-interval-option} {}
-Include an Advertisement Interval option which indicates to hosts the maximum time, 
-in milliseconds, between successive unsolicited Router Advertisements.
-
-Default: not set
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd router-preference (high|medium|low)} {}
-@deffnx {Interface Command} {no ipv6 nd router-preference [(high|medium|low)]} {}
-Set default router preference in IPv6 router advertisements per RFC4191.
-
-Default: medium
-@end deffn
-
-@deffn {Interface Command} {ipv6 nd mtu <1-65535>} {}
-@deffnx {Interface Command} {no ipv6 nd mtu [<1-65535>]} {}
-Include an MTU (type 5) option in each RA packet to assist the attached hosts
-in proper interface configuration. The announced value is not verified to be
-consistent with router interface MTU.
-
-Default: don't advertise any MTU option
-@end deffn
-
-@example
-@group
-interface eth0
- no ipv6 nd suppress-ra
- ipv6 nd prefix 2001:0DB8:5009::/64
-@end group
-@end example
-
-For more information see @cite{RFC2462 (IPv6 Stateless Address Autoconfiguration)}
-, @cite{RFC4861 (Neighbor Discovery for IP Version 6 (IPv6))}
-, @cite{RFC6275 (Mobility Support in IPv6)}
-and @cite{RFC4191 (Default Router Preferences and More-Specific Routes)}.
diff --git a/doc/isisd.8.in b/doc/isisd.8.in
deleted file mode 100644 (file)
index 542c289..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-.TH IS-IS 8 "25 November 2004" "@PACKAGE_FULLNAME@ IS-IS daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-isisd \- an IS-IS routing engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B isisd
-[
-.B \-dhv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B isisd
-is a routing component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B isisd
-command:
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR 
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/isisd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When isisd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart isisd.  The default is \fB\fI@CFG_STATE@/isisd.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the isisd VTY will listen on. This defaults to
-2608, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the isisd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-There are currently no such modules for
-\fBisisd\fR in the base package.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/isisd
-The default location of the 
-.B isisd
-binary.
-.TP
-.BI @CFG_SYSCONF@/isisd.conf
-The default location of the 
-.B isisd
-config file.
-.TP
-.BI $(PWD)/isisd.log 
-If the 
-.B isisd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBisisd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The isisd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBisisd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-\fBisisd\fR is ALPHA quality at the moment and hasn't any way ready for
-production use.
-
-.B isisd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://isisd.sourceforge.net
-or the Info file for an accurate list of authors.
-
diff --git a/doc/isisd.texi b/doc/isisd.texi
deleted file mode 100644 (file)
index 404698d..0000000
+++ /dev/null
@@ -1,433 +0,0 @@
-@cindex ISIS
-@node ISIS
-@chapter ISIS
-
-@acronym{ISIS,Intermediate System to Intermediate System} is a routing protocol
-which is described in @cite{ISO10589, RFC1195, RFC5308}.  ISIS is an
-@acronym{IGP,Interior Gateway Protocol}.  Compared with @acronym{RIP},
-@acronym{ISIS} can provide scalable network support and faster
-convergence times like @acronym{OSPF}. ISIS is widely used in large networks such as
-@acronym{ISP,Internet Service Provider} and carrier backbone networks.
-
-@menu
-* Configuring isisd::
-* ISIS router::
-* ISIS Timer::
-* ISIS region::
-* ISIS interface::
-* Showing ISIS information::
-* ISIS Traffic Engineering::
-* Debugging ISIS::
-* ISIS Configuration Examples::
-@end menu
-
-@node Configuring isisd
-@section Configuring isisd
-
-There are no @command{isisd} specific options.  Common options can be
-specified (@pxref{Common Invocation Options}) to @command{isisd}.
-@command{isisd} needs to acquire interface information from
-@command{zebra} in order to function. Therefore @command{zebra} must be
-running before invoking @command{isisd}. Also, if @command{zebra} is
-restarted then @command{isisd} must be too.
-
-Like other daemons, @command{isisd} configuration is done in @acronym{ISIS}
-specific configuration file @file{isisd.conf}.
-
-@node ISIS router
-@section ISIS router
-
-To start ISIS process you have to specify the ISIS router. As of this
-writing, @command{isisd} does not support multiple ISIS processes.
-
-@deffn Command {router isis WORD} {}
-@deffnx Command {no router isis WORD} {}
-@anchor{router isis WORD}Enable or disable the ISIS process by specifying the ISIS domain with 'WORD'.
-@command{isisd} does not yet support multiple ISIS processes but you must specify
-the name of ISIS process. The ISIS process name 'WORD' is then used for interface
-(see command @ref{ip router isis WORD}).
-@end deffn
-
-@deffn {ISIS Command} {net XX.XXXX. ... .XXX.XX} {}
-@deffnx {ISIS Command} {no net XX.XXXX. ... .XXX.XX} {}
-Set/Unset network entity title (NET) provided in ISO format.
-@end deffn
-
-@deffn {ISIS Command} {hostname dynamic} {}
-@deffnx {ISIS Command} {no hostname dynamic} {}
-Enable support for dynamic hostname.
-@end deffn
-
-@deffn {ISIS Command} {area-password [clear | md5] <password>} {}
-@deffnx {ISIS Command} {domain-password [clear | md5] <password>} {}
-@deffnx {ISIS Command} {no area-password} {}
-@deffnx {ISIS Command} {no domain-password} {}
-Configure the authentication password for an area, respectively a domain,
-as clear text or md5 one.
-@end deffn
-
-@deffn {ISIS Command} {log-adjacency-changes} {}
-@deffnx {ISIS Command} {no log-adjacency-changes} {}
-Log changes in adjacency state.
-@end deffn
-
-@deffn {ISIS Command} {metric-style [narrow | transition | wide]} {}
-@deffnx {ISIS Command} {no metric-style} {}
-@anchor{metric-style}Set old-style (ISO 10589) or new-style packet formats:
-  - narrow      Use old style of TLVs with narrow metric
-  - transition  Send and accept both styles of TLVs during transition
-  - wide        Use new style of TLVs to carry wider metric
-@end deffn
-
-@deffn {ISIS Command} {set-overload-bit} {}
-@deffnx {ISIS Command} {no set-overload-bit} {}
-Set overload bit to avoid any transit traffic.
-@end deffn
-
-@node ISIS Timer
-@section ISIS Timer
-
-@deffn {ISIS Command} {lsp-gen-interval <1-120>} {}
-@deffnx {ISIS Command} {lsp-gen-interval [level-1 | level-2] <1-120>} {}
-@deffnx {ISIS Command} {no lsp-gen-interval} {}
-@deffnx {ISIS Command} {no lsp-gen-interval [level-1 | level-2]} {}
-Set minimum interval in seconds between regenerating same LSP,
-globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@deffn {ISIS Command} {lsp-refresh-interval <1-65235>} {}
-@deffnx {ISIS Command} {lsp-refresh-interval [level-1 | level-2] <1-65235>} {}
-@deffnx {ISIS Command} {no lsp-refresh-interval} {}
-@deffnx {ISIS Command} {no lsp-refresh-interval [level-1 | level-2]} {}
-Set LSP refresh interval in seconds, globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@deffn {ISIS Command} {lsp-refresh-interval <1-65235>} {}
-@deffnx {ISIS Command} {lsp-refresh-interval [level-1 | level-2] <1-65235>} {}
-@deffnx {ISIS Command} {no lsp-refresh-interval} {}
-@deffnx {ISIS Command} {no lsp-refresh-interval [level-1 | level-2]} {}
-Set LSP refresh interval in seconds, globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@deffn {ISIS Command} {max-lsp-lifetime <360-65535>} {}
-@deffnx {ISIS Command} {max-lsp-lifetime [level-1 | level-2] <360-65535>} {}
-@deffnx {ISIS Command} {no max-lsp-lifetime} {}
-@deffnx {ISIS Command} {no max-lsp-lifetime [level-1 | level-2]} {}
-Set LSP maximum LSP lifetime in seconds, globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@deffn {ISIS Command} {spf-interval <1-120>} {}
-@deffnx {ISIS Command} {spf-interval [level-1 | level-2] <1-120>} {}
-@deffnx {ISIS Command} {no spf-interval} {}
-@deffnx {ISIS Command} {no spf-interval [level-1 | level-2]} {}
-Set minimum interval between consecutive SPF calculations in seconds.
-@end deffn
-
-@node ISIS region
-@section ISIS region
-
-@deffn {ISIS Command} {is-type [level-1 | level-1-2 | level-2-only]} {}
-@deffnx {ISIS Command} {no is-type} {}
-Define the ISIS router behavior:
- - level-1       Act as a station router only
- - level-1-2     Act as both a station router and an area router
- - level-2-only  Act as an area router only
-@end deffn
-
-@node ISIS interface
-@section ISIS interface
-
-@deffn {Interface Command} {ip router isis WORD} {}
-@deffnx {Interface Command} {no ip router isis WORD} {}
-@anchor{ip router isis WORD}Activate ISIS adjacency on this interface. Note that the name
-of ISIS instance must be the same as the one used to configure the ISIS process
-(see command @ref{router isis WORD}).
-@end deffn
-
-@deffn {Interface Command} {isis circuit-type [level-1 | level-1-2 | level-2]} {}
-@deffnx {Interface Command} {no isis circuit-type} {}
-Configure circuit type for interface:
-  - level-1       Level-1 only adjacencies are formed
-  - level-1-2     Level-1-2 adjacencies are formed
-  - level-2-only  Level-2 only adjacencies are formed
-@end deffn
-
-@deffn {Interface Command} {isis csnp-interval <1-600>} {}
-@deffnx {Interface Command} {isis csnp-interval <1-600> [level-1 | level-2]} {}
-@deffnx {Interface Command} {no isis csnp-interval} {}
-@deffnx {Interface Command} {no isis csnp-interval [level-1 | level-2]} {}
-Set CSNP interval in seconds globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@deffn {Interface Command} {isis hello padding} {}
-Add padding to IS-IS hello packets.
-@end deffn
-
-@deffn {Interface Command} {isis hello-interval <1-600>} {}
-@deffnx {Interface Command} {isis hello-interval <1-600> [level-1 | level-2]} {}
-@deffnx {Interface Command} {no isis hello-interval} {}
-@deffnx {Interface Command} {no isis hello-interval [level-1 | level-2]} {}
-Set Hello interval in seconds globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@deffn {Interface Command} {isis hello-multiplier <2-100>} {}
-@deffnx {Interface Command} {isis hello-multiplier <2-100> [level-1 | level-2]} {}
-@deffnx {Interface Command} {no isis hello-multiplier} {}
-@deffnx {Interface Command} {no isis hello-multiplier [level-1 | level-2]} {}
-Set multiplier for Hello holding time globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@deffn {Interface Command} {isis metric [<0-255> | <0-16777215>]} {}
-@deffnx {Interface Command} {isis metric [<0-255> | <0-16777215>] [level-1 | level-2]} {}
-@deffnx {Interface Command} {no isis metric} {}
-@deffnx {Interface Command} {no isis metric [level-1 | level-2]} {}
-Set default metric value globally, for an area (level-1) or a domain (level-2).
-Max value depend if metric support narrow or wide value (see command @ref{metric-style}).
-@end deffn
-
-@deffn {Interface Command} {isis network point-to-point} {}
-@deffnx {Interface Command} {no isis network point-to-point} {}
-Set network type to 'Point-to-Point' (broadcast by default).
-@end deffn
-
-@deffn {Interface Command} {isis passive} {}
-@deffnx {Interface Command} {no isis passive} {}
-Configure the passive mode for this interface.
-@end deffn
-
-@deffn {Interface Command} {isis password [clear | md5] <password>} {}
-@deffnx {Interface Command} {no isis password} {}
-Configure the authentication password (clear or encoded text) for the interface.
-@end deffn
-
-@deffn {Interface Command} {isis priority <0-127>} {}
-@deffnx {Interface Command} {isis priority <0-127> [level-1 | level-2]} {}
-@deffnx {Interface Command} {no isis priority} {}
-@deffnx {Interface Command} {no isis priority [level-1 | level-2]} {}
-Set priority for Designated Router election, globally, for the area (level-1)
-or the domain (level-2).
-@end deffn
-
-@deffn {Interface Command} {isis psnp-interval <1-120>} {}
-@deffnx {Interface Command} {isis psnp-interval <1-120> [level-1 | level-2]} {}
-@deffnx {Interface Command} {no isis psnp-interval} {}
-@deffnx {Interface Command} {no isis psnp-interval [level-1 | level-2]} {}
-Set PSNP interval in seconds globally, for an area (level-1) or a domain (level-2).
-@end deffn
-
-@node Showing ISIS information
-@section Showing ISIS information
-
-@deffn {Command} {show isis summary} {}
-Show summary information about ISIS.
-@end deffn
-
-@deffn {Command} {show isis hostname} {}
-Show information about ISIS node.
-@end deffn
-
-@deffn {Command} {show isis interface} {}
-@deffnx {Command} {show isis interface detail} {}
-@deffnx {Command} {show isis interface <interface name>} {}
-Show state and configuration of ISIS specified interface, or all
-interfaces if no interface is given with or without details.
-@end deffn
-
-@deffn {Command} {show isis neighbor} {}
-@deffnx {Command} {show isis neighbor <System Id>} {}
-@deffnx {Command} {show isis neighbor detail} {}
-Show state and information of ISIS specified neighbor, or all
-neighbors if no system id is given with or without details.
-@end deffn
-
-@deffn {Command} {show isis database} {}
-@deffnx {Command} {show isis database [detail]} {}
-@deffnx {Command} {show isis database <LSP id> [detail]} {}
-@deffnx {Command} {show isis database detail <LSP id>} {}
-Show the ISIS database globally, for a specific LSP id without or with details.
-@end deffn
-
-@deffn {Command} {show isis topology} {}
-@deffnx {Command} {show isis topology [level-1|level-2]} {}
-Show topology IS-IS paths to Intermediate Systems, globally,
-in area (level-1) or domain (level-2).
-@end deffn
-
-@deffn {Command} {show ip route isis} {}
-Show the ISIS routing table, as determined by the most recent SPF calculation.
-@end deffn
-
-@node ISIS Traffic Engineering
-@section Traffic Engineering
-
-@deffn {ISIS Command} {mpls-te on} {}
-@deffnx {ISIS Command} {no mpls-te} {}
-Enable Traffic Engineering LSP flooding.
-@end deffn
-
-@deffn {ISIS Command} {mpls-te router-address <A.B.C.D>} {}
-@deffnx {ISIS Command} {no mpls-te router-address} {}
-Configure stable IP address for MPLS-TE.
-@end deffn
-
-@deffn {Command} {show isis mpls-te interface} {}
-@deffnx {Command} {show isis mpls-te interface @var{interface}} {}
-Show MPLS Traffic Engineering parameters for all or specified interface.
-@end deffn
-
-@deffn {Command} {show isis mpls-te router} {}
-Show Traffic Engineering router parameters.
-@end deffn
-
-@node Debugging ISIS
-@section Debugging ISIS
-
-@deffn {Command} {debug isis adj-packets} {}
-@deffnx {Command} {no debug isis adj-packets} {}
-IS-IS Adjacency related packets.
-@end deffn
-
-@deffn {Command} {debug isis checksum-errors} {}
-@deffnx {Command} {no debug isis checksum-errors} {}
-IS-IS LSP checksum errors.
-@end deffn
-
-@deffn {Command} {debug isis events} {}
-@deffnx {Command} {no debug isis events} {}
-IS-IS Events.
-@end deffn
-
-@deffn {Command} {debug isis local-updates} {}
-@deffnx {Command} {no debug isis local-updates} {}
-IS-IS local update packets.
-@end deffn
-
-@deffn {Command} {debug isis packet-dump} {}
-@deffnx {Command} {no debug isis packet-dump} {}
-IS-IS packet dump.
-@end deffn
-
-@deffn {Command} {debug isis protocol-errors} {}
-@deffnx {Command} {no debug isis protocol-errors} {}
-IS-IS LSP protocol errors.
-@end deffn
-
-@deffn {Command} {debug isis route-events} {}
-@deffnx {Command} {no debug isis route-events} {}
-IS-IS Route related events.
-@end deffn
-
-@deffn {Command} {debug isis snp-packets} {}
-@deffnx {Command} {no debug isis snp-packets} {}
-IS-IS CSNP/PSNP packets.
-@end deffn
-
-@deffn {Command} {debug isis spf-events} {}
-@deffnx {Command} {debug isis spf-statistics} {}
-@deffnx {Command} {debug isis spf-triggers} {}
-@deffnx {Command} {no debug isis spf-events} {}
-@deffnx {Command} {no debug isis spf-statistics} {}
-@deffnx {Command} {no debug isis spf-triggers} {}
-IS-IS Shortest Path First Events, Timing and Statistic Data
-and triggering events.
-@end deffn
-
-@deffn {Command} {debug isis update-packets} {}
-@deffnx {Command} {no debug isis update-packets} {}
-Update related packets.
-@end deffn
-
-@deffn {Command} {show debugging isis} {}
-Print which ISIS debug level is activate.
-@end deffn
-
-@node ISIS Configuration Examples
-@section ISIS Configuration Examples
-A simple example, with MD5 authentication enabled:
-
-@example
-@group
-!
-interface eth0
- ip router isis FOO
- isis network point-to-point
- isis circuit-type level-2-only
-!
-router isis FOO
-net 47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00
- metric-style wide
- is-type level-2-only
-@end group
-@end example
-
-
-A Traffic Engineering configuration, with Inter-ASv2 support.
-
- - First, the 'zebra.conf' part:
-
-@example
-@group
-hostname HOSTNAME
-password PASSWORD
-log file /var/log/zebra.log
-!
-interface eth0
- ip address 10.2.2.2/24
- link-params
-  enable
-  metric 100
-  max-bw 1.25e+07
-  max-rsv-bw 1.25e+06
-  unrsv-bw 0 1.25e+06
-  unrsv-bw 1 1.25e+06
-  unrsv-bw 2 1.25e+06
-  unrsv-bw 3 1.25e+06
-  unrsv-bw 4 1.25e+06
-  unrsv-bw 5 1.25e+06
-  unrsv-bw 6 1.25e+06
-  unrsv-bw 7 1.25e+06
-  admin-grp 0xab
-!
-interface eth1
- ip address 10.1.1.1/24
- link-params
-  enable
-  metric 100
-  max-bw 1.25e+07
-  max-rsv-bw 1.25e+06
-  unrsv-bw 0 1.25e+06
-  unrsv-bw 1 1.25e+06
-  unrsv-bw 2 1.25e+06
-  unrsv-bw 3 1.25e+06
-  unrsv-bw 4 1.25e+06
-  unrsv-bw 5 1.25e+06
-  unrsv-bw 6 1.25e+06
-  unrsv-bw 7 1.25e+06
-  neighbor 10.1.1.2 as 65000
-@end group
-@end example
-
- - Then the 'isisd.conf' itself:
-
-@example
-@group
-hostname HOSTNAME
-password PASSWORD
-log file /var/log/isisd.log
-!
-!
-interface eth0
- ip router isis FOO
-!
-interface eth1
- ip router isis FOO
-!
-!
-router isis FOO
- isis net 47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00
-  mpls-te on
-  mpls-te router-address 10.1.1.1
-!
-line vty
-@end group
-@end example
diff --git a/doc/kernel.texi b/doc/kernel.texi
deleted file mode 100644 (file)
index e58ade5..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-@node Kernel Interface
-@chapter Kernel Interface
-
-There are several different methods for reading kernel routing table
-information, updating kernel routing tables, and for looking up
-interfaces.
-
-@table @samp
-
-@item ioctl
-The @samp{ioctl} method is a very traditional way for reading or writing
-kernel information.  @samp{ioctl} can be used for looking up interfaces
-and for modifying interface addresses, flags, mtu settings and other
-types of information.  Also, @samp{ioctl} can insert and delete kernel
-routing table entries.  It will soon be available on almost any platform
-which zebra supports, but it is a little bit ugly thus far, so if a
-better method is supported by the kernel, zebra will use that.
-
-@item sysctl
-@samp{sysctl} can lookup kernel information using MIB (Management
-Information Base) syntax.  Normally, it only provides a way of getting
-information from the kernel.  So one would usually want to change kernel
-information using another method such as @samp{ioctl}.
-
-@item proc filesystem
-@samp{proc filesystem} provides an easy way of getting kernel
-information.
-
-@item routing socket
-
-@item netlink
-On recent Linux kernels (2.0.x and 2.2.x), there is a kernel/user
-communication support called @code{netlink}.  It makes asynchronous
-communication between kernel and Frr possible, similar to a routing
-socket on BSD systems.
-
-Before you use this feature, be sure to select (in kernel configuration) 
-the kernel/netlink support option 'Kernel/User network link driver' and 
-'Routing messages'.
-
-Today, the /dev/route special device file is obsolete.  Netlink
-communication is done by reading/writing over netlink socket.
-
-After the kernel configuration, please reconfigure and rebuild Frr.
-You can use netlink as a dynamic routing update channel between Frr
-and the kernel.
-@end table
diff --git a/doc/ldpd-basic-test-setup.md b/doc/ldpd-basic-test-setup.md
deleted file mode 100644 (file)
index b25a2b6..0000000
+++ /dev/null
@@ -1,681 +0,0 @@
-## Topology
-
-The goal of this test is to verify that the all the basic functionality
-of ldpd is working as expected, be it running on Linux or OpenBSD. In
-addition to that, more advanced features are also tested, like LDP
-sessions over IPv6, MD5 authentication and pseudowire signaling.
-
-In the topology below there are 3 PE routers, 3 CE routers and one P
-router (not attached to any consumer site).
-
-All routers have IPv4 addresses and OSPF is used as the IGP. The
-three routers from the bottom of the picture, P, PE2 and PE3, are also
-configured for IPv6 (dual-stack) and static IPv6 routes are used to
-provide connectivity among them.
-
-The three CEs share the same VPLS membership. LDP is used to set up the
-LSPs among the PEs and to signal the pseudowires. MD5 authentication is
-used to protect all LDP sessions.
-
-```
-                          CE1 172.16.1.1/24
-                           +
-                           |
-                       +---+---+
-                       |  PE1  |
-                       | IOS XE|
-                       |       |
-                       +---+---+
-                           |
-                           | 10.0.1.0/24
-                           |
-                       +---+---+
-                       |   P   |
-                +------+ IOS XR+------+
-                |      |       |      |
-                |      +-------+      |
-    10.0.2.0/24 |                     | 10.0.3.0/24
-2001:db8:2::/64 |                     | 2001:db8:3::/64
-                |                     |
-            +---+---+             +---+---+
-            |  PE2  |             |  PE3  |
-            |OpenBSD+-------------+ Linux |
-            |       |             |       |
-            +---+---+ 10.0.4.0/24 +---+---+
-                |   2001:db8:4::/64   |
-                +                     +
- 172.16.1.2/24 CE2                   CE3 172.16.1.3/24
-```
-
-## Configuration
-
-#### Linux
-1 - Enable IPv4/v6 forwarding:
-```
-# sysctl -w net.ipv4.ip_forward=1
-# sysctl -w net.ipv6.conf.all.forwarding=1
-```
-
-2 - Enable MPLS forwarding:
-```
-# modprobe mpls-router
-# modprobe mpls-iptunnel
-# echo 100000 > /proc/sys/net/mpls/platform_labels
-# echo 1 > /proc/sys/net/mpls/conf/eth1/input
-# echo 1 > /proc/sys/net/mpls/conf/eth2/input
-```
-
-3 - Set up the interfaces:
-```
-# ip link add name lo1 type dummy
-# ip link set dev lo1 up
-# ip addr add 4.4.4.4/32 dev lo1
-# ip -6 addr add 4:4:4::4/128 dev lo1
-# ip link set dev eth1 up
-# ip addr add 10.0.4.4/24 dev eth1
-# ip -6 addr add 2001:db8:4::4/64 dev eth1
-# ip link set dev eth2 up
-# ip addr add 10.0.3.4/24 dev eth2
-# ip -6 addr add 2001:db8:3::4/64 dev eth2
-```
-
-4 - Set up the bridge and pseudowire interfaces:
-```
-# ip link add type bridge
-# ip link set dev bridge0 up
-# ip link set dev eth0 up
-# ip link set dev eth0 master bridge0
-# ip link add name mpw0 type dummy
-# ip link set dev mpw0 up
-# ip link set dev mpw0 master bridge0
-# ip link add name mpw1 type dummy
-# ip link set dev mpw1 up
-# ip link set dev mpw1 master bridge0
-```
-
-> NOTE: MPLS support in the Linux kernel is very recent and it still
-doesn't support pseudowire interfaces. We are using here dummy interfaces
-just to show how the VPLS configuration should look like in the future.
-
-5 - Add static IPv6 routes for the remote loopbacks:
-```
-# ip -6 route add 2:2:2::2/128 via 2001:db8:3::2
-# ip -6 route add 3:3:3::3/128 via 2001:db8:4::3
-```
-
-6 - Edit /etc/frr/ospfd.conf:
-```
-router ospf
- network 4.4.4.4/32 area 0.0.0.0
- network 10.0.3.4/24 area 0.0.0.0
- network 10.0.4.4/24 area 0.0.0.0
-!
-```
-
-7 - Edit /etc/frr/ldpd.conf:
-```
-debug mpls ldp messages recv
-debug mpls ldp messages sent
-debug mpls ldp zebra
-!
-mpls ldp
- router-id 4.4.4.4
- dual-stack cisco-interop
- neighbor 1.1.1.1 password opensourcerouting
- neighbor 2.2.2.2 password opensourcerouting
- neighbor 3.3.3.3 password opensourcerouting
- !
- address-family ipv4
-  discovery transport-address 4.4.4.4
-  label local advertise explicit-null
-  !
-  interface eth2
-  !
-  interface eth1
-  !
- !
- address-family ipv6
-  discovery transport-address 4:4:4::4
-  ttl-security disable
-  !
-  interface eth2
-  !
-  interface eth1
-  !
- !
-!
-l2vpn ENG type vpls
- bridge br0
- member interface eth0
- !
- member pseudowire mpw0
-  neighbor lsr-id 1.1.1.1
-  pw-id 100
- !
- member pseudowire mpw1
-  neighbor lsr-id 3.3.3.3
-  neighbor address 3:3:3::3
-  pw-id 100
- !
-!
-```
-
-> NOTE: We have to disable ttl-security under the ipv6 address-family
-in order to interoperate with the IOS-XR router. GTSM is mandatory for
-LDPv6 but the IOS-XR implementation is not RFC compliant in this regard.
-
-8 - Run zebra, ospfd and ldpd.
-
-#### OpenBSD
-1 - Enable IPv4/v6 forwarding:
-```
-# sysctl net.inet.ip.forwarding=1
-# sysctl net.inet6.ip6.forwarding=1
-```
-
-2 - Enable MPLS forwarding:
-```
-# ifconfig em2 10.0.2.3/24 mpls
-# ifconfig em3 10.0.4.3/24 mpls
-```
-
-3 - Set up the interfaces:
-```
-# ifconfig lo1 alias 3.3.3.3 netmask 255.255.255.255
-# ifconfig lo1 inet6 3:3:3::3/128
-# ifconfig em2 inet6 2001:db8:2::3/64
-# ifconfig em3 inet6 2001:db8:4::3/64
-```
-
-4 - Set up the bridge and pseudowire interfaces:
-```
-# ifconfig bridge0 create
-# ifconfig bridge0 up
-# ifconfig em1 up
-# ifconfig bridge0 add em1
-# ifconfig mpw0 create
-# ifconfig mpw0 up
-# ifconfig bridge0 add mpw0
-# ifconfig mpw1 create
-# ifconfig mpw1 up
-# ifconfig bridge0 add mpw1
-```
-
-5 - Add static IPv6 routes for the remote loopbacks:
-```
-# route -n add 4:4:4::4/128 2001:db8:4::4
-# route -n add 2:2:2::2/128 2001:db8:2::2
-```
-
-6 - Edit /etc/frr/ospfd.conf:
-```
-router ospf
- network 10.0.2.3/24 area 0
- network 10.0.4.3/24 area 0
- network 3.3.3.3/32 area 0
-!
-```
-
-7 - Edit /etc/frr/ldpd.conf:
-```
-debug mpls ldp messages recv
-debug mpls ldp messages sent
-debug mpls ldp zebra
-!
-mpls ldp
- router-id 3.3.3.3
- dual-stack cisco-interop
- neighbor 1.1.1.1 password opensourcerouting
- neighbor 2.2.2.2 password opensourcerouting
- neighbor 4.4.4.4 password opensourcerouting
- !
- address-family ipv4
-  discovery transport-address 3.3.3.3
-  label local advertise explicit-null
-  !
-  interface em3
-  !
-  interface em2
-  !
- !
- address-family ipv6
-  discovery transport-address 3:3:3::3
-  ttl-security disable
-  !
-  interface em3
-  !
-  interface em2
-  !
- !
-!
-l2vpn ENG type vpls
- bridge br0
- member interface em1
- !
- member pseudowire mpw0
-  neighbor lsr-id 1.1.1.1
-  pw-id 100
- !
- member pseudowire mpw1
-  neighbor lsr-id 4.4.4.4
-  neighbor address 4:4:4::4
-  pw-id 100
- !
-!
-```
-
-8 - Run zebra, ospfd and ldpd.
-
-#### Cisco routers
-CE1 (IOS):
-```
-interface FastEthernet0/0
- ip address 172.16.1.1 255.255.255.0
- !
-!
-```
-
-CE2 (IOS):
-```
-interface FastEthernet0/0
- ip address 172.16.1.2 255.255.255.0
- !
-!
-```
-
-CE3 (IOS):
-```
-interface FastEthernet0/0
- ip address 172.16.1.3 255.255.255.0
- !
-!
-```
-
-PE1 - IOS-XE (1):
-```
-mpls ldp neighbor 2.2.2.2 password opensourcerouting
-mpls ldp neighbor 3.3.3.3 password opensourcerouting
-mpls ldp neighbor 4.4.4.4 password opensourcerouting
-!
-l2vpn vfi context VFI
- vpn id 1
- member pseudowire2
- member pseudowire1
-!
-bridge-domain 1
- member GigabitEthernet1 service-instance 1
- member vfi VFI
-!
-interface Loopback1
- ip address 1.1.1.1 255.255.255.255
-!
-interface pseudowire1
- encapsulation mpls
- neighbor 3.3.3.3 100
-!
-interface pseudowire2
- encapsulation mpls
- neighbor 4.4.4.4 100
-!
-interface GigabitEthernet3
- ip address 10.0.1.1 255.255.255.0
- mpls ip
-!
-router ospf 1
- network 0.0.0.0 255.255.255.255 area 0
-!
-```
-
-P - IOS-XR (2):
-```
-interface Loopback1
- ipv4 address 2.2.2.2 255.255.255.255
- ipv6 address 2:2:2::2/128
-!
-interface GigabitEthernet0/0/0/0
- ipv4 address 10.0.1.2 255.255.255.0
-!
-interface GigabitEthernet0/0/0/1
- ipv4 address 10.0.2.2 255.255.255.0
- ipv6 address 2001:db8:2::2/64
- ipv6 enable
-!
-interface GigabitEthernet0/0/0/2
- ipv4 address 10.0.3.2 255.255.255.0
- ipv6 address 2001:db8:3::2/64
- ipv6 enable
-!
-router static
- address-family ipv6 unicast
-  3:3:3::3/128 2001:db8:2::3
-  4:4:4::4/128 2001:db8:3::4
- !
-!
-router ospf 1
- router-id 2.2.2.2
- address-family ipv4 unicast
- area 0
-  interface Loopback1
-  !
-  interface GigabitEthernet0/0/0/0
-  !
-  interface GigabitEthernet0/0/0/1
-  !
-  interface GigabitEthernet0/0/0/2
-  !
- !
-!
-mpls ldp
- router-id 2.2.2.2
- neighbor
-  1.1.1.1:0 password clear opensourcerouting
-  3.3.3.3:0 password clear opensourcerouting
-  4.4.4.4:0 password clear opensourcerouting
- !
- address-family ipv4
- !
- address-family ipv6
-  discovery transport-address 2:2:2::2
- !
- interface GigabitEthernet0/0/0/0
-  address-family ipv4
-  !
- !
- interface GigabitEthernet0/0/0/1
-  address-family ipv4
-  !
-  address-family ipv6
-  !
- !
- interface GigabitEthernet0/0/0/2
-  address-family ipv4
-  !
-  address-family ipv6
-  !
- !
-!
-```
-
-## Verification - Control Plane
-
-Using the CLI on the Linux box, the goal is to ensure that everything
-is working as expected.
-
-First, verify that all the required adjacencies and neighborships sessions
-were established:
-
-```
-linux# show mpls ldp discovery
-Local LDP Identifier: 4.4.4.4:0
-Discovery Sources:
-  Interfaces:
-    eth1: xmit/recv
-      LDP Id: 3.3.3.3:0, Transport address: 3.3.3.3
-          Hold time: 15 sec
-      LDP Id: 3.3.3.3:0, Transport address: 3:3:3::3
-          Hold time: 15 sec
-    eth2: xmit/recv
-      LDP Id: 2.2.2.2:0, Transport address: 2.2.2.2
-          Hold time: 15 sec
-      LDP Id: 2.2.2.2:0, Transport address: 2:2:2::2
-          Hold time: 15 sec
-  Targeted Hellos:
-    4.4.4.4 -> 1.1.1.1: xmit/recv
-      LDP Id: 1.1.1.1:0, Transport address: 1.1.1.1
-          Hold time: 45 sec
-    4:4:4::4 -> 3:3:3::3: xmit/recv
-      LDP Id: 3.3.3.3:0, Transport address: 3:3:3::3
-          Hold time: 45 sec
-
-linux# show mpls ldp neighbor
-Peer LDP Identifier: 1.1.1.1:0
-  TCP connection: 4.4.4.4:40921 - 1.1.1.1:646
-  Session Holdtime: 180 sec
-  State: OPERATIONAL; Downstream-Unsolicited
-  Up time: 00:06:02
-  LDP Discovery Sources:
-    IPv4:
-      Targeted Hello: 1.1.1.1
-
-Peer LDP Identifier: 2.2.2.2:0
-  TCP connection: 4:4:4::4:52286 - 2:2:2::2:646
-  Session Holdtime: 180 sec
-  State: OPERATIONAL; Downstream-Unsolicited
-  Up time: 00:06:02
-  LDP Discovery Sources:
-    IPv4:
-      Interface: eth2
-    IPv6:
-      Interface: eth2
-
-Peer LDP Identifier: 3.3.3.3:0
-  TCP connection: 4:4:4::4:60575 - 3:3:3::3:646
-  Session Holdtime: 180 sec
-  State: OPERATIONAL; Downstream-Unsolicited
-  Up time: 00:05:57
-  LDP Discovery Sources:
-    IPv4:
-      Interface: eth1
-    IPv6:
-      Targeted Hello: 3:3:3::3
-      Interface: eth1
-```
-
-Note that the neighborships with the P and PE2 routers were established
-over IPv6, since this is the default behavior for dual-stack LSRs, as
-specified in RFC 7552. If desired, the **dual-stack transport-connection
-prefer ipv4** command can be used to establish these sessions over IPv4
-(the command should be applied an all routers).
-
-Now, verify that there's a remote label for each PE address:
-```
-linux# show mpls ldp binding
-1.1.1.1/32
-        Local binding: label: 20
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             imp-null
-            2.2.2.2             24000
-            3.3.3.3             20
-2.2.2.2/32
-        Local binding: label: 21
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             18
-            2.2.2.2             imp-null
-            3.3.3.3             21
-3.3.3.3/32
-        Local binding: label: 22
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             21
-            2.2.2.2             24003
-            3.3.3.3             imp-null
-4.4.4.4/32
-        Local binding: label: imp-null
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             22
-            2.2.2.2             24001
-            3.3.3.3             22
-10.0.1.0/24
-        Local binding: label: 23
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             imp-null
-            2.2.2.2             imp-null
-            3.3.3.3             23
-10.0.2.0/24
-        Local binding: label: 24
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             20
-            2.2.2.2             imp-null
-            3.3.3.3             imp-null
-10.0.3.0/24
-        Local binding: label: imp-null
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             19
-            2.2.2.2             imp-null
-            3.3.3.3             24
-10.0.4.0/24
-        Local binding: label: imp-null
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            1.1.1.1             23
-            2.2.2.2             24002
-            3.3.3.3             imp-null
-2:2:2::2/128
-        Local binding: label: 18
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            2.2.2.2             imp-null
-            3.3.3.3             18
-3:3:3::3/128
-        Local binding: label: 19
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            2.2.2.2             24007
-4:4:4::4/128
-        Local binding: label: imp-null
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            2.2.2.2             24006
-            3.3.3.3             19
-2001:db8:2::/64
-        Local binding: label: -
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            2.2.2.2             imp-null
-            3.3.3.3             imp-null
-2001:db8:3::/64
-        Local binding: label: imp-null
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            2.2.2.2             imp-null
-2001:db8:4::/64
-        Local binding: label: imp-null
-        Remote bindings:
-            Peer                Label
-            -----------------   ---------
-            3.3.3.3             imp-null
-```
-
-Check if the pseudowires are up:
-```
-linux# show l2vpn atom vc
-Interface Peer ID         VC ID      Name             Status
---------- --------------- ---------- ---------------- ----------
-mpw1      3.3.3.3         100        ENG              UP
-mpw0      1.1.1.1         100        ENG              UP
-```
-
-Check the label bindings of the pseudowires:
-```
-linux# show l2vpn atom binding
-  Destination Address: 1.1.1.1, VC ID: 100
-    Local Label:  25
-        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
-        MTU: 1500
-    Remote Label:  16
-        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
-        MTU: 1500
-  Destination Address: 3.3.3.3, VC ID: 100
-    Local Label:  26
-        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
-        MTU: 1500
-    Remote Label:  26
-        Cbit: 1,    VC Type: Ethernet,    GroupID: 0
-        MTU: 1500
-```
-
-## Verification - Data Plane
-
-Verify that all the exchanged label mappings were installed in zebra:
-```
-linux# show mpls table
- Inbound                            Outbound
-   Label     Type          Nexthop     Label
---------  -------  ---------------  --------
-      17      LDP    2001:db8:3::2         3
-      19      LDP    2001:db8:3::2     24005
-      20      LDP         10.0.3.2     24000
-      21      LDP         10.0.3.2         3
-      22      LDP         10.0.3.2     24001
-      23      LDP         10.0.3.2         3
-      24      LDP         10.0.3.2         3
-      25      LDP         10.0.3.2         3
-
-linux# show ip route ldp
-Codes: K - kernel route, C - connected, S - static, R - RIP,
-       O - OSPF, I - IS-IS, B - BGP, P - PIM, A - Babel, L - LDP,
-       > - selected route, * - FIB route
-
-L>* 1.1.1.1/32 [0/0] via 10.0.3.2, eth2 label 24000
-L>* 3.3.3.3/32 [0/0] via 10.0.3.2, eth2 label 24001
-```
-
-Verify that all the exchanged label mappings were installed in the kernel:
-```
-$ ip -M ro
-17 via inet6 2001:db8:3::2 dev eth2  proto zebra
-19 as to 24005 via inet6 2001:db8:3::2 dev eth2  proto zebra
-20 as to 24000 via inet 10.0.3.2 dev eth2  proto zebra
-21 via inet 10.0.3.2 dev eth2  proto zebra
-22 as to 24001 via inet 10.0.3.2 dev eth2  proto zebra
-23 via inet 10.0.3.2 dev eth2  proto zebra
-24 via inet 10.0.3.2 dev eth2  proto zebra
-25 via inet 10.0.3.2 dev eth2  proto zebra
-$
-$ ip route | grep mpls
-1.1.1.1  encap mpls  24000 via 10.0.3.2 dev eth2  proto zebra  metric 20
-3.3.3.3  encap mpls  24001 via 10.0.3.2 dev eth2  proto zebra  metric 20
-```
-
-Now ping PE1's loopback using lo1's address as a source address:
-```
-$ ping -c 5 -I 4.4.4.4 1.1.1.1
-PING 1.1.1.1 (1.1.1.1) from 4.4.4.4 : 56(84) bytes of data.
-64 bytes from 1.1.1.1: icmp_seq=1 ttl=253 time=3.02 ms
-64 bytes from 1.1.1.1: icmp_seq=2 ttl=253 time=3.13 ms
-64 bytes from 1.1.1.1: icmp_seq=3 ttl=253 time=3.19 ms
-64 bytes from 1.1.1.1: icmp_seq=4 ttl=253 time=3.07 ms
-64 bytes from 1.1.1.1: icmp_seq=5 ttl=253 time=3.27 ms
-
---- 1.1.1.1 ping statistics ---
-5 packets transmitted, 5 received, 0% packet loss, time 4005ms
-rtt min/avg/max/mdev = 3.022/3.140/3.278/0.096 ms
-```
-
-Verify that the ICMP echo request packets are leaving with the MPLS
-label advertised by the P router. Also, verify that the ICMP echo reply
-packets are arriving with an explicit-null MPLS label:
-```
-# tcpdump -n -i eth2 mpls and icmp
-tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
-listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
-10:01:40.758771 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 1, length 64
-10:01:40.761777 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 1, length 64
-10:01:41.760343 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 2, length 64
-10:01:41.763448 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 2, length 64
-10:01:42.761758 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 3, length 64
-10:01:42.764924 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 3, length 64
-10:01:43.763193 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 4, length 64
-10:01:43.766237 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 4, length 64
-10:01:44.764552 MPLS (label 24000, exp 0, [S], ttl 64) IP 4.4.4.4 > 1.1.1.1: ICMP echo request, id 13370, seq 5, length 64
-10:01:44.767803 MPLS (label 0, exp 0, [S], ttl 254) IP 1.1.1.1 > 4.4.4.4: ICMP echo reply, id 13370, seq 5, length 64
-```
diff --git a/doc/ldpd.8.in b/doc/ldpd.8.in
deleted file mode 100644 (file)
index 2d68a31..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-.TH LDPD 8 "29 March 2016" "@PACKAGE_FULLNAME@ LDP daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-ldpd \- an LDP engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B ldpd
-[
-.B \-dhv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B ldpd
-is a component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B ldpd
-command:
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR 
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/ldpd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When ldpd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart ldpd.  The default is \fB\fI@CFG_STATE@/ldpd.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the ldpd VTY will listen on. This defaults to
-2612, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the ldpd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-There are currently no such modules for
-\fBldpd\fR in the base package.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/ldpd
-The default location of the 
-.B ldpd
-binary.
-.TP
-.BI @CFG_SYSCONF@/ldpd.conf
-The default location of the 
-.B ldpd
-config file.
-.TP
-.BI $(PWD)/ldpd.log 
-If the 
-.B ldpd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBldpd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The ldpd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBldpd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-.B ldpd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/doc/main.texi b/doc/main.texi
deleted file mode 100644 (file)
index 9e2ca5e..0000000
+++ /dev/null
@@ -1,525 +0,0 @@
-@node Zebra
-@chapter Zebra
-
-@c SYNOPSIS
-@command{zebra} is an IP routing manager.  It provides kernel routing
-table updates, interface lookups, and redistribution of routes between
-different routing protocols.
-
-@menu
-* Invoking zebra::              Running the program
-* Interface Commands::          Commands for zebra interfaces
-* Static Route Commands::       Commands for adding static routes
-* Multicast RIB Commands::      Commands for controlling MRIB behavior
-* zebra Route Filtering::       Commands for zebra route filtering
-* zebra FIB push interface::    Interface to optional FPM component
-* zebra Terminal Mode Commands::  Commands for zebra's VTY
-@end menu
-
-
-@node Invoking zebra
-@section Invoking zebra
-
-Besides the common invocation options (@pxref{Common Invocation Options}), the
-@command{zebra} specific invocation options are listed below.
-
-@table @samp
-@item -b
-@itemx --batch
-Runs in batch mode.  @command{zebra} parses configuration file and terminates
-immediately.
-
-@item -k
-@itemx --keep_kernel
-When zebra starts up, don't delete old self inserted routes.
-
-@item -r
-@itemx --retain
-When program terminates, retain routes added by zebra.
-
-@end table
-
-@node Interface Commands
-@section Interface Commands
-
-@menu
-* Standard Commands::
-* Link Parameters Commands::
-@end menu
-
-@node Standard Commands
-@subsection Standard Commands
-
-@deffn Command {interface @var{ifname}} {}
-@end deffn
-
-@deffn {Interface Command} {shutdown} {}
-@deffnx {Interface Command} {no shutdown} {}
-Up or down the current interface.
-@end deffn
-
-@deffn {Interface Command} {ip address @var{address/prefix}} {}
-@deffnx {Interface Command} {ipv6 address @var{address/prefix}} {}
-@deffnx {Interface Command} {no ip address @var{address/prefix}} {}
-@deffnx {Interface Command} {no ipv6 address @var{address/prefix}} {}
-Set the IPv4 or IPv6 address/prefix for the interface.
-@end deffn
-
-@deffn {Interface Command} {ip address @var{local-addr} peer @var{peer-addr/prefix}} {}
-@deffnx {Interface Command} {no ip address @var{local-addr} peer @var{peer-addr/prefix}} {}
-Configure an IPv4 Pointopoint address on the interface.
-(The concept of PtP addressing does not exist for IPv6.)
-
-@var{local-addr} has no subnet mask since the local side in PtP
-addressing is always a single (/32) address.  @var{peer-addr/prefix}
-can be an arbitrary subnet behind the other end of the link (or even on the
-link in Point-to-Multipoint setups), though generally /32s are used.
-@end deffn
-
-@deffn {Interface Command} {ip address @var{address/prefix} secondary} {}
-@deffnx {Interface Command} {no ip address @var{address/prefix} secondary} {}
-Set the secondary flag for this address. This causes ospfd to not treat the
-address as a distinct subnet.
-@end deffn
-
-@deffn {Interface Command} {description @var{description} ...} {}
-Set description for the interface.
-@end deffn
-
-@deffn {Interface Command} {multicast} {}
-@deffnx {Interface Command} {no multicast} {}
-Enable or disables multicast flag for the interface.
-@end deffn
-
-@deffn {Interface Command} {bandwidth <1-10000000>} {}
-@deffnx {Interface Command} {no bandwidth <1-10000000>} {}
-Set bandwidth value of the interface in kilobits/sec.  This is for
-calculating OSPF cost. This command does not affect the actual device
-configuration.
-@end deffn
-
-@deffn {Interface Command} {link-detect} {}
-@deffnx {Interface Command} {no link-detect} {}
-Enable/disable link-detect on platforms which support this. Currently
-only Linux and Solaris, and only where network interface drivers support reporting
-link-state via the IFF_RUNNING flag.
-@end deffn
-
-@node Link Parameters Commands
-@subsection Link Parameters Commands
-
-@deffn {Interface Command} {link-params} {}
-@deffnx {Interface Command} {no link-param} {}
-Enter into the link parameters sub node. At least 'enable' must be set to activate the link parameters,
-and consequently Traffic Engineering on this interface. MPLS-TE must be enable at the OSPF (@ref{OSPF Traffic Engineering})
-or ISIS (@ref{ISIS Traffic Engineering}) router level in complement to this.
-Disable link parameters for this interface.
-@end deffn
-
-Under link parameter statement, the following commands set the different TE values:
-
-@deffn link-params {enable}
-Enable link parameters for this interface.
-@end deffn
-
-@deffn link-params {metric <0-4294967295>} {}
-@deffnx link-params {max-bw @var{bandwidth}} {}
-@deffnx link-params {max-rsv-bw @var{bandwidth}} {}
-@deffnx link-params {unrsv-bw <0-7> @var{bandwidth}} {}
-@deffnx link-params {admin-grp @var{bandwidth}} {}
-These commands specifies the Traffic Engineering parameters of the interface in conformity to RFC3630 (OSPF)
-or RFC5305 (ISIS).
-There are respectively the TE Metric (different from the OSPF or ISIS metric), Maximum Bandwidth (interface speed
-by default), Maximum Reservable Bandwidth, Unreserved Bandwidth for each 0-7 priority and Admin Group (ISIS) or
-Resource Class/Color (OSPF).
-
-Note that @var{bandwidth} are specified in IEEE floating point format and express in Bytes/second.
-@end deffn
-
-@deffn  link-param {delay <0-16777215> [min <0-16777215> | max <0-16777215>]} {}
-@deffnx  link-param {delay-variation <0-16777215>} {}
-@deffnx  link-param {packet-loss @var{percentage}} {}
-@deffnx  link-param {res-bw @var{bandwidth}} {}
-@deffnx  link-param {ava-bw @var{bandwidth}} {}
-@deffnx  link-param {use-bw @var{bandwidth}} {}
-These command specifies additionnal Traffic Engineering parameters of the interface in conformity to
-draft-ietf-ospf-te-metrics-extension-05.txt and draft-ietf-isis-te-metrics-extension-03.txt. There are
-respectively the delay, jitter, loss, available bandwidth, reservable bandwidth and utilized bandwidth.
-
-Note that @var{bandwidth} are specified in IEEE floating point format and express in Bytes/second.
-Delays and delay variation are express in micro-second (µs). Loss is specified in @var{percentage} ranging
-from 0 to 50.331642% by step of 0.000003.
-@end deffn
-
-@deffn link-param {neighbor <A.B.C.D> as <0-65535>} {}
-@deffnx link-param {no neighbor} {}
-Specifies the remote ASBR IP address and Autonomous System (AS) number for InterASv2 link in OSPF (RFC5392).
-Note that this option is not yet supported for ISIS (RFC5316).
-@end deffn
-
-
-@node Static Route Commands
-@section Static Route Commands
-
-Static routing is a very fundamental feature of routing technology.  It
-defines static prefix and gateway.
-
-@deffn Command {ip route @var{network} @var{gateway}} {}
-@var{network} is destination prefix with format of A.B.C.D/M.
-@var{gateway} is gateway for the prefix.  When @var{gateway} is
-A.B.C.D format.  It is taken as a IPv4 address gateway.  Otherwise it
-is treated as an interface name. If the interface name is @var{null0} then
-zebra installs a blackhole route.
-
-@example
-ip route 10.0.0.0/8 10.0.0.2
-ip route 10.0.0.0/8 ppp0
-ip route 10.0.0.0/8 null0
-@end example
-
-First example defines 10.0.0.0/8 static route with gateway 10.0.0.2.
-Second one defines the same prefix but with gateway to interface ppp0. The
-third install a blackhole route.
-@end deffn
-
-@deffn Command {ip route @var{network} @var{netmask} @var{gateway}} {}
-This is alternate version of above command.  When @var{network} is
-A.B.C.D format, user must define @var{netmask} value with A.B.C.D
-format.  @var{gateway} is same option as above command
-
-@example
-ip route 10.0.0.0 255.255.255.0 10.0.0.2
-ip route 10.0.0.0 255.255.255.0 ppp0
-ip route 10.0.0.0 255.255.255.0 null0
-@end example
-
-These statements are equivalent to those in the previous example.
-@end deffn
-
-@deffn Command {ip route @var{network} @var{gateway} @var{distance}} {}
-Installs the route with the specified distance.
-@end deffn
-
-Multiple nexthop static route
-
-@example
-ip route 10.0.0.1/32 10.0.0.2
-ip route 10.0.0.1/32 10.0.0.3
-ip route 10.0.0.1/32 eth0
-@end example
-
-If there is no route to 10.0.0.2 and 10.0.0.3, and interface eth0
-is reachable, then the last route is installed into the kernel.
-
-If zebra has been compiled with multipath support, and both 10.0.0.2 and
-10.0.0.3 are reachable, zebra will install a multipath route via both
-nexthops, if the platform supports this.
-
-@example
-zebra> show ip route
-S>  10.0.0.1/32 [1/0] via 10.0.0.2 inactive
-                      via 10.0.0.3 inactive
-  *                   is directly connected, eth0
-@end example
-
-@example
-ip route 10.0.0.0/8 10.0.0.2
-ip route 10.0.0.0/8 10.0.0.3
-ip route 10.0.0.0/8 null0 255
-@end example
-
-This will install a multihop route via the specified next-hops if they are
-reachable, as well as a high-metric blackhole route, which can be useful to
-prevent traffic destined for a prefix to match less-specific routes (eg
-default) should the specified gateways not be reachable. Eg:
-
-@example
-zebra> show ip route 10.0.0.0/8
-Routing entry for 10.0.0.0/8
-  Known via "static", distance 1, metric 0
-    10.0.0.2 inactive
-    10.0.0.3 inactive
-
-Routing entry for 10.0.0.0/8
-  Known via "static", distance 255, metric 0
-    directly connected, Null0
-@end example
-
-@deffn Command {ipv6 route @var{network} @var{gateway}} {}
-@deffnx Command {ipv6 route @var{network} @var{gateway} @var{distance}} {}
-These behave similarly to their ipv4 counterparts.
-@end deffn
-
-@deffn Command {ipv6 route @var{network} from @var{srcprefix} @var{gateway}} {}
-@deffnx Command {ipv6 route @var{network} from @var{srcprefix} @var{gateway} @var{distance}} {}
-Install a static source-specific route.  These routes are currently supported
-on Linux operating systems only, and perform AND matching on packet's
-destination and source addresses in the kernel's forwarding path.  Note that
-destination longest-prefix match is "more important" than source LPM, e.g.
-@command{"2001:db8:1::/64 from 2001:db8::/48"} will win over
-@command{"2001:db8::/48 from 2001:db8:1::/64"} if both match.
-@end deffn
-
-
-@deffn Command {table @var{tableno}} {}
-Select the primary kernel routing table to be used.  This only works
-for kernels supporting multiple routing tables (like GNU/Linux 2.2.x
-and later).  After setting @var{tableno} with this command,
-static routes defined after this are added to the specified table.
-@end deffn
-
-@node Multicast RIB Commands
-@section Multicast RIB Commands
-
-The Multicast RIB provides a separate table of unicast destinations which
-is used for Multicast Reverse Path Forwarding decisions.  It is used with
-a multicast source's IP address, hence contains not multicast group
-addresses but unicast addresses.
-
-This table is fully separate from the default unicast table.  However,
-RPF lookup can include the unicast table.
-
-WARNING: RPF lookup results are non-responsive in this version of Frr,
-i.e. multicast routing does not actively react to changes in underlying
-unicast topology!
-
-@deffn Command {ip multicast rpf-lookup-mode @var{mode}} {}
-@deffnx Command {no ip multicast rpf-lookup-mode [@var{mode}]} {}
-
-@var{mode} sets the method used to perform RPF lookups.  Supported modes:
-
-@table @samp
-@item urib-only
-Performs the lookup on the Unicast RIB.  The Multicast RIB is never used.
-@item mrib-only
-Performs the lookup on the Multicast RIB.  The Unicast RIB is never used.
-@item mrib-then-urib
-Tries to perform the lookup on the Multicast RIB.  If any route is found,
-that route is used.  Otherwise, the Unicast RIB is tried.
-@item lower-distance
-Performs a lookup on the Multicast RIB and Unicast RIB each.  The result
-with the lower administrative distance is used;  if they're equal, the
-Multicast RIB takes precedence.
-@item longer-prefix
-Performs a lookup on the Multicast RIB and Unicast RIB each.  The result
-with the longer prefix length is used;  if they're equal, the
-Multicast RIB takes precedence.
-@end table
-
-The @code{mrib-then-urib} setting is the default behavior if nothing is
-configured.  If this is the desired behavior, it should be explicitly
-configured to make the configuration immune against possible changes in
-what the default behavior is.
-
-WARNING: Unreachable routes do not receive special treatment and do not
-cause fallback to a second lookup.
-@end deffn
-
-@deffn Command {show ip rpf @var{addr}} {}
-
-Performs a Multicast RPF lookup, as configured with
-@command{ip multicast rpf-lookup-mode @var{mode}}.  @var{addr} specifies
-the multicast source address to look up.
-
-@example
-> show ip rpf 192.0.2.1
-Routing entry for 192.0.2.0/24 using Unicast RIB
-  Known via "kernel", distance 0, metric 0, best
-  * 198.51.100.1, via eth0
-@end example
-
-Indicates that a multicast source lookup for 192.0.2.1 would use an
-Unicast RIB entry for 192.0.2.0/24 with a gateway of 198.51.100.1.
-@end deffn
-
-@deffn Command {show ip rpf} {}
-
-Prints the entire Multicast RIB.  Note that this is independent of the
-configured RPF lookup mode, the Multicast RIB may be printed yet not
-used at all.
-@end deffn
-
-@deffn Command {ip mroute @var{prefix} @var{nexthop} [@var{distance}]} {}
-@deffnx Command {no ip mroute @var{prefix} @var{nexthop} [@var{distance}]} {}
-
-Adds a static route entry to the Multicast RIB.  This performs exactly as
-the @command{ip route} command, except that it inserts the route in the
-Multicast RIB instead of the Unicast RIB.
-@end deffn
-
-
-@node zebra Route Filtering
-@section zebra Route Filtering
-Zebra supports @command{prefix-list} and @command{route-map} to match
-routes received from other frr components.  The
-@command{permit}/@command{deny} facilities provided by these commands
-can be used to filter which routes zebra will install in the kernel.
-
-@deffn Command {ip protocol @var{protocol} route-map @var{routemap}} {}
-Apply a route-map filter to routes for the specified protocol. @var{protocol}
-can be @b{any} or one of
-@b{system},
-@b{kernel},
-@b{connected},
-@b{static},
-@b{rip},
-@b{ripng},
-@b{ospf},
-@b{ospf6},
-@b{isis},
-@b{bgp},
-@b{hsls}.
-@end deffn
-
-@deffn {Route Map} {set src @var{address}}
-Within a route-map, set the preferred source address for matching routes
-when installing in the kernel.
-@end deffn
-
-@example
-The following creates a prefix-list that matches all addresses, a route-map
-that sets the preferred source address, and applies the route-map to all
-@command{rip} routes.
-
-@group
-ip prefix-list ANY permit 0.0.0.0/0 le 32
-route-map RM1 permit 10
-     match ip address prefix-list ANY
-     set src 10.0.0.1
-
-ip protocol rip route-map RM1
-@end group
-@end example
-
-@node zebra FIB push interface
-@section zebra FIB push interface
-
-Zebra supports a 'FIB push' interface that allows an external
-component to learn the forwarding information computed by the Frr
-routing suite.  This is a loadable module that needs to be enabled
-at startup as described in @ref{Loadable Module Support}.
-
-In Frr, the Routing Information Base (RIB) resides inside
-zebra. Routing protocols communicate their best routes to zebra, and
-zebra computes the best route across protocols for each prefix. This
-latter information makes up the Forwarding Information Base
-(FIB). Zebra feeds the FIB to the kernel, which allows the IP stack in
-the kernel to forward packets according to the routes computed by
-Frr. The kernel FIB is updated in an OS-specific way. For example,
-the @code{netlink} interface is used on Linux, and route sockets are
-used on FreeBSD.
-
-The FIB push interface aims to provide a cross-platform mechanism to
-support scenarios where the router has a forwarding path that is
-distinct from the kernel, commonly a hardware-based fast path. In
-these cases, the FIB needs to be maintained reliably in the fast path
-as well. We refer to the component that programs the forwarding plane
-(directly or indirectly) as the Forwarding Plane Manager or FPM.
-
-The FIB push interface comprises of a TCP connection between zebra and
-the FPM. The connection is initiated by zebra -- that is, the FPM acts
-as the TCP server.
-
-The relevant zebra code kicks in when zebra is configured with the
-@code{--enable-fpm} flag. Zebra periodically attempts to connect to
-the well-known FPM port. Once the connection is up, zebra starts
-sending messages containing routes over the socket to the FPM. Zebra
-sends a complete copy of the forwarding table to the FPM, including
-routes that it may have picked up from the kernel. The existing
-interaction of zebra with the kernel remains unchanged -- that is, the
-kernel continues to receive FIB updates as before.
-
-The encapsulation header for the messages exchanged with the FPM is
-defined by the file @file{fpm/fpm.h} in the frr tree. The routes
-themselves are encoded in netlink or protobuf format, with netlink
-being the default.
-
-Protobuf is one of a number of new serialization formats wherein the
-message schema is expressed in a purpose-built language. Code for
-encoding/decoding to/from the wire format is generated from the
-schema. Protobuf messages can be extended easily while maintaining
-backward-compatibility with older code. Protobuf has the following
-advantages over netlink:
-
-@itemize
-@item
-Code for serialization/deserialization is generated
-automatically. This reduces the likelihood of bugs, allows third-party
-programs to be integrated quickly, and makes it easy to add fields.
-@item
-The message format is not tied to an OS (Linux), and can be evolved
-independently.
-@end itemize
-
-As mentioned before, zebra encodes routes sent to the FPM in netlink
-format by default. The format can be controlled via the FPM module's
-load-time option to zebra, which currently takes the values @code{netlink}
-and @code{protobuf}.
-
-The zebra FPM interface uses replace semantics. That is, if a 'route
-add' message for a prefix is followed by another 'route add' message,
-the information in the second message is complete by itself, and
-replaces the information sent in the first message.
-
-If the connection to the FPM goes down for some reason, zebra sends
-the FPM a complete copy of the forwarding table(s) when it reconnects.
-
-@node zebra Terminal Mode Commands
-@section zebra Terminal Mode Commands
-
-@deffn Command {show ip route} {}
-Display current routes which zebra holds in its database.
-
-@example
-@group
-Router# show ip route
-Codes: K - kernel route, C - connected, S - static, R - RIP,
-       B - BGP * - FIB route.
-
-K* 0.0.0.0/0              203.181.89.241
-S  0.0.0.0/0              203.181.89.1
-C* 127.0.0.0/8            lo
-C* 203.181.89.240/28      eth0
-@end group
-@end example
-@end deffn
-
-@deffn Command {show ipv6 route} {}
-@end deffn
-
-@deffn Command {show interface} {}
-@end deffn
-
-@deffn Command {show ip prefix-list [@var{name}]} {}
-@end deffn
-
-@deffn Command {show route-map [@var{name}]} {}
-@end deffn
-
-@deffn Command {show ip protocol} {}
-@end deffn
-
-@deffn Command {show ipforward} {}
-Display whether the host's IP forwarding function is enabled or not.
-Almost any UNIX kernel can be configured with IP forwarding disabled.
-If so, the box can't work as a router.
-@end deffn
-
-@deffn Command {show ipv6forward} {}
-Display whether the host's IP v6 forwarding is enabled or not.
-@end deffn
-
-@deffn Command {show zebra} {}
-Display various statistics related to the installation and deletion
-of routes, neighbor updates, and LSP's into the kernel.
-@end deffn
-
-@deffn Command {show zebra fpm stats} {}
-Display statistics related to the zebra code that interacts with the
-optional Forwarding Plane Manager (FPM) component.
-@end deffn
-
-@deffn Command {clear zebra fpm stats} {}
-Reset statistics related to the zebra code that interacts with the
-optional Forwarding Plane Manager (FPM) component.
-@end deffn
diff --git a/doc/manpages/.gitignore b/doc/manpages/.gitignore
new file mode 100644 (file)
index 0000000..0505537
--- /dev/null
@@ -0,0 +1,3 @@
+/_templates
+/_build
+!/Makefile
diff --git a/doc/manpages/Makefile b/doc/manpages/Makefile
new file mode 100644 (file)
index 0000000..ebbbc31
--- /dev/null
@@ -0,0 +1,48 @@
+include ../frr-sphinx.mk
+
+# -----------------------------------------------------------------------------
+# Automake requires that 3rd-party Makefiles recognize these targets.
+# -----------------------------------------------------------------------------
+# install
+# install-data
+# install-exec
+# uninstall
+# install-dvi
+# install-html
+# install-info
+# install-ps
+# install-pdf
+# installdirs
+# check
+# installcheck
+# mostlyclean
+# clean
+# distclean
+# maintainer-clean
+# dvi
+# pdf
+# ps
+# info
+# html
+# tags
+# ctags
+
+# ignore these targets
+EMPTY_AUTOMAKE_TARGETS = dvi pdf ps tags ctags distdir installdirs check installcheck install-dvi install-ps install-html install-pdf install-info install-exec
+.PHONY: $(EMPTY_AUTOMAKE_TARGETS)
+$(EMPTY_AUTOMAKE_TARGETS):
+
+# These targets are automatically generated by Sphinx but conflict with
+# implicitly defined Automake rules, so we manually override them to nothing.
+# The other option is deleting the Sphinx-generated rules, which suppresses the
+# warning but kinda screws up the symmetry between Makefiles.
+info: ;
+html: ;
+
+all: man
+
+install-data: man
+
+install: install-data
+
+mostlyclean distclean maintainer-clean: clean
diff --git a/doc/manpages/bgpd.rst b/doc/manpages/bgpd.rst
new file mode 100644 (file)
index 0000000..94213db
--- /dev/null
@@ -0,0 +1,38 @@
+****
+BGPD
+****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: bgpd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/common-options.rst b/doc/manpages/common-options.rst
new file mode 100644 (file)
index 0000000..5b136f5
--- /dev/null
@@ -0,0 +1,165 @@
+HELP AND VERSION
+----------------
+
+.. option:: -h, --help
+
+   Print a short description of the daemon's command line options.
+
+.. option:: -v, --version
+
+   Print version and build information for the daemon.
+
+Both of these options inhibit normal operation and will immediately exit.
+
+PROCESS CONTROL
+---------------
+These options control background operation:
+
+.. option:: -d, --daemon
+
+   Launches the process in background/daemon mode, forking and detaching from the terminal.
+
+  The parent process will delay its exit until the daemon/child has finished its initialization and has entered its main loop. This is important for zebra startup because the other daemons will attempt to connect to zebra. A return from zebra -d guarantees its readiness to accept these connections.
+
+.. option:: -t, --terminal
+
+   Opens an interactive VTY session on the terminal, allowing for both state and configuration operations.  Note that the terminal starts operating after startup has completed and the configuration file has been loaded.
+
+   The process will exit when end of file is detected on the terminal.  It is possible to daemonize a process started with -t (but without -d) by sending SIGQUIT to the process (normally mapped to a ^\ keypress.)
+
+
+The combination of :option:`--daemon` and :option:`--terminal` will delay the daemon from going into background until the terminal session ends (by end of file.)
+
+If the process receives SIGINT (e.g. a ^C keypress) in this mode, it will exit instead of daemonizing.
+
+It is safe to suspend (SIGTSTP / ^Z) the terminal session opened by the previous two options;  this will only stop the terminal but not the protocol daemon itself (which runs in a separate second process.)
+
+CONFIGURATION AND PATHS
+-----------------------
+The following options control configuration and file system locations for frr processes:
+
+.. option:: -f, --config_file config-file
+
+   Specify a configuration file to be used instead of the default /etc/frr/<daemon>.conf file.
+
+   Note that the daemon will attempt to write to this file if the write file command is issued on its VTY interface or through vtysh.
+
+.. option:: -C, --dryrun
+
+   Load the configuration file and check its validity, then exit.
+
+.. option:: -i, --pid_file pid-file
+
+   Output a pid file to a location other than the default /var/run/frr/<daemon>.pid.
+
+.. option:: -z, --socket zclient-path
+
+   Override the path of the ZAPI socket used to communicate between zebra and the various protocol daemons. The default is /var/run/frr/zserv.api.  The value of this option must be the same across all daemons.
+
+.. option:: -N, --pathspace pathspace
+
+   Insert pathspace into all default paths, changing the defaults to:
+
+   /etc/frr/pathspace/<daemon>.conf
+   /var/run/frr/pathspace/<daemon>.pid
+   /var/run/frr/pathspace/<daemon>.vty
+   /var/run/frr/pathspace/zserv.api
+
+   ´.´ and ´/´ characters will not be accepted in pathspace, but the empty string will be accepted.
+
+   Note that this only changes the respective defaults, it has no effect on the respective path if the -f, -i, -z or --vty_socket options are used.
+
+   The purpose of this option is to easily group all file system related bits together for running multiple fully-separate "logical routers" on a system, particularly with Linux network namespaces.  Groups of daemons running with distinct pathspace values will be completely unaware of each other and not interact in any way.
+
+   This option does not do any system setup (like network namespaces.) This must be done by the user, for example by running:
+
+   ip netns exec namespace <daemon> -N namespace
+
+
+PROCESS CREDENTIALS
+-------------------
+.. option:: -u, --user user
+
+   (default: frr)
+
+.. option:: -g, --group group
+
+   (default: frr)
+
+   Change the user/group which the daemon will switch to.
+
+.. option:: -S, --skip_runas
+
+   Skip setting the process effective user and group.
+
+
+Note that there is an additional group, frrvty, which controls group ownership of the VTY sockets.  The name of this group cannot currently be changed, and user must be a member of this group.
+
+
+VTY SETUP
+---------
+These following options control the daemon's VTY (interactive command line) interface.  The interface is available over TCP, using the telnet protocol, as well as through the vtysh frontend.
+
+.. option:: -A, --vty_addr vty-addr
+
+   Specify an IP/IPv6 address to bind the TCP VTY interface to.  It is generally recommended to specify ::1 or 127.0.0.1.  For reasons of backwards compatibility, the default is to listen on all interfaces.
+
+.. option:: -P, --vty_port vty-port
+
+   Override the daemon's default TCP VTY port (each daemon has a different default value upwards of 2600, listed below.)  Specifying 0 disables the TCP VTY interface.
+
+   Default ports are:::
+
+      zebra           2601
+      ripd            2602
+      ripngd          2603
+      ospfd           2604
+      bgpd            2605
+      ospf6d          2606
+      isisd           2608
+      babeld          2609
+      nhrpd           2610
+      pimd            2611
+      ldpd            2612
+      eigrpd          2613
+
+   Port 2607 is used for ospfd's Opaque LSA API, while port 2600 is used for the (insecure) TCP-ZEBRA interface.
+
+.. option:: --vty_socket vty-path
+
+   Overrides the directory used for the <daemon>.vty sockets.  vtysh connects to these sockets in order to access each daemon's VTY.
+   Default: /var/run/frr[/<pathspace>]
+
+   NB: Unlike the other options, this option specifies a directory, not a full path.
+
+   This option is primarily used by the SNAP packaging system, its semantics may change.  It should not be neccessary in most other scenarios.
+
+MODULE LOADING
+--------------
+frr supports optional dynamically loadable modules, although these can only be loaded at startup.  The set of available modules may vary across distributions and packages, and modules may be available for installation as separate packages.
+
+.. option:: -M, --module module[:options]
+
+   Load a module named module, optionally passing options to it.
+
+   If there is a ´/´ character in module, the value is assumed to be a pathname to a module.
+
+   If there is no ´/´ character, the module directory (see next option) is searched first for a module named "<daemon>_<module>.so", then for "<module>.so".  This allows for a module to exist in variations appropriate for particular daemons, e.g. zebra_snmp and bgp_snmp, with the correct one selected by -M snmp.
+
+   The meaning of options is specific to the module being loaded.  Most modules currently ignore it.
+
+   Modules are loaded in the order as listed on the command line.  This is not generally relevant.
+
+.. option:: --moduledir module-path
+
+   Look for modules in the module-path directory instead of the default /usr/lib/frr/modules.  (This path is not affected by the -N option.)
+
+The list of loaded modules can be inspected at runtime with the show modules VTY command.
+
+ROUTES
+------
+
+.. option:: -r, --retain
+
+   When the program terminates, retain routes added by the daemon.
+
diff --git a/doc/manpages/conf.py b/doc/manpages/conf.py
new file mode 100644 (file)
index 0000000..a78e1a2
--- /dev/null
@@ -0,0 +1,348 @@
+# -*- coding: utf-8 -*-
+#
+# FRR documentation build configuration file, created by
+# sphinx-quickstart on Tue Jan 31 16:00:52 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import re
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+needs_sphinx = '1.0'
+
+# prolog for various variable substitutions
+rst_prolog = ''
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = ['sphinx.ext.todo']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+# source_suffix = ['.rst']
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'FRR'
+copyright = u'2017, FRR'
+author = u'Kunihiro Ishiguro, et al.'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+
+# The short X.Y version.
+version = u'?.?'
+# The full version, including alpha/beta/rc tags.
+release = u'?.?-?'
+
+
+# -----------------------------------------------------------------------------
+# Extract values from codebase for substitution into docs.
+# -----------------------------------------------------------------------------
+
+# Various installation prefixes. Reasonable defaults are set where possible.
+# Values are overridden by logic below.
+replace_vars = {
+    'AUTHORS': author,
+    'COPYRIGHT_YEAR': '1999-2005',
+    'COPYRIGHT_STR': None,
+    'PACKAGE_NAME': project.lower(),
+    'PACKAGE_TARNAME': project.lower(),
+    'PACKAGE_STRING': None,
+    'PACKAGE_URL': 'https://frrouting.org/',
+    'PACKAGE_VERSION': None,
+    'INSTALL_PREFIX_ETC': None,
+    'INSTALL_PREFIX_SBIN': None,
+    'INSTALL_PREFIX_STATE': None,
+    'INSTALL_PREFIX_MODULES': None,
+    'INSTALL_USER': None,
+    'INSTALL_GROUP': None,
+    'INSTALL_VTY_GROUP': None,
+    'GROUP': 'frr',
+    'USER': 'frr',
+}
+
+# extract version information, installation location, other stuff we need to
+# use when building final documents
+val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+with open('../../config.status', 'r') as cfgstatus:
+    for ln in cfgstatus.readlines():
+        m = val.match(ln)
+        if not m or m.group(1) not in replace_vars.keys(): continue
+        replace_vars[m.group(1)] = m.group(2)
+
+# manually fill out some of these we can't get from config.status
+replace_vars['COPYRIGHT_STR'] = "Copyright (c)"
+replace_vars['COPYRIGHT_STR'] += ' {0}'.format(replace_vars['COPYRIGHT_YEAR'])
+replace_vars['COPYRIGHT_STR'] += ' {0}'.format(replace_vars['AUTHORS'])
+release = replace_vars['PACKAGE_VERSION']
+version = release.split('-')[0]
+
+# add substitutions to prolog
+for key, value in replace_vars.items():
+    rst_prolog += '.. |{0}| replace:: {1}\n'.format(key, value)
+
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build', 'common-options.rst', 'epilogue.rst', 'defines.rst']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = True
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
+#html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# Now only 'ja' uses this config value
+#html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'FRRdoc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+
+# Latex figure (float) alignment
+#'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (master_doc, 'FRR.tex', u'FRR User Manual',
+     u'FRR', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+fwfrr = "{0} routing engine for use with FRRouting."
+
+man_pages = [
+    ('bgpd', 'bgpd', fwfrr.format("a BGPv4, BGPv4+, BGPv4- "), [], 8),
+    ('eigrpd', 'eigrpd', fwfrr.format("an EIGRP "), [], 8),
+    ('ospf6d', 'ospf6d', fwfrr.format("an OSPFv3 "), [], 8),
+    ('ospfd', 'ospfd', fwfrr.format("an OSPFv2 "), [], 8),
+    ('isisd', 'isisd', fwfrr.format("an IS-IS "), [], 8),
+    ('ospfclient', 'ospfclient', 'an example ospf-api client', [], 8),
+    ('ldpd', 'ldpd', fwfrr.format("an LDP "), [], 8),
+    ('nhrpd', 'nhrpd', fwfrr.format("a Next Hop Routing Protocol "), [], 8),
+    ('pimd', 'pimd', fwfrr.format("a PIM "), [], 8),
+    ('mtracebis', 'mtracebis', "a multicast trace client", [], 8),
+    ('ripd', 'ripd', fwfrr.format("a RIP "), [], 8),
+    ('ripngd', 'ripngd', fwfrr.format("a RIPNG "), [], 8),
+    ('zebra', 'zebra', 'a routing manager for use with associated FRRouting components.', [], 8),
+    ('watchfrr', 'watchfrr', 'a program to monitor the status of FRRouting daemons', [], 8),
+    ('vtysh', 'vtysh', 'an integrated shell for FRRouting.', [], 1),
+    ('frr', 'frr', 'a systemd interaction script', [], 1),
+]
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+# custom extensions here
diff --git a/doc/manpages/defines.rst b/doc/manpages/defines.rst
new file mode 100644 (file)
index 0000000..841abe3
--- /dev/null
@@ -0,0 +1,3 @@
+.. |synopsis-options| replace:: [-d|-t|-dt] [-C] [-f config-file] [-i pid-file] [-z zclient-path] [-u user] [-g group] [-A vty-addr] [-P vty-port] [-M module[:options]] [-N pathspace] [--vty_socket vty-path] [--moduledir module-path]
+.. |synopsis-options-hv| replace:: [-h] [-v]
+.. |seealso-programs| replace:: zebra(8), vtysh(1), ripd(8), ripngd(8), ospfd(8), ospf6d(8), bgpd(8), isisd(8), babeld(8), nhrpd(8), pimd(8), ldpd(8), eigrpd(8), mtracebis(8)
diff --git a/doc/manpages/eigrpd.rst b/doc/manpages/eigrpd.rst
new file mode 100644 (file)
index 0000000..bc82446
--- /dev/null
@@ -0,0 +1,38 @@
+******
+EIGRPD
+******
+
+.. include:: defines.rst
+.. |DAEMON| replace:: eigrpd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/epilogue.rst b/doc/manpages/epilogue.rst
new file mode 100644 (file)
index 0000000..77fed81
--- /dev/null
@@ -0,0 +1,16 @@
+WARNING
+=======
+This man page is intended to be a quick reference for command line options. The definitive document is the info file |PACKAGE_STRING| or the documentation available on the project website at |PACKAGE_URL|.
+
+DIAGNOSTICS
+===========
+The daemon may log to standard output, to a VTY, to a log file, or through syslog to the system logs. FRR supports many debugging options, see the Info file, web docs or source for details.
+
+SEE ALSO
+========
+|seealso-programs|
+|PACKAGE_URL|
+
+BUGS
+====
+FRR eats bugs for breakfast. If you have food for the maintainers, please email <dev@lists.frrouting.org>.
diff --git a/doc/manpages/frr.rst b/doc/manpages/frr.rst
new file mode 100644 (file)
index 0000000..3d3479a
--- /dev/null
@@ -0,0 +1,44 @@
+***
+FRR
+***
+
+.. include:: defines.rst
+
+SYNOPSIS
+========
+frr [ start ]
+
+frr [ stop ]
+
+frr [ reload ]
+
+frr [ restart ]
+
+frr [ status ]
+
+
+DESCRIPTION
+===========
+frr is a systemd interaction script for the FRRouting routing engine.
+
+OPTIONS
+=======
+Options available for the frr command:
+
+start
+   Start enabled FRR daemons
+
+stop
+   Stop enabled FRR daemons
+
+reload
+   Reload modified configuration files
+
+restart
+   Stop all running daemons and then restart them
+
+status
+   Status of all the daemon
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/index.rst b/doc/manpages/index.rst
new file mode 100644 (file)
index 0000000..ae5c4ca
--- /dev/null
@@ -0,0 +1,27 @@
+.. FRR documentation master file, created by
+   sphinx-quickstart on Wed Jan 31 12:00:55 2018.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to FRR's documentation!
+===============================
+
+.. toctree::
+   :maxdepth: 2
+
+   bgpd
+   eigrpd
+   isisd
+   ldpd
+   nhrpd
+   ospf6d
+   ospfclient
+   ospfd
+   pimd
+   mtracebis
+   ripd
+   ripngd
+   watchfrr
+   zebra
+   vtysh
+   frr
diff --git a/doc/manpages/isisd.rst b/doc/manpages/isisd.rst
new file mode 100644 (file)
index 0000000..68761f6
--- /dev/null
@@ -0,0 +1,38 @@
+*****
+ISISD
+*****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: isisd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/ldpd.rst b/doc/manpages/ldpd.rst
new file mode 100644 (file)
index 0000000..113f066
--- /dev/null
@@ -0,0 +1,38 @@
+****
+LDPD
+****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: ldpd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/mtracebis.rst b/doc/manpages/mtracebis.rst
new file mode 100644 (file)
index 0000000..b4d57c1
--- /dev/null
@@ -0,0 +1,39 @@
+*********
+MTRACEBIS
+*********
+
+.. include:: defines.rst
+.. |PROGRAM| replace:: mtracebis
+
+SYNOPSIS
+========
+|PROGRAM| |synopsis-options-hv|
+
+|PROGRAM| <multicast source>
+
+DESCRIPTION
+===========
+|PROGRAM| is a program to initiate multicast traceroute, or "mtrace", queries.
+
+The initial version of the program requires multicast source IP address and
+initiates a weak traceroute across the network. This tests whether the
+interfaces towards the source are multicast enabled. The first query sent is a
+full query, capable of crossing the network all the way to the source. If this
+fails, hop-by-hop queries are initiated.
+
+Hop-by-hop queries start by requesting only a response from the nearest router.
+Following that, next query is extended to the next two routers, and so on...
+until a set of routers is tested for connectivity.
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|PROGRAM|
+   The default location of the |PROGRAM| binary.
+
+.. include:: epilogue.rst
+
+AUTHORS
+=======
+
+Mladen Sablic
diff --git a/doc/manpages/nhrpd.rst b/doc/manpages/nhrpd.rst
new file mode 100644 (file)
index 0000000..cae01c6
--- /dev/null
@@ -0,0 +1,38 @@
+*****
+NHRPD
+*****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: nhrpd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/ospf6d.rst b/doc/manpages/ospf6d.rst
new file mode 100644 (file)
index 0000000..cfc6860
--- /dev/null
@@ -0,0 +1,39 @@
+******
+OSPF6D
+******
+
+.. include:: defines.rst
+.. |DAEMON| replace:: ospf6d
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/ospfclient.rst b/doc/manpages/ospfclient.rst
new file mode 100644 (file)
index 0000000..c52b108
--- /dev/null
@@ -0,0 +1,43 @@
+**********
+OSPFCLIENT
+**********
+
+.. include:: defines.rst
+
+SYNOPSIS
+========
+ospfclient <ospfd> <lsatype> <opaquetype> <opaqueid> <ifaddr> <areaid>
+
+DESCRIPTION
+===========
+ospfclient is an example ospf-api client to test the ospfd daemon.
+
+OPTIONS
+=======
+
+.. option:: ospfd
+
+   A router where the API-enabled OSPF daemon is running.
+
+.. option:: lsatype
+
+   The value has to be either "9", "10", or "11", depending on the flooding scope.
+
+.. option:: opaquetype
+
+   The value has to be in the range of 0-255 (for example, experimental applications might use opaquetype larger than 128).
+
+.. option:: opaqueid
+
+   Arbitrary application instance (24 bits).
+
+.. option:: ifaddr
+
+   Interface IP address for type 9, otherwise it will be ignored.
+
+.. option:: areaid
+
+   Area in the IP address format for type 10, otherwise it will be ignored.
+
+
+.. include:: epilogue.rst
diff --git a/doc/manpages/ospfd.rst b/doc/manpages/ospfd.rst
new file mode 100644 (file)
index 0000000..6e4d093
--- /dev/null
@@ -0,0 +1,39 @@
+*****
+OSPFD
+*****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: ospfd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/pimd.rst b/doc/manpages/pimd.rst
new file mode 100644 (file)
index 0000000..d758266
--- /dev/null
@@ -0,0 +1,38 @@
+****
+PIMD
+****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: pimd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/ripd.rst b/doc/manpages/ripd.rst
new file mode 100644 (file)
index 0000000..af4590c
--- /dev/null
@@ -0,0 +1,38 @@
+****
+RIPD
+****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: ripd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/ripngd.rst b/doc/manpages/ripngd.rst
new file mode 100644 (file)
index 0000000..aedd689
--- /dev/null
@@ -0,0 +1,38 @@
+******
+RIPNGD
+******
+
+.. include:: defines.rst
+.. |DAEMON| replace:: ripngd
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing component that works with the FRRouting routing engine.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/vtysh.rst b/doc/manpages/vtysh.rst
new file mode 100644 (file)
index 0000000..2db7460
--- /dev/null
@@ -0,0 +1,84 @@
+*****
+VTYSH
+*****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: vtysh
+
+SYNOPSIS
+========
+vtysh [ -b ]
+
+vtysh [ -E ] [ -d *daemon* ] [ -c *command* ]
+
+DESCRIPTION
+===========
+vtysh is an integrated shell for the FRRouting suite of protocol daemons.
+
+OPTIONS
+=======
+OPTIONS available for the vtysh command:
+
+.. option:: -b, --boot
+
+   Execute boot startup configuration. It makes sense only if integrated config file is in use (not default in FRRouting). See Info file frr for more info.
+
+.. option:: -c, --command command
+
+   Specify command to be executed under batch mode. It behaves like -c option in any other shell - command is executed and vtysh exits.
+
+   It's useful for gathering info from FRRouting daemons or reconfiguring daemons from inside shell scripts, etc. Note that multiple commands may be executed by using more than one -c option and/or embedding linefeed characters inside the command string.
+
+.. option:: -d, --daemon daemon_name
+
+   Specify which daemon to connect to. By default, vtysh attempts to connect to all FRRouting daemons running on the system. With this flag, one can specify a single daemon to connect to instead. For example, specifying '-d ospfd' will connect only to ospfd. This can be particularly useful inside scripts with -c where the command is targeted for a single daemon.
+
+.. option:: -e, --execute command
+
+   Alias for -c. It's here only for compatibility with Zebra routing software and older FRR versions. This will be removed in future.
+
+.. option:: -E, --echo
+
+   When the -c option is being used, this flag will cause the standard vtysh prompt and command to be echoed prior to displaying the results. This is particularly useful to separate the results when executing multiple commands.
+
+.. option:: -C, --dryrun
+
+   When the -C option is being used, this flag will check the config for syntatic validity.
+
+.. option:: -m, --markfile
+
+   Mark the input file with context ends, useful for cleanup of a config file that has a lot of extraneous space and end markers
+
+.. option:: -n, --noerror
+
+   When executing cli that does not invoke a vtysh shell, if an error ocurrs ignore it for purposes of return codes from vtysh.
+
+.. option:: -h, --help
+
+   Display a usage message on standard output and exit.
+
+ENVIRONMENT VARIABLES
+=====================
+VTYSH_PAGER
+   This should be the name of the pager to use. Default is more.
+
+FILES
+=====
+|INSTALL_PREFIX_SBIN|/vtysh
+   The default location of the vtysh binary.
+
+|INSTALL_PREFIX_ETC|/vtysh.conf
+   The default location of the vtysh config file.
+
+|INSTALL_PREFIX_ETC|/frr.conf
+   The default location of the integrated FRRouting routing engine config file if integrated config file is in use.
+
+${HOME}/.history_frr
+   Location of history of commands entered via cli
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/watchfrr.rst b/doc/manpages/watchfrr.rst
new file mode 100644 (file)
index 0000000..f0b7332
--- /dev/null
@@ -0,0 +1,119 @@
+********
+WATCHFRR
+********
+
+.. include:: defines.rst
+.. |DAEMON| replace:: watchfrr
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| [option...] <daemon>...
+
+
+DESCRIPTION
+===========
+|DAEMON| is a watchdog program that monitors the status of supplied frr daemons and tries to restart them in case they become unresponsive or shut down.
+
+To determine whether a daemon is running, it tries to connect to the daemon's VTY UNIX stream socket, and send echo commands to ensure the daemon responds. When the daemon crashes, EOF is received from the socket, so that |DAEMON| can react immediately.
+
+In order to avoid restarting the daemons in quick succession, you can supply the -m and -M options to set the minimum and maximum delay between the restart commands. The minimum restart delay is recalculated each time a restart is attempted.  If the time since the last restart attempt exceeds twice the value of -M, the restart delay is set to the value of -m, otherwise the interval is doubled (but capped at the value of -M).
+
+OPTIONS
+=======
+The following 3 options specify scripts that |DAEMON| uses to perform start/stop/restart actions. These options are mandatory unless the --dry option is used:
+
+.. option:: -s command, --start-command command
+
+  Supply a Bourne shell command to start a single daemon. The command string should contain the '%s' placeholder to be sub‐ stituted with the daemon name.
+
+.. option:: -k command, --kill-command command
+
+   Supply a Bourne shell command to stop a single daemon. The command string should contain the '%s' placeholder to be substituted with the daemon name.
+
+.. option:: -r command, --restart command
+
+   Supply a Bourne shell command to restart a single daemon. The command string should contain the '%s' placeholder to be substituted with the daemon name.
+
+Other options:
+
+.. option:: --dry
+
+   Run |DAEMON| in "dry-run" mode, only monitoring the specified daemons but not performing any start/stop/restart actions.
+
+.. option:: -d, --daemon
+
+   Run in daemon mode. When supplied, error messages are sent to Syslog instead of standard output (stdout).
+
+.. option:: -S <directory>, --statedir <directory>
+
+   Set the VTY socket directory (the default value is "/var/run/frr").
+
+.. option:: -l <level>, --loglevel <level>
+
+   Set the logging level (the default value is "6"). The value should range from 0 (LOG_EMERG) to 7 (LOG_DEBUG), but higher number can be supplied if extra debugging messages are required.
+
+.. option:: --min-restart-interval <number>
+
+   Set the minimum number of seconds to wait between invocations of the daemon restart commands (the default value is "60").
+
+.. option:: --max-restart-interval <number>
+
+   Set the maximum number of seconds to wait between invocations of the daemon restart commands (the default value is "600").
+
+.. option:: -i <number>, --interval <number>
+
+   Set the status polling interval in seconds (the default value is "5").
+
+.. option:: -t <number>, --timeout <number>
+
+   Set the unresponsiveness timeout in seconds (the default value is "10").
+
+.. option:: -T <number>, --restart-timeout <number>
+
+   Set the restart (kill) timeout in seconds (the default value is "20"). If any background jobs are still running after this period has elapsed, they will be killed.
+
+.. option:: -p <filename>, --pid-file <filename>
+
+   Set the process identifier filename (the default value is "/var/run/frr/|DAEMON|.pid").
+
+.. option:: -b <string>, --blank-string <string>
+
+   When the supplied string is found in any of the command line option arguments (i.e., -r, -s, or -k), replace it with a space.
+
+   This is an ugly hack to circumvent problems with passing the command line arguments containing embedded spaces.
+
+.. option:: -v, --version
+
+   Display the version information and exit.
+
+.. option:: -h, --help
+
+   Display the usage information and exit.
+
+PREVIOUS OPTIONS
+================
+Prior versions of |DAEMON| supported some additional options that no longer exist:::
+
+   -a, -A, -e, -R, -z
+
+The ``-a``, ``-A`` and ``-R`` options were used to select alternate monitoring modes that offered different patterns of restarting daemons. The "correct" mode (phased restart) is now the default. The -e and -z options used to disable some monitoring aspects, |DAEMON| now always has all monitoring features enabled.
+
+Removing these options should result in correct operation, if it does not please file a bug report.
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/manpages/zebra.rst b/doc/manpages/zebra.rst
new file mode 100644 (file)
index 0000000..4ddf989
--- /dev/null
@@ -0,0 +1,59 @@
+*****
+ZEBRA
+*****
+
+.. include:: defines.rst
+.. |DAEMON| replace:: zebra
+
+SYNOPSIS
+========
+|DAEMON| |synopsis-options-hv|
+
+|DAEMON| |synopsis-options|
+
+DESCRIPTION
+===========
+|DAEMON| is a routing manager that implements the zebra route engine. zebra supports all protocol daemons in the FRRouting suite.
+
+OPTIONS
+=======
+OPTIONS available for the |DAEMON| command:
+
+.. include:: common-options.rst
+
+.. option:: -b, --batch
+
+   Runs in batch mode, zebra parses its config and exits.
+
+.. option:: -k, --keep_kernel
+
+   On startup, don't delete self inserted routes.
+
+.. option:: -s, --nl-bufsize <netlink-buffer-size>
+
+   Set netlink receive buffer size. There are cases where zebra daemon can't handle flood of netlink messages from kernel. If you ever see "recvmsg overrun" messages in zebra log, you are in trouble.
+
+   Solution is to increase receive buffer of netlink socket. Note that kernel < 2.6.14 doesn't allow to increase it over maximum value defined in /proc/sys/net/core/rmem_max. If you want to do it, you have to increase maximum before starting zebra.
+
+   Note that this affects Linux only.
+
+
+.. option:: -n, --vrfwnetns
+
+   Enable namespace VRF backend. By default, the VRF backend relies on VRF-lite support from the Linux kernel. This option permits discovering Linux named network namespaces and mapping it to FRR VRF contexts.
+
+FILES
+=====
+
+|INSTALL_PREFIX_SBIN|/|DAEMON|
+   The default location of the |DAEMON| binary.
+
+|INSTALL_PREFIX_ETC|/|DAEMON|.conf
+   The default location of the |DAEMON| config file.
+
+$(PWD)/|DAEMON|.log
+   If the |DAEMON| process is configured to output logs to a file, then you
+   will find this file in the directory where you started |DAEMON|.
+
+.. include:: epilogue.rst
+
diff --git a/doc/mtracebis.8.in b/doc/mtracebis.8.in
deleted file mode 100644 (file)
index 3abc717..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-.\" This file was originally generated by help2man 1.44.1.
-.TH MTRACEBIS "8" "February 2018" "mtracebis 0.1" "System Administration Utilities"
-.SH NAME
-mtracebis \- a program to initiate multicast traceroute "mtrace" queries
-.SH SYNOPSIS
-mtracebis
-<multicast source>
-.SH DESCRIPTION
-.B mtracebis
-is a program used to test multicast connectivity in a multicast and multicast
-traceroute enabled IP network.
-.PP
-Initial version of the program requires multicast source IP address and
-initiates a weak traceroute across the network. This tests whether the
-interfaces towards the source are multicast enabled. First query sent is a
-full query, capable of crossing the network all the way to the source. If this
-fails, hop-by-hop queries are initiated.
-.PP
-Hop-by-hop queries start by requesting only a response from the nearest router.
-Following that, next query is extended to the next two routers, and so on...
-until a set of routers is tested for connectivity.
-.SH SEE ALSO
-See the project homepage at <@PACKAGE_URL@>.
-.SH AUTHORS
-Copyright 2018 Mladen Sablic
diff --git a/doc/next-hop-tracking.txt b/doc/next-hop-tracking.txt
deleted file mode 100644 (file)
index 12ed639..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-0. Introduction
-
-This is the design specification for next hop tracking feature in
-Frr.
-
-1. Background
-
-Recursive routes are of the form:
-
-   p/m --> n
-  [Ex: 1.1.0.0/16 --> 2.2.2.2]
-
-where 'n' itself is resolved through another route as follows:
-
-   p2/m --> h, interface
-  [Ex: 2.2.2.0/24 --> 3.3.3.3, eth0]
-
-Usually, BGP routes are recursive in nature and BGP nexthops get
-resolved through an IGP route. IGP usually adds its routes pointing to
-an interface (these are called non-recursive routes).
-
-When BGP receives a recursive route from a peer, it needs to validate
-the nexthop. The path is marked valid or invalid based on the
-reachability status of the nexthop.  Nexthop validation is also
-important for BGP decision process as the metric to reach the nexthop
-is a parameter to best path selection process.
-
-As it goes with routing, this is a dynamic process. Route to the
-nexthop can change. The nexthop can become unreachable or
-reachable. In the current BGP implementation, the nexthop validation
-is done periodically in the scanner run. The default scanner run
-interval is one minute. Every minute, the scanner task walks the
-entire BGP table. It checks the validity of each nexthop with Zebra
-(the routing table manager) through a request and response message
-exchange between BGP and Zebra process. BGP process is blocked for
-that duration. The mechanism has two major drawbacks:
-
-(1) The scanner task runs to completion. That can potentially starve
-    the other tasks for long periods of time, based on the BGP table
-    size and number of nexthops.
-
-(2) Convergence around routing changes that affect the nexthops can be
-    long (around a minute with the default intervals). The interval
-    can be shortened to achieve faster reaction time, but it makes the
-    first problem worse, with the scanner task consuming most of the
-    CPU resources.
-
-"Next hop tracking" feature makes this process event-driven. It
-eliminates periodic nexthop validation and introduces an asynchronous
-communication path between BGP and Zebra for route change notifications
-that can then be acted upon.
-
-2. Goal
-
-Stating the obvious, the main goal is to remove the two limitations we
-discussed in the previous section. The goals, in a constructive tone,
-are the following:
-
-- fairness: the scanner run should not consume an unjustly high amount
-  of CPU time. This should give an overall good performance and
-  response time to other events (route changes, session events,
-  IO/user interface).
-
-- convergence: BGP must react to nexthop changes instantly and provide
-  sub-second convergence. This may involve diverting the routes from
-  one nexthop to another.
-
-3. Overview of the changes
-
-The changes are in both BGP and Zebra modules.  The short summary is
-the following:
-
-- Zebra implements a registration mechanism by which clients can
-   register for next hop notification. Consequently, it maintains a
-   separate table, per (VRF, AF) pair, of next hops and interested
-   client-list per next hop.
-
-- When the main routing table changes in Zebra, it evaluates the next
-   hop table: for each next hop, it checks if the route table
-   modifications have changed its state. If so, it notifies the
-   interested clients.
-
-- BGP is one such client. It registers the next hops corresponding to
-   all of its received routes/paths. It also threads the paths against
-   each nexthop structure.
-
-- When BGP receives a next hop notification from Zebra, it walks the
-   corresponding path list. It makes them valid or invalid depending
-   on the next hop notification. It then re-computes best path for the
-   corresponding destination. This may result in re-announcing those
-   destinations to peers.
-
-4. Design
-
-4.1. Modules
-
-The core design introduces an "nht" (next hop tracking) module in BGP
-and "rnh" (recursive nexthop) module in Zebra. The "nht" module
-provides the following APIs:
-
-bgp_find_or_add_nexthop() : find or add a nexthop in BGP nexthop table
-bgp_find_nexthop() : find a nexthop in BGP nexthop table
-bgp_parse_nexthop_update() : parse a nexthop update message coming
-                              from zebra
-
-The "rnh" module provides the following APIs:
-
-zebra_add_rnh() : add a recursive nexthop
-zebra_delete_rnh() : delete a recursive nexthop
-zebra_lookup_rnh() : lookup a recursive nexthop
-
-zebra_add_rnh_client() : register a client for nexthop notifications
-                         against a recursive nexthop
-
-zebra_remove_rnh_client(): remove the client registration for a
-                            recursive nexthop
-
-zebra_evaluate_rnh_table(): (re)evaluate the recursive nexthop table
-                            (most probably because the main routing
-                            table has changed).
-
-zebra_cleanup_rnh_client(): Cleanup a client from the "rnh" module
-                            data structures (most probably because the
-                            client is going away).
-
-4.2. Control flow
-
-The next hop registration control flow is the following:
-
-<====      BGP Process       ====>|<====      Zebra Process      ====>
-                                  |
-receive module     nht module     |  zserv module        rnh module
-----------------------------------------------------------------------
-              |                   |                  |
-bgp_update_   |                   |                  |
-      main()  | bgp_find_or_add_  |                  |
-              |        nexthop()  |                  |
-              |                   |                  |
-              |                   | zserv_nexthop_   |
-              |                   |       register() |
-              |                   |                  | zebra_add_rnh()
-              |                   |                  |
-
-
-The next hop notification control flow is the following:
-
-<====     Zebra Process    ====>|<====      BGP Process       ====>
-                                |
-rib module         rnh module   |     zebra module        nht module
-----------------------------------------------------------------------
-              |                 |                   |
-meta_queue_   |                 |                   |
-    process() | zebra_evaluate_ |                   |
-              |     rnh_table() |                   |
-              |                 |                   |
-              |                 | bgp_read_nexthop_ |
-              |                 |          update() |
-              |                 |                   | bgp_parse_
-              |                 |                   | nexthop_update()
-              |                 |                   |
-
-
-4.3. zclient message format
-
-ZEBRA_NEXTHOP_REGISTER and ZEBRA_NEXTHOP_UNREGISTER messages are
-encoded in the following way:
-
-/*
- *     0                   1                   2                   3
- *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |     AF                        |  prefix len   |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * .      Nexthop prefix                                           .
- * .                                                               .
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * .                                                               .
- * .                                                               .
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |     AF                        |  prefix len   |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * .      Nexthop prefix                                           .
- * .                                                               .
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
-
-ZEBRA_NEXTHOP_UPDATE message is encoded as follows:
-
-/*
- *     0                   1                   2                   3
- *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |     AF                        |  prefix len   |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * .      Nexthop prefix getting resolved                          .
- * .                                                               .
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |        metric                                                 |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |  #nexthops    |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | nexthop type  |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * .      resolving Nexthop details                                .
- * .                                                               .
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * .                                                               .
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | nexthop type  |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * .      resolving Nexthop details                                .
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
-
-4.4. BGP data structure
-
-Legend:
-
-/\   struct bgp_node: a BGP destination/route/prefix
-\/
-
-[ ]  struct bgp_info: a BGP path (e.g. route received from a peer)
-
- _
-(_)  struct bgp_nexthop_cache: a BGP nexthop
-
-
-
-   /\         NULL
-   \/--+        ^
-       |        :
-       +--[ ]--[ ]--[ ]--> NULL
-   /\           :
-   \/--+        :
-       |        :
-       +--[ ]--[ ]--> NULL
-                :
-  _             :
- (_).............
-
-
-4.5. Zebra data structure
-
-rnh table:
-
-           O
-          / \
-         O   O
-            / \
-           O   O
-
-        struct rnh
-        {
-          u_char flags;
-          struct route_entry *state;
-          struct list *client_list;
-          struct route_node *node;
-        };
-
-5. User interface changes
-
-frr# show ip nht
-3.3.3.3
- resolved via kernel
- via 11.0.0.6, swp1
- Client list: bgp(fd 12)
-11.0.0.10
- resolved via connected
- is directly connected, swp2
- Client list: bgp(fd 12)
-11.0.0.18
- resolved via connected
- is directly connected, swp4
- Client list: bgp(fd 12)
-11.11.11.11
- resolved via kernel
- via 10.0.1.2, eth0
- Client list: bgp(fd 12)
-
-frr# show ip bgp nexthop
-Current BGP nexthop cache:
- 3.3.3.3 valid [IGP metric 0], #paths 3
-  Last update: Wed Oct 16 04:43:49 2013
-
- 11.0.0.10 valid [IGP metric 1], #paths 1
-  Last update: Wed Oct 16 04:43:51 2013
-
- 11.0.0.18 valid [IGP metric 1], #paths 2
-  Last update: Wed Oct 16 04:43:47 2013
-
- 11.11.11.11 valid [IGP metric 0], #paths 1
-  Last update: Wed Oct 16 04:43:47 2013
-
-frr# show ipv6 nht
-frr# show ip bgp nexthop detail
-
-frr# debug bgp nht
-frr# debug zebra nht
-
-6. Sample test cases
-
-     r2----r3
-    /  \  /
-  r1----r4
-
-- Verify that a change in IGP cost triggers NHT
-  + shutdown the r1-r4 and r2-r4 links
-  + no shut the r1-r4 and r2-r4 links and wait for OSPF to come back
-    up
-  + We should be back to the original nexthop via r4 now
-- Verify that a NH becoming unreachable triggers NHT
-  + Shutdown all links to r4
-- Verify that a NH becoming reachable triggers NHT
-  + no shut all links to r4
-
-7. Future work
-
-- route-policy for next hop validation (e.g. ignore default route)
-- damping for rapid next hop changes
-- prioritized handling of nexthop changes ((un)reachability vs. metric
-  changes)
-- handling recursion loop, e.g.
-   11.11.11.11/32 -> 12.12.12.12
-   12.12.12.12/32 -> 11.11.11.11
-   11.0.0.0/8 -> <interface>
-- better statistics
diff --git a/doc/nhrpd.8.in b/doc/nhrpd.8.in
deleted file mode 100644 (file)
index 09b662a..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-.TH NHRP 8 "24 January 2017" "@PACKAGE_FULLNAME@ NHRP daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-nhrpd \- a Next Hop Routing Protocol routing engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B nhrpd
-[
-.B \-dhv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B nhrpd
-is a routing component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B nhrpd
-command:
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR
-Specifies the config file to use for startup. If not specified this
-option will likely default to \fB\fI@CFG_SYSCONF@/nhrpd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When nhrpd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart nhrpd.  The likely default is \fB\fI@CFG_STATE@/nhrpd.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR
-Specify the port that the nhrpd VTY will listen on. This defaults to
-2610, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the nhrpd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-There are currently no such modules for
-\fBnhrpd\fR in the base package.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/nhrpd
-The default location of the
-.B nhrpd
-binary.
-.TP
-.BI @CFG_SYSCONF@/nhrpd.conf
-The default location of the
-.B nhrpd
-config file.
-.TP
-.BI $(PWD)/nhrpd.log
-If the
-.B nhrpd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBnhrpd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The nhrpd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBnhrpd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR zebra (8),
-.BR vtysh (1)
-
-.B nhrpd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-Timo Teräs <timo.teras@iki.fi>
diff --git a/doc/nhrpd.texi b/doc/nhrpd.texi
deleted file mode 100644 (file)
index 069b464..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-@cindex NHRP
-@node NHRP
-@chapter NHRP
-
-@command{nhrpd} is a daemon to support Next Hop Routing Protocol (NHRP).
-NHRP is described in RFC2332.
-
-NHRP is used to improve the efficiency of routing computer network
-traffic over Non-Broadcast, Multiple Access (NBMA) Networks. NHRP provides
-an ARP-like solution that allows a system to dynamically learn the NBMA
-address of the other systems that are part of that network, allowing
-these systems to directly communicate without requiring traffic to use
-an intermediate hop.
-
-Cisco Dynamic Multipoint VPN (DMVPN) is based on NHRP, and
-@value{PACKAGE_NAME} nhrpd implements this scenario.
-
-@menu
-* Routing Design::
-* Configuring NHRP::
-* Hub Functionality::
-* Integration with IKE::
-* NHRP Events::
-* Configuration Example::
-@end menu
-
-@node Routing Design
-@section Routing Design
-
-nhrpd never handles routing of prefixes itself. You need to run some
-real routing protocol (e.g. BGP) to advertise routes over the tunnels.
-What nhrpd does it establishes 'shortcut routes' that optimizes the
-routing protocol to avoid going through extra nodes in NBMA GRE mesh.
-
-nhrpd does route NHRP domain addresses individually using per-host prefixes.
-This is similar to Cisco FlexVPN; but in contrast to opennhrp which uses
-a generic subnet route.
-
-To create NBMA GRE tunnel you might use the following (linux terminal
-commands):
-@example
-@group
- ip tunnel add gre1 mode gre key 42 ttl 64
- ip addr add 10.255.255.2/32 dev gre1
- ip link set gre1 up
-@end group
-@end example
-
-Note that the IP-address is assigned as host prefix to gre1. nhrpd will
-automatically create additional host routes pointing to gre1 when
-a connection with these hosts is established.
-
-The gre1 subnet prefix should be announced by routing protocol from the
-hub nodes (e.g. BGP 'network' announce). This allows the routing protocol
-to decide which is the closest hub and determine the relay hub on prefix
-basis when direct tunnel is not established.
-
-nhrpd will redistribute directly connected neighbors to zebra. Within
-hub nodes, these routes should be internally redistributed using some
-routing protocol (e.g. iBGP) to allow hubs to be able to relay all traffic.
-
-This can be achieved in hubs with the following bgp configuration (network
-command defines the GRE subnet):
-@example
-@group
-router bgp 65555
- address-family ipv4 unicast
-   network 172.16.0.0/16
-   redistribute nhrp
- exit-address-family
-@end group
-@end example
-
-
-@node Configuring NHRP
-@section Configuring NHRP
-
-FIXME
-
-@node Hub Functionality
-@section Hub Functionality
-
-In addition to routing nhrp redistributed host prefixes, the hub nodes
-are also responsible to send NHRP Traffic Indication messages that
-trigger creation of the shortcut tunnels.
-
-nhrpd sends Traffic Indication messages based on network traffic captured
-using NFLOG. Typically you want to send Traffic Indications for network
-traffic that is routed from gre1 back to gre1 in rate limited manner.
-This can be achieved with the following iptables rule.
-
-@example
-@group
-iptables -A FORWARD -i gre1 -o gre1 \
-       -m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 \
-       --hashlimit-mode srcip,dstip --hashlimit-srcmask 24 --hashlimit-dstmask 24 \
-       --hashlimit-name loglimit-0 -j NFLOG --nflog-group 1 --nflog-range 128
-@end group
-@end example
-
-You can fine tune the src/dstmask according to the prefix lengths you
-announce internal, add additional IP range matches, or rate limitation
-if needed. However, the above should be good in most cases.
-
-This kernel NFLOG target's nflog-group is configured in global nhrp config
-with:
-@example
-@group
-nhrp nflog-group 1
-@end group
-@end example
-
-To start sending these traffic notices out from hubs, use the nhrp
-per-interface directive:
-@example
-@group
-interface gre1
- ip nhrp redirect
-@end group
-@end example
-
-@node Integration with IKE
-@section Integration with IKE
-
-nhrpd needs tight integration with IKE daemon for various reasons.
-Currently only strongSwan is supported as IKE daemon.
-
-nhrpd connects to strongSwan using VICI protocol based on UNIX socket
-(hardcoded now as /var/run/charon.vici).
-
-strongSwan currently needs few patches applied. Please check out the
-@uref{http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras-release,release}
-and
-@uref{http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras,working tree}
-git repositories for the patches.
-
-@node NHRP Events
-@section NHRP Events
-
-FIXME
-
-@node Configuration Example
-@section Configuration Example
-
-FIXME
diff --git a/doc/ospf6d.8.in b/doc/ospf6d.8.in
deleted file mode 100644 (file)
index 02d9d80..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-.TH OSPF6D 8 "25 November 2004" "@PACKAGE_FULLNAME@ OSPFv3 daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-ospf6d \- an OSPFv3 routing engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B ospf6d
-[
-.B \-dhv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B ospf6d
-is a routing component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B ospf6d
-command:
-.SH OPTIONS
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR 
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/ospf6d.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When ospf6d starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart ospf6d.  The default is \fB\fI@CFG_STATE@/ospf6d.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the ospf6d VTY will listen on. This defaults to
-2606, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the ospf6d VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-The \fBsnmp\fR module may be available for
-\fBospf6d\fR, if the package was built with SNMP support.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/ospf6d
-The default location of the 
-.B ospf6d
-binary.
-.TP
-.BI @CFG_SYSCONF@/ospf6d.conf
-The default location of the 
-.B ospf6d
-config file.
-.TP
-.BI $(PWD)/ospf6d.log 
-If the 
-.B ospf6d
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBospf6d\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The ospf6d process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBospf6d\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR isisd (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-.B ospf6d
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/doc/ospf6d.texi b/doc/ospf6d.texi
deleted file mode 100644 (file)
index 3ea71fb..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-@node OSPFv3
-@chapter OSPFv3
-
-@command{ospf6d} is a daemon support OSPF version 3 for IPv6 network.
-OSPF for IPv6 is described in RFC2740.
-
-@menu
-* OSPF6 router::                
-* OSPF6 area::                  
-* OSPF6 interface::             
-* Redistribute routes to OSPF6::  
-* Showing OSPF6 information::   
-* OSPF6 Configuration Examples::
-@end menu
-
-@node OSPF6 router
-@section OSPF6 router
-
-@deffn {Command} {router ospf6} {}
-@end deffn
-
-@deffn {OSPF6 Command} {router-id @var{a.b.c.d}} {}
-Set router's Router-ID.
-@end deffn
-
-@deffn {OSPF6 Command} {interface @var{ifname} area @var{area}} {}
-Bind interface to specified area, and start sending OSPF packets.  @var{area} can
-be specified as 0.
-@end deffn
-
-@deffn {OSPF6 Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {}
-@deffnx {OSPF6 Command} {no timers throttle spf} {}
-This command sets the initial @var{delay}, the @var{initial-holdtime}
-and the @var{maximum-holdtime} between when SPF is calculated and the
-event which triggered the calculation. The times are specified in
-milliseconds and must be in the range of 0 to 600000 milliseconds.
-
-The @var{delay} specifies the minimum amount of time to delay SPF
-calculation (hence it affects how long SPF calculation is delayed after
-an event which occurs outside of the holdtime of any previous SPF
-calculation, and also serves as a minimum holdtime).
-
-Consecutive SPF calculations will always be seperated by at least
-'hold-time' milliseconds. The hold-time is adaptive and initially is
-set to the @var{initial-holdtime} configured with the above command.
-Events which occur within the holdtime of the previous SPF calculation
-will cause the holdtime to be increased by @var{initial-holdtime}, bounded
-by the @var{maximum-holdtime} configured with this command. If the adaptive
-hold-time elapses without any SPF-triggering event occuring then
-the current holdtime is reset to the @var{initial-holdtime}.
-
-@example
-@group
-router ospf6
- timers throttle spf 200 400 10000
-@end group
-@end example
-
-In this example, the @var{delay} is set to 200ms, the @var{initial
-holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence
-there will always be at least 200ms between an event which requires SPF
-calculation and the actual SPF calculation. Further consecutive SPF
-calculations will always be seperated by between 400ms to 10s, the
-hold-time increasing by 400ms each time an SPF-triggering event occurs
-within the hold-time of the previous SPF calculation.
-
-@end deffn
-
-@deffn {OSPF6 Command} {auto-cost reference-bandwidth @var{cost}} {}
-@deffnx {OSPF6 Command} {no auto-cost reference-bandwidth} {}
-This 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.
-@end deffn
-
-@node OSPF6 area
-@section OSPF6 area
-
-Area support for OSPFv3 is not yet implemented.
-
-@node OSPF6 interface
-@section OSPF6 interface
-
-@deffn {Interface Command} {ipv6 ospf6 cost COST} {}
-Sets interface's output cost.  Default value depends on the interface
-bandwidth and on the auto-cost reference bandwidth.
-@end deffn
-
-@deffn {Interface Command} {ipv6 ospf6 hello-interval HELLOINTERVAL} {}
-Sets interface's Hello Interval.  Default 40
-@end deffn
-
-@deffn {Interface Command} {ipv6 ospf6 dead-interval DEADINTERVAL} {}
-Sets interface's Router Dead Interval.  Default value is 40.
-@end deffn
-
-@deffn {Interface Command} {ipv6 ospf6 retransmit-interval RETRANSMITINTERVAL} {}
-Sets interface's Rxmt Interval.  Default value is 5.
-@end deffn
-
-@deffn {Interface Command} {ipv6 ospf6 priority PRIORITY} {}
-Sets interface's Router Priority.  Default value is 1.
-@end deffn
-
-@deffn {Interface Command} {ipv6 ospf6 transmit-delay TRANSMITDELAY} {}
-Sets interface's Inf-Trans-Delay.  Default value is 1.
-@end deffn
-
-@deffn {Interface Command} {ipv6 ospf6 network (broadcast|point-to-point)} {}
-Set explicitly network type for specifed interface.
-@end deffn
-
-@node Redistribute routes to OSPF6
-@section Redistribute routes to OSPF6
-
-@deffn {OSPF6 Command} {redistribute static} {}
-@deffnx {OSPF6 Command} {redistribute connected} {}
-@deffnx {OSPF6 Command} {redistribute ripng} {}
-@end deffn
-
-@node Showing OSPF6 information
-@section Showing OSPF6 information
-
-@deffn {Command} {show ipv6 ospf6 [INSTANCE_ID]} {}
-INSTANCE_ID is an optional OSPF instance ID. To see router ID and OSPF
-instance ID, simply type "show ipv6 ospf6 <cr>".
-@end deffn
-
-@deffn {Command} {show ipv6 ospf6 database} {}
-This command shows LSA database summary.  You can specify the type of LSA.
-@end deffn
-
-@deffn {Command} {show ipv6 ospf6 interface} {}
-To see OSPF interface configuration like costs.
-@end deffn
-
-@deffn {Command} {show ipv6 ospf6 neighbor} {}
-Shows state and chosen (Backup) DR of neighbor.
-@end deffn
-
-@deffn {Command} {show ipv6 ospf6 request-list A.B.C.D} {}
-Shows requestlist of neighbor.
-@end deffn
-
-@deffn {Command} {show ipv6 route ospf6} {}
-This command shows internal routing table.
-@end deffn
-
-@deffn {Command} {show ipv6 ospf6 zebra} {}
-Shows state about what is being redistributed between zebra and OSPF6
-@end deffn
-
-@node OSPF6 Configuration Examples
-@section OSPF6 Configuration Examples
-
-Example of ospf6d configured on one interface and area:
-
-@example
-interface eth0
- ipv6 ospf6 instance-id 0
-!
-router ospf6
- router-id 212.17.55.53
- area 0.0.0.0 range 2001:770:105:2::/64
- interface eth0 area 0.0.0.0
-!
-@end example
diff --git a/doc/ospf_api_architecture.png b/doc/ospf_api_architecture.png
deleted file mode 100644 (file)
index bd10a38..0000000
Binary files a/doc/ospf_api_architecture.png and /dev/null differ
diff --git a/doc/ospf_api_msghdr.png b/doc/ospf_api_msghdr.png
deleted file mode 100644 (file)
index 5bc840f..0000000
Binary files a/doc/ospf_api_msghdr.png and /dev/null differ
diff --git a/doc/ospf_api_msgs1.png b/doc/ospf_api_msgs1.png
deleted file mode 100644 (file)
index a23cc61..0000000
Binary files a/doc/ospf_api_msgs1.png and /dev/null differ
diff --git a/doc/ospf_api_msgs2.png b/doc/ospf_api_msgs2.png
deleted file mode 100644 (file)
index 8997ac4..0000000
Binary files a/doc/ospf_api_msgs2.png and /dev/null differ
diff --git a/doc/ospf_fundamentals.texi b/doc/ospf_fundamentals.texi
deleted file mode 100644 (file)
index 82218e6..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-@c Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
-@cindex OSPF Fundamentals
-@node OSPF Fundamentals
-@section OSPF Fundamentals
-
-@cindex Link-state routing protocol
-@cindex Distance-vector routing protocol
-@acronym{OSPF} is, mostly, a link-state routing protocol. In contrast
-to @dfn{distance-vector} protocols, such as @acronym{RIP} or
-@acronym{BGP}, where routers describe available @dfn{paths} (i.e@. routes) 
-to each other, in @dfn{link-state} protocols routers instead
-describe the state of their links to their immediate neighbouring
-routers.
-
-@cindex Link State Announcement
-@cindex Link State Advertisement
-@cindex LSA flooding
-@cindex Link State DataBase
-Each router describes their link-state information in a message known
-as an @acronym{LSA,Link State Advertisement}, which is then propogated
-through to all other routers in a link-state routing domain, by a
-process called @dfn{flooding}. Each router thus builds up an
-@acronym{LSDB,Link State Database} of all the link-state messages. From
-this collection of LSAs in the LSDB, each router can then calculate the
-shortest path to any other router, based on some common metric, by
-using an algorithm such as @url{http://www.cs.utexas.edu/users/EWD/,
-Edgser Dijkstra}'s @acronym{SPF,Shortest Path First}.
-
-@cindex Link-state routing protocol advantages
-By describing connectivity of a network in this way, in terms of
-routers and links rather than in terms of the paths through a network,
-a link-state protocol can use less bandwidth and converge more quickly
-than other protocols. A link-state protocol need distribute only one
-link-state message throughout the link-state domain when a link on any
-single given router changes state, in order for all routers to
-reconverge on the best paths through the network. In contrast, distance
-vector protocols can require a progression of different path update
-messages from a series of different routers in order to converge.
-
-@cindex Link-state routing protocol disadvantages
-The disadvantage to a link-state protocol is that the process of
-computing the best paths can be relatively intensive when compared to
-distance-vector protocols, in which near to no computation need be done
-other than (potentially) select between multiple routes. This overhead
-is mostly negligible for modern embedded CPUs, even for networks with
-thousands of nodes. The primary scaling overhead lies more in coping
-with the ever greater frequency of LSA updates as the size of a
-link-state area increases, in managing the @acronym{LSDB} and required
-flooding.
-
-This section aims to give a distilled, but accurate, description of the
-more important workings of @acronym{OSPF}@ which an administrator may need
-to know to be able best configure and trouble-shoot @acronym{OSPF}@.
-
-@subsection OSPF Mechanisms
-
-@acronym{OSPF} defines a range of mechanisms, concerned with detecting,
-describing and propogating state through a network. These mechanisms
-will nearly all be covered in greater detail further on. They may be
-broadly classed as:
-
-@table @dfn
-@cindex OSPF Hello Protocol overview
-@item The Hello Protocol
-
-@cindex OSPF Hello Protocol
-The OSPF Hello protocol allows OSPF to quickly detect changes in
-two-way reachability between routers on a link. OSPF can additionally
-avail of other sources of reachability information, such as link-state
-information provided by hardware, or through dedicated reachability
-protocols such as @acronym{BFD,Bi-directional Forwarding Detection}.
-
-OSPF also uses the Hello protocol to propagate certain state between
-routers sharing a link, for example:
-
-@itemize @bullet
-@item Hello protocol configured state, such as the dead-interval.
-@item Router priority, for DR/BDR election.
-@item DR/BDR election results.
-@item Any optional capabilities supported by each router.
-@end itemize
-
-The Hello protocol is comparatively trivial and will not be explored in
-greater detail than here.
-
-@cindex OSPF LSA overview 
-@item LSAs
-
-At the heart of @acronym{OSPF} are @acronym{LSA,Link State
-Advertisement} messages. Despite the name, some @acronym{LSA}s do not,
-strictly speaking, describe link-state information. Common
-@acronym{LSA}s describe information such as:
-
-@itemize @bullet
-@item
-Routers, in terms of their links.
-@item
-Networks, in terms of attached routers.
-@item
-Routes, external to a link-state domain:
-
-@itemize @bullet
-@item External Routes
-
-Routes entirely external to @acronym{OSPF}@. Routers originating such
-routes are known as @acronym{ASBR,Autonomous-System Border Router}
-routers.
-
-@item Summary Routes
-
-Routes which summarise routing information relating to OSPF areas
-external to the OSPF link-state area at hand, originated by
-@acronym{ABR,Area Boundary Router} routers.
-@end itemize
-@end itemize
-
-@item LSA Flooding
-OSPF defines several related mechanisms, used to manage synchronisation of
-@acronym{LSDB}s between neighbours as neighbours form adjacencies and
-the propogation, or @dfn{flooding} of new or updated @acronym{LSA}s.
-
-@xref{OSPF Flooding}.
-
-@cindex OSPF Areas overview
-@item Areas
-OSPF provides for the protocol to be broken up into multiple smaller
-and independent link-state areas. Each area must be connected to a
-common backbone area by an @acronym{ABR,Area Boundary Router}. These
-@acronym{ABR} routers are responsible for summarising the link-state
-routing information of an area into @dfn{Summary LSAs}, possibly in a
-condensed (i.e. aggregated) form, and then originating these summaries
-into all other areas the @acronym{ABR} is connected to.
-
-Note that only summaries and external routes are passed between areas.
-As these describe @emph{paths}, rather than any router link-states,
-routing between areas hence is by @dfn{distance-vector}, @strong{not}
-link-state.
-
-@xref{OSPF Areas}.
-@end table
-
-@subsection OSPF LSAs
-
-@acronym{LSA}s are the core object in OSPF@. Everything else in OSPF
-revolves around detecting what to describe in LSAs, when to update
-them, how to flood them throughout a network and how to calculate
-routes from them. 
-
-There are a variety of different @acronym{LSA}s, for purposes such
-as describing actual link-state information, describing paths (i.e.
-routes), describing bandwidth usage of links for 
-@acronym{TE,Traffic Engineering} purposes, and even arbitrary data
-by way of @emph{Opaque} @acronym{LSA}s.
-
-@subsubsection LSA Header
-All LSAs share a common header with the following information:
-
-@itemize @bullet
-@item Type
-
-Different types of @acronym{LSA}s describe different things in
-@acronym{OSPF}@. Types include:
-
-@itemize @bullet
-@item Router LSA
-@item Network LSA
-@item Network Summary LSA
-@item Router Summary LSA
-@item AS-External LSA
-@end itemize
-
-The specifics of the different types of LSA are examined below.
-
-@item Advertising Router
-
-The Router ID of the router originating the LSA, see @ref{ospf router-id}.
-
-@item LSA ID
-
-The ID of the LSA, which is typically derived in some way from the
-information the LSA describes, e.g. a Router LSA uses the Router ID as
-the LSA ID, a Network LSA will have the IP address of the @acronym{DR}
-as its LSA ID@.
-
-The combination of the Type, ID and Advertising Router ID must uniquely
-identify the @acronym{LSA}@. There can however be multiple instances of
-an LSA with the same Type, LSA ID and Advertising Router ID, see
-@ref{OSPF LSA sequence number,,LSA Sequence Number}.
-
-@item Age
-
-A number to allow stale @acronym{LSA}s to, eventually, be purged by routers
-from their @acronym{LSDB}s.
-
-The value nominally is one of seconds. An age of 3600, i.e. 1 hour, is
-called the @dfn{MaxAge}. MaxAge LSAs are ignored in routing
-calculations. LSAs must be periodically refreshed by their Advertising
-Router before reaching MaxAge if they are to remain valid.
-
-Routers may deliberately flood LSAs with the age artificially set to
-3600 to indicate an LSA is no longer valid. This is called
-@dfn{flushing} of an LSA@.
-
-It is not abnormal to see stale LSAs in the LSDB, this can occur where
-a router has shutdown without flushing its LSA(s), e.g. where it has
-become disconnected from the network. Such LSAs do little harm.
-
-@anchor{OSPF LSA sequence number}
-@item Sequence Number
-
-A number used to distinguish newer instances of an LSA from older instances.
-@end itemize
-
-@subsubsection Link-State LSAs
-Of all the various kinds of @acronym{LSA}s, just two types comprise the
-actual link-state part of @acronym{OSPF}, Router @acronym{LSA}s and
-Network @acronym{LSA}s. These LSA types are absolutely core to the
-protocol. 
-
-Instances of these LSAs are specific to the link-state area in which
-they are originated. Routes calculated from these two LSA types are
-called @dfn{intra-area routes}.
-
-@itemize @bullet
-@item Router LSA
-
-Each OSPF Router must originate a router @acronym{LSA} to describe
-itself. In it, the router lists each of its @acronym{OSPF} enabled
-interfaces, for the given link-state area, in terms of:
-
-@itemize @bullet
-@item Cost
-
-The output cost of that interface, scaled inversely to some commonly known
-reference value, @xref{OSPF auto-cost reference-bandwidth,,auto-cost
-reference-bandwidth}.
-
-@item Link Type
-@itemize @bullet
-@item Transit Network
-
-A link to a multi-access network, on which the router has at least one
-Full adjacency with another router.
-
-@item @acronym{PtP,Point-to-Point}
-
-A link to a single remote router, with a Full adjacency. No
-@acronym{DR, Designated Router} is elected on such links; no network
-LSA is originated for such a link.
-
-@item Stub
-
-A link with no adjacent neighbours, or a host route.
-@end itemize
-
-@item Link ID and Data
-
-These values depend on the Link Type:
-
-@multitable @columnfractions .18 .32 .32
-@headitem Link Type @tab Link ID @tab Link Data
-
-@item Transit
-@tab Link IP address of the @acronym{DR}
-@tab Interface IP address
-
-@item Point-to-Point
-@tab Router ID of the remote router
-@tab Local interface IP address,
-or the @acronym{ifindex,MIB-II interface index} 
-for unnumbered links
-
-@item Stub
-@tab IP address
-@tab Subnet Mask
-
-@end multitable
-@end itemize
-
-Links on a router may be listed multiple times in the Router LSA, e.g.
-a @acronym{PtP} interface on which OSPF is enabled must @emph{always}
-be described by a Stub link in the Router @acronym{LSA}, in addition to
-being listed as PtP link in the Router @acronym{LSA} if the adjacency
-with the remote router is Full.
-
-Stub links may also be used as a way to describe links on which OSPF is
-@emph{not} spoken, known as @dfn{passive interfaces}, see @ref{OSPF
-passive-interface,,passive-interface}.
-
-@item Network LSA
-
-On multi-access links (e.g. ethernets, certain kinds of ATM and X@.25
-configurations), routers elect a @acronym{DR}@. The @acronym{DR} is
-responsible for originating a Network @acronym{LSA}, which helps reduce
-the information needed to describe multi-access networks with multiple
-routers attached. The @acronym{DR} also acts as a hub for the flooding of
-@acronym{LSA}s on that link, thus reducing flooding overheads.
-
-The contents of the Network LSA describes the:
-
-@itemize @bullet
-@item Subnet Mask
-
-As the @acronym{LSA} ID of a Network LSA must be the IP address of the
-@acronym{DR}, the Subnet Mask together with the @acronym{LSA} ID gives
-you the network address.
-
-@item Attached Routers
-
-Each router fully-adjacent with the @acronym{DR} is listed in the LSA,
-by their Router-ID. This allows the corresponding Router @acronym{LSA}s to be
-easily retrieved from the @acronym{LSDB}@.
-@end itemize
-@end itemize
-
-Summary of Link State LSAs:
-
-@multitable @columnfractions .18 .32 .40
-@headitem LSA Type @tab LSA ID Describes @tab LSA Data Describes
-
-@item Router LSA 
-@tab The Router ID 
-@tab The @acronym{OSPF} enabled links of the router, within
-     a specific link-state area.
-
-@item Network LSA
-@tab The IP address of the @acronym{DR} for the network
-@tab The Subnet Mask of the network, and the Router IDs of all routers
-     on the network.
-@end multitable
-
-With an LSDB composed of just these two types of @acronym{LSA}, it is
-possible to construct a directed graph of the connectivity between all
-routers and networks in a given OSPF link-state area. So, not
-surprisingly, when OSPF routers build updated routing tables, the first
-stage of @acronym{SPF} calculation concerns itself only with these two
-LSA types. 
-
-@subsubsection Link-State LSA Examples
-
-The example below (@pxref{OSPF Link-State LSA Example}) shows two
-@acronym{LSA}s, both originated by the same router (Router ID
-192.168.0.49) and with the same @acronym{LSA} ID (192.168.0.49), but of
-different LSA types.
-
-The first LSA being the router LSA describing 192.168.0.49's links: 2 links
-to multi-access networks with fully-adjacent neighbours (i.e. Transit
-links) and 1 being a Stub link (no adjacent neighbours).
-
-The second LSA being a Network LSA, for which 192.168.0.49 is the
-@acronym{DR}, listing the Router IDs of 4 routers on that network which
-are fully adjacent with 192.168.0.49.
-
-@anchor{OSPF Link-State LSA Example}
-@example
-# show ip ospf database router 192.168.0.49
-
-       OSPF Router with ID (192.168.0.53)
-
-
-                Router Link States (Area 0.0.0.0)
-
-  LS age: 38
-  Options: 0x2  : *|-|-|-|-|-|E|*
-  LS Flags: 0x6  
-  Flags: 0x2 : ASBR
-  LS Type: router-LSA
-  Link State ID: 192.168.0.49 
-  Advertising Router: 192.168.0.49
-  LS Seq Number: 80000f90
-  Checksum: 0x518b
-  Length: 60
-   Number of Links: 3
-
-    Link connected to: a Transit Network
-     (Link ID) Designated Router address: 192.168.1.3
-     (Link Data) Router Interface address: 192.168.1.3
-      Number of TOS metrics: 0
-       TOS 0 Metric: 10
-
-    Link connected to: a Transit Network
-     (Link ID) Designated Router address: 192.168.0.49
-     (Link Data) Router Interface address: 192.168.0.49
-      Number of TOS metrics: 0
-       TOS 0 Metric: 10
-
-    Link connected to: Stub Network
-     (Link ID) Net: 192.168.3.190
-     (Link Data) Network Mask: 255.255.255.255
-      Number of TOS metrics: 0
-       TOS 0 Metric: 39063
-# show ip ospf database network 192.168.0.49
-
-       OSPF Router with ID (192.168.0.53)
-
-
-                Net Link States (Area 0.0.0.0)
-
-  LS age: 285
-  Options: 0x2  : *|-|-|-|-|-|E|*
-  LS Flags: 0x6  
-  LS Type: network-LSA
-  Link State ID: 192.168.0.49 (address of Designated Router)
-  Advertising Router: 192.168.0.49
-  LS Seq Number: 80000074
-  Checksum: 0x0103
-  Length: 40
-  Network Mask: /29
-        Attached Router: 192.168.0.49
-        Attached Router: 192.168.0.52
-        Attached Router: 192.168.0.53
-        Attached Router: 192.168.0.54
-@end example
-
-Note that from one LSA, you can find the other. E.g. Given the
-Network-LSA you have a list of Router IDs on that network, from which
-you can then look up, in the local @acronym{LSDB}, the matching Router
-LSA@. From that Router-LSA you may (potentially) find links to other
-Transit networks and Routers IDs which can be used to lookup the
-corresponding Router or Network LSA@. And in that fashion, one can find
-all the Routers and Networks reachable from that starting @acronym{LSA}@.
-
-Given the Router LSA instead, you have the IP address of the
-@acronym{DR} of any attached transit links. Network LSAs will have that IP
-as their LSA ID, so you can then look up that Network LSA and from that
-find all the attached routers on that link, leading potentially to more
-links and Network and Router LSAs, etc. etc.
-
-From just the above two @acronym{LSA}s, one can already see the
-following partial topology:
-@example
-@group
-
-      
-   --------------------- Network: ......
-            |            Designated Router IP: 192.168.1.3
-            |
-      IP: 192.168.1.3
-       (transit link)
-        (cost: 10)
-   Router ID: 192.168.0.49(stub)---------- IP: 192.168.3.190/32
-        (cost: 10)        (cost: 39063)
-       (transit link)
-      IP: 192.168.0.49
-            |
-            |
------------------------------- Network: 192.168.0.48/29
-  |        |           |       Designated Router IP: 192.168.0.49
-  |        |           |
-  |        |     Router ID: 192.168.0.54
-  |        |
-  |   Router ID: 192.168.0.53
-  |
-Router ID: 192.168.0.52
-@end group
-@end example
-
-Note the Router IDs, though they look like IP addresses and often are
-IP addresses, are not strictly speaking IP addresses, nor need they be
-reachable addresses (though, OSPF will calculate routes to Router IDs).
-
-@subsubsection External LSAs
-
-External, or "Type 5", @acronym{LSA}s describe routing information which is
-entirely external to @acronym{OSPF}, and is "injected" into
-@acronym{OSPF}@. Such routing information may have come from another
-routing protocol, such as RIP or BGP, they may represent static routes
-or they may represent a default route.
-
-An @acronym{OSPF} router which originates External @acronym{LSA}s is known as an
-@acronym{ASBR,AS Boundary Router}. Unlike the link-state @acronym{LSA}s, and
-most other @acronym{LSA}s, which are flooded only within the area in
-which they originate, External @acronym{LSA}s are flooded through-out
-the @acronym{OSPF} network to all areas capable of carrying External
-@acronym{LSA}s (@pxref{OSPF Areas}).
-
-Routes internal to OSPF (intra-area or inter-area) are always preferred
-over external routes.
-
-The External @acronym{LSA} describes the following:
-
-@itemize @bullet
-@item IP Network number
-
-The IP Network number of the route is described by the @acronym{LSA} ID
-field.
-
-@item IP Network Mask
-
-The body of the External LSA describes the IP Network Mask of the
-route. This, together with the @acronym{LSA} ID, describes the prefix
-of the IP route concerned.
-
-@item Metric
-
-The cost of the External Route. This cost may be an OSPF cost (also
-known as a "Type 1" metric), i.e. equivalent to the normal OSPF costs,
-or an externally derived cost ("Type 2" metric) which is not comparable
-to OSPF costs and always considered larger than any OSPF cost. Where
-there are both Type 1 and 2 External routes for a route, the Type 1 is
-always preferred.
-
-@item Forwarding Address
-
-The address of the router to forward packets to for the route. This may
-be, and usually is, left as 0 to specify that the ASBR originating the
-External @acronym{LSA} should be used. There must be an internal OSPF
-route to the forwarding address, for the forwarding address to be
-useable.
-
-@item Tag
-
-An arbitrary 4-bytes of data, not interpreted by OSPF, which may
-carry whatever information about the route which OSPF speakers desire.
-@end itemize
-
-@subsubsection AS External LSA Example
-
-To illustrate, below is an example of an External @acronym{LSA} in the
-@acronym{LSDB} of an OSPF router. It describes a route to the IP prefix
-of 192.168.165.0/24, originated by the ASBR with Router-ID
-192.168.0.49. The metric of 20 is external to OSPF. The forwarding
-address is 0, so the route should forward to the originating ASBR if
-selected.
-
-@example
-@group
-# show ip ospf database external 192.168.165.0
-  LS age: 995
-  Options: 0x2  : *|-|-|-|-|-|E|*
-  LS Flags: 0x9
-  LS Type: AS-external-LSA
-  Link State ID: 192.168.165.0 (External Network Number)
-  Advertising Router: 192.168.0.49
-  LS Seq Number: 800001d8
-  Checksum: 0xea27
-  Length: 36
-  Network Mask: /24
-        Metric Type: 2 (Larger than any link state path)
-        TOS: 0
-        Metric: 20
-        Forward Address: 0.0.0.0
-        External Route Tag: 0
-@end group
-@end example
-
-We can add this to our partial topology from above, which now looks
-like:
-@example
-@group
-   --------------------- Network: ......
-            |            Designated Router IP: 192.168.1.3
-            |
-      IP: 192.168.1.3      /---- External route: 192.168.165.0/24
-       (transit link)     /                Cost: 20 (External metric)
-        (cost: 10)       /
-   Router ID: 192.168.0.49(stub)---------- IP: 192.168.3.190/32
-        (cost: 10)        (cost: 39063)
-       (transit link)
-      IP: 192.168.0.49
-            |
-            |
------------------------------- Network: 192.168.0.48/29
-  |        |           |       Designated Router IP: 192.168.0.49
-  |        |           |
-  |        |     Router ID: 192.168.0.54
-  |        |
-  |   Router ID: 192.168.0.53
-  |
-Router ID: 192.168.0.52
-@end group
-@end example
-
-@subsubsection Summary LSAs
-
-Summary LSAs are created by @acronym{ABR}s to summarise the destinations available within one area to other areas. These LSAs may describe IP networks, potentially in aggregated form, or @acronym{ASBR} routers. 
-
-@anchor{OSPF Flooding}
-@subsection OSPF Flooding
-
-@anchor{OSPF Areas}
-@subsection OSPF Areas
diff --git a/doc/ospfclient.8.in b/doc/ospfclient.8.in
deleted file mode 100644 (file)
index a304bef..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-.\" This file was originally generated by help2man 1.36.
-.TH OSPFCLIENT "8" "July 2010"
-.SH NAME
-ospfclient \- an example ospf-api client
-.SH SYNOPSIS
-.B ospfclient
-.I ospfd
-.I lsatype
-.I opaquetype
-.I opaqueid
-.I ifaddr
-.I areaid
-.SH DESCRIPTION
-.B ospfclient
-is a an example ospf-api client to test the ospfd daemon.
-.SH OPTIONS
-.TP
-.I ospfd
-A router where the API\-enabled OSPF daemon is running.
-.TP
-.I lsatype
-The value has to be either "9", "10", or "11", depending on the flooding
-scope.
-.TP
-.I opaquetype
-The value has to be in the range of 0\-255 (for example, experimental
-applications use
-.I opaquetype
-larger than 128).
-.TP
-.I opaqueid
-Arbitrary application instance (24 bits).
-.TP
-.I ifaddr
-Interface IP address for type 9, otherwise it will be ignored.
-.TP
-.I areaid
-Area in the IP address format for type 10, otherwise it will be ignored.
-.SH "SEE ALSO"
-.BR ospfd (8).
-.SH AUTHORS
-See the project homepage at <@PACKAGE_URL@>.
diff --git a/doc/ospfd.8.in b/doc/ospfd.8.in
deleted file mode 100644 (file)
index 6bad777..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-.TH OSPFD 8 "25 November 2004" "@PACKAGE_FULLNAME@ OSPFv2 daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-ospfd \- an OSPFv2 routing engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B ospfd
-[
-.B \-dhlv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B ospfd
-is a routing component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B ospfd
-command:
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR 
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/ospfd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When ospfd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart ospfd.  The default is \fB\fI@CFG_STATE@/ospfd.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the ospfd VTY will listen on. This defaults to
-2604, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the ospfd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-a\fR, \fB\-\-apiserver \fR
-Enable OSPF apiserver. Default is disabled.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-The \fBsnmp\fR module may be available for
-\fBospfd\fR, if the package was built with SNMP support.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/ospfd
-The default location of the 
-.B ospfd
-binary.
-.TP
-.BI @CFG_SYSCONF@/ospfd.conf
-The default location of the 
-.B ospfd
-config file.
-.TP
-.BI $(PWD)/ospfd.log 
-If the 
-.B ospfd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBospfd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The ospfd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBospfd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-.B ospfd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/doc/ospfd.texi b/doc/ospfd.texi
deleted file mode 100644 (file)
index 9694be1..0000000
+++ /dev/null
@@ -1,972 +0,0 @@
-
-@cindex OSPFv2
-@node OSPFv2
-@chapter OSPFv2
-
-@acronym{OSPF,Open Shortest Path First} version 2 is a routing protocol
-which is described in @cite{RFC2328, OSPF Version 2}.  OSPF is an
-@acronym{IGP,Interior Gateway Protocol}.  Compared with @acronym{RIP},
-@acronym{OSPF} can provide scalable network support and faster
-convergence times.  OSPF is widely used in large networks such as
-@acronym{ISP,Internet Service Provider} backbone and enterprise
-networks.
-
-@menu
-* OSPF Fundamentals::
-* Configuring ospfd::           
-* OSPF router::                 
-* OSPF area::                   
-* OSPF interface::              
-* Redistribute routes to OSPF::  
-* Showing OSPF information::    
-* Opaque LSA::
-* OSPF Traffic Engineering::
-* Router Information::
-* Segment Routing::
-* Debugging OSPF::              
-* OSPF Configuration Examples::
-@end menu
-
-@include ospf_fundamentals.texi
-
-@node Configuring ospfd
-@section Configuring ospfd
-
-There are no @command{ospfd} specific options.  Common options can be
-specified (@pxref{Common Invocation Options}) to @command{ospfd}.
-@command{ospfd} needs to acquire interface information from
-@command{zebra} in order to function. Therefore @command{zebra} must be
-running before invoking @command{ospfd}. Also, if @command{zebra} is
-restarted then @command{ospfd} must be too.
-
-Like other daemons, @command{ospfd} configuration is done in @acronym{OSPF}
-specific configuration file @file{ospfd.conf}.
-
-@node OSPF router
-@section OSPF router
-
-To start OSPF process you have to specify the OSPF router.  As of this
-writing, @command{ospfd} does not support multiple OSPF processes.
-
-@deffn Command {router ospf} {}
-@deffnx Command {no router ospf} {}
-Enable or disable the OSPF process.  @command{ospfd} does not yet
-support multiple OSPF processes.  So you can not specify an OSPF process
-number.
-@end deffn
-
-@deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {}
-@deffnx {OSPF Command} {no ospf router-id} {}
-@anchor{ospf router-id}This sets the router-ID of the OSPF process. The
-router-ID may be an IP address of the router, but need not be - it can
-be any arbitrary 32bit number. However it MUST be unique within the
-entire OSPF domain to the OSPF speaker - bad things will happen if
-multiple OSPF speakers are configured with the same router-ID! If one
-is not specified then @command{ospfd} will obtain a router-ID
-automatically from @command{zebra}.
-@end deffn
-
-@deffn {OSPF Command} {ospf abr-type @var{type}} {}
-@deffnx {OSPF Command} {no ospf abr-type @var{type}} {}
-@var{type} can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types
-are equivalent.
-
-The OSPF standard for ABR behaviour does not allow an ABR to consider
-routes through non-backbone areas when its links to the backbone are
-down, even when there are other ABRs in attached non-backbone areas
-which still can reach the backbone - this restriction exists primarily
-to ensure routing-loops are avoided.
-
-With the "Cisco" or "IBM" ABR type, the default in this release of
-Frr, this restriction is lifted, allowing an ABR to consider
-summaries learnt from other ABRs through non-backbone areas, and hence
-route via non-backbone areas as a last resort when, and only when,
-backbone links are down.
-
-Note that areas with fully-adjacent virtual-links are considered to be
-"transit capable" and can always be used to route backbone traffic, and
-hence are unaffected by this setting (@pxref{OSPF virtual-link}).
-
-More information regarding the behaviour controlled by this command can
-be found in @cite{RFC 3509, Alternative Implementations of OSPF Area
-Border Routers}, and @cite{draft-ietf-ospf-shortcut-abr-02.txt}.
-
-Quote: "Though the definition of the @acronym{ABR,Area Border Router}
-in the OSPF specification does not require a router with multiple
-attached areas to have a backbone connection, it is actually
-necessary to provide successful routing to the inter-area and
-external destinations. If this requirement is not met, all traffic
-destined for the areas not connected to such an ABR or out of the
-OSPF domain, is dropped.  This document describes alternative ABR
-behaviors implemented in Cisco and IBM routers."
-@end deffn
-
-@deffn {OSPF Command} {ospf rfc1583compatibility} {}
-@deffnx {OSPF Command} {no ospf rfc1583compatibility} {}
-@cite{RFC2328}, the sucessor to @cite{RFC1583}, suggests according
-to section G.2 (changes) in section 16.4 a change to the path
-preference algorithm that prevents possible routing loops that were
-possible in the old version of OSPFv2. More specifically it demands
-that inter-area paths and intra-area backbone path are now of equal preference
-but still both preferred to external paths.
-
-This command should NOT be set normally.
-@end deffn
-
-@deffn {OSPF Command} {log-adjacency-changes [detail]} {}
-@deffnx {OSPF Command} {no log-adjacency-changes [detail]} {}
-Configures ospfd to log changes in adjacency.  With the optional
-detail argument, all changes in adjacency status are shown.  Without detail,
-only changes to full or regressions are shown.
-@end deffn
-
-@deffn {OSPF Command} {passive-interface @var{interface}} {}
-@deffnx {OSPF Command} {no passive-interface @var{interface}} {}
-@anchor{OSPF passive-interface} Do not speak OSPF interface on the
-given interface, but do advertise the interface as a stub link in the
-router-@acronym{LSA,Link State Advertisement} for this router. This
-allows one to advertise addresses on such connected interfaces without
-having to originate AS-External/Type-5 LSAs (which have global flooding
-scope) - as would occur if connected addresses were redistributed into
-OSPF (@pxref{Redistribute routes to OSPF})@. This is the only way to
-advertise non-OSPF links into stub areas.
-@end deffn
-
-@deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {}
-@deffnx {OSPF Command} {no timers throttle spf} {}
-This command sets the initial @var{delay}, the @var{initial-holdtime}
-and the @var{maximum-holdtime} between when SPF is calculated and the
-event which triggered the calculation. The times are specified in
-milliseconds and must be in the range of 0 to 600000 milliseconds.
-
-The @var{delay} specifies the minimum amount of time to delay SPF
-calculation (hence it affects how long SPF calculation is delayed after
-an event which occurs outside of the holdtime of any previous SPF
-calculation, and also serves as a minimum holdtime).
-
-Consecutive SPF calculations will always be seperated by at least
-'hold-time' milliseconds. The hold-time is adaptive and initially is
-set to the @var{initial-holdtime} configured with the above command.
-Events which occur within the holdtime of the previous SPF calculation
-will cause the holdtime to be increased by @var{initial-holdtime}, bounded
-by the @var{maximum-holdtime} configured with this command. If the adaptive
-hold-time elapses without any SPF-triggering event occuring then 
-the current holdtime is reset to the @var{initial-holdtime}. The current
-holdtime can be viewed with @ref{show ip ospf}, where it is expressed as 
-a multiplier of the @var{initial-holdtime}.
-
-@example
-@group
-router ospf
- timers throttle spf 200 400 10000
-@end group
-@end example
-
-In this example, the @var{delay} is set to 200ms, the @var{initial
-holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence
-there will always be at least 200ms between an event which requires SPF
-calculation and the actual SPF calculation. Further consecutive SPF
-calculations will always be seperated by between 400ms to 10s, the
-hold-time increasing by 400ms each time an SPF-triggering event occurs
-within the hold-time of the previous SPF calculation.
-
-This command supercedes the @command{timers spf} command in previous Frr
-releases.
-@end deffn
-
-@deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {}
-@deffnx {OSPF Command} {max-metric router-lsa administrative} {}
-@deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {}
-This enables @cite{RFC3137, OSPF Stub Router Advertisement} support,
-where the OSPF process describes its transit links in its router-LSA as
-having infinite distance so that other routers will avoid calculating
-transit paths through the router while still being able to reach
-networks through the router.
-
-This support may be enabled administratively (and indefinitely) or
-conditionally. Conditional enabling of max-metric router-lsas can be
-for a period of seconds after startup and/or for a period of seconds
-prior to shutdown. 
-
-Enabling this for a period after startup allows OSPF to converge fully
-first without affecting any existing routes used by other routers,
-while still allowing any connected stub links and/or redistributed
-routes to be reachable. Enabling this for a period of time in advance
-of shutdown allows the router to gracefully excuse itself from the OSPF
-domain. 
-
-Enabling this feature administratively allows for administrative
-intervention for whatever reason, for an indefinite period of time.
-Note that if the configuration is written to file, this administrative
-form of the stub-router command will also be written to file. If
-@command{ospfd} is restarted later, the command will then take effect
-until manually deconfigured.
-
-Configured state of this feature as well as current status, such as the
-number of second remaining till on-startup or on-shutdown ends, can be
-viewed with the @ref{show ip ospf} command.
-@end deffn
-
-@deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {}
-@deffnx {OSPF Command} {no auto-cost reference-bandwidth} {}
-@anchor{OSPF auto-cost reference-bandwidth}This 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.
-@end deffn
-
-@deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
-@deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
-@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
-@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
-@anchor{OSPF network command}
-This command specifies the OSPF enabled interface(s).  If the interface has
-an address from range 192.168.1.0/24 then the command below enables ospf
-on this interface so router can provide network information to the other
-ospf routers via this interface.
-
-@example
-@group
-router ospf
- network 192.168.1.0/24 area 0.0.0.0
-@end group
-@end example
-
-Prefix length in interface must be equal or bigger (ie. smaller network) than
-prefix length in network statement. For example statement above doesn't enable
-ospf on interface with address 192.168.1.1/23, but it does on interface with
-address 192.168.1.129/25.
-
-Note that the behavior when there is a peer address
-defined on an interface changed after release 0.99.7.
-Currently, if a peer prefix has been configured,
-then we test whether the prefix in the network command contains
-the destination prefix.  Otherwise, we test whether the network command prefix
-contains the local address prefix of the interface. 
-
-In some cases it may be more convenient to enable OSPF on a per
-interface/subnet basis (@pxref{OSPF ip ospf area command}).
-
-@end deffn
-
-@node OSPF area
-@section OSPF area
-
-@deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
-@deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
-@deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
-Summarize intra area paths from specified area into one Type-3 summary-LSA
-announced to other areas. This command can be used only in ABR and ONLY
-router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
-be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
-Summarizing Type-7 AS-external-LSAs isn't supported yet by Frr.
-
-@example
-@group
-router ospf
- network 192.168.1.0/24 area 0.0.0.0
- network 10.0.0.0/8 area 0.0.0.10
- area 0.0.0.10 range 10.0.0.0/8
-@end group
-@end example
-
-With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
-announced into backbone area if area 0.0.0.10 contains at least one intra-area
-network (ie. described with router or network LSA) from this range.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
-Instead of summarizing intra area paths filter them - ie. intra area paths from this
-range are not advertised into other areas.
-This command makes sense in ABR only.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
-Substitute summarized prefix with another prefix.
-
-@example
-@group
-router ospf
- network 192.168.1.0/24 area 0.0.0.0
- network 10.0.0.0/8 area 0.0.0.10
- area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
-@end group
-@end example
-
-One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
-area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or
-network-LSA) from range 10.0.0.0/8.
-This command makes sense in ABR only.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
-@deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
-@deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
-@anchor{OSPF virtual-link}
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
-@deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
-@deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
-Configure the area as Shortcut capable. See @cite{RFC3509}. This requires
-that the 'abr-type' be set to 'shortcut'.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
-@deffnx {OSPF Command} {area <0-4294967295> stub} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
-@deffnx {OSPF Command} {no area <0-4294967295> stub} {}
-Configure the area to be a stub area. That is, an area where no router
-originates routes external to OSPF and hence an area where all external 
-routes are via the ABR(s). Hence, ABRs for such an area do not need
-to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
-area. They need only pass Network-Summary (type-3) LSAs into such an area,
-along with a default-route summary.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
-@deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
-@deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
-Prevents an @command{ospfd} ABR from injecting inter-area 
-summaries into the specified stub area.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
-Set the cost of default-summary LSAs announced to stubby areas.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
-@deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
-@deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
-Filter Type-3 summary-LSAs announced to other areas originated from intra-
-area paths from specified area.
-
-@example
-@group
-router ospf
- network 192.168.1.0/24 area 0.0.0.0
- network 10.0.0.0/8 area 0.0.0.10
- area 0.0.0.10 export-list foo
-!
-access-list foo permit 10.10.0.0/16
-access-list foo deny any
-@end group
-@end example
-
-With example above any intra-area paths from area 0.0.0.10 and from range
-10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
-other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
-or 10.128.30.16/30) aren't.
-
-This command is only relevant if the router is an ABR for the specified
-area.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
-@deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
-@deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
-Same as export-list, but it applies to paths announced into specified area as
-Type-3 summary-LSAs.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {}
-@deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {}
-@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {}
-@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {}
-@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {}
-@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {}
-Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
-makes sense in ABR only.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
-@deffnx {OSPF Command} {area <0-4294967295> authentication} {}
-@deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
-@deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
-Specify that simple password authentication should be used for the given
-area.
-@end deffn
-
-@deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
-@deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
-
-@anchor{area authentication message-digest}Specify that OSPF packets
-must be authenticated with MD5 HMACs within the given area. Keying
-material must also be configured on a per-interface basis (@pxref{ip
-ospf message-digest-key}).
-
-MD5 authentication may also be configured on a per-interface basis
-(@pxref{ip ospf authentication message-digest}). Such per-interface
-settings will override any per-area authentication setting.
-@end deffn
-
-@node OSPF interface
-@section OSPF interface
-
-@deffn {Interface Command} {ip ospf area @var{AREA} [@var{ADDR}]} {} 
-@deffnx {Interface Command} {no ip ospf area [@var{ADDR}]} {}
-@anchor{OSPF ip ospf area command}
-
-Enable OSPF on the interface, optionally restricted to just the IP address
-given by @var{ADDR}, putting it in the @var{AREA} area. Per interface area
-settings take precedence to network commands (@pxref{OSPF network command}).
-
-If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF
-via this command may result in a slight performance improvement.
-
-@end deffn
-
-@deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {}
-@deffnx {Interface Command} {no ip ospf authentication-key} {}
-Set OSPF authentication key to a simple password.  After setting @var{AUTH_KEY},
-all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
-
-Simple text password authentication is insecure and deprecated in favour of
-MD5 HMAC authentication (@pxref{ip ospf authentication message-digest}).
-@end deffn
-
-@deffn {Interface Command} {ip ospf authentication message-digest} {}
-@anchor{ip ospf authentication message-digest}Specify that MD5 HMAC
-authentication must be used on this interface. MD5 keying material must
-also be configured (@pxref{ip ospf message-digest-key}). Overrides any
-authentication enabled on a per-area basis (@pxref{area
-authentication message-digest}).
-
-Note that OSPF MD5 authentication requires that time never go backwards
-(correct time is NOT important, only that it never goes backwards), even
-across resets, if ospfd is to be able to promptly reestabish adjacencies
-with its neighbours after restarts/reboots. The host should have system
-time be set at boot from an external or non-volatile source (eg battery backed clock, NTP,
-etc.) or else the system clock should be periodically saved to non-volative
-storage and restored at boot if MD5 authentication is to be expected to work
-reliably.
-@end deffn
-
-@deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
-@deffnx {Interface Command} {no ip ospf message-digest-key} {}
-@anchor{ip ospf message-digest-key}Set OSPF authentication key to a
-cryptographic password.  The cryptographic algorithm is MD5.  
-
-KEYID identifies secret key used to create the message digest. This ID
-is part of the protocol and must be consistent across routers on a
-link.
-
-KEY is the actual message digest key, of up to 16 chars (larger strings
-will be truncated), and is associated with the given KEYID.
-@end deffn
-
-@deffn {Interface Command} {ip ospf cost <1-65535>} {}
-@deffnx {Interface Command} {no ip ospf cost} {}
-Set link cost for the specified interface.  The cost value is set to router-LSA's
-metric field and used for SPF calculation.
-@end deffn
-
-@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
-@deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {}
-@deffnx {Interface Command} {no ip ospf dead-interval} {}
-@anchor{ip ospf dead-interval minimal} Set number of seconds for
-RouterDeadInterval timer value used for Wait Timer and Inactivity
-Timer.  This value must be the same for all routers attached to a
-common network.  The default value is 40 seconds.
-
-If 'minimal' is specified instead, then the dead-interval is set to 1
-second and one must specify a hello-multiplier. The hello-multiplier
-specifies how many Hellos to send per second, from 2 (every 500ms) to
-20 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form
-is specified, then the hello-interval advertised in Hello packets is set to
-0 and the hello-interval on received Hello packets is not checked, thus 
-the hello-multiplier need NOT be the same across multiple routers on a common
-link.
-@end deffn
-
-@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
-@deffnx {Interface Command} {no ip ospf hello-interval} {}
-Set number of seconds for HelloInterval timer value.  Setting this value,
-Hello packet will be sent every timer value seconds on the specified interface.
-This value must be the same for all routers attached to a common network.
-The default value is 10 seconds.
-
-This command has no effect if @ref{ip ospf dead-interval minimal} is also 
-specified for the interface.
-@end deffn
-
-@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
-@deffnx {Interface Command} {no ip ospf network} {}
-Set explicitly network type for specifed interface.
-@end deffn
-
-@deffn {Interface Command} {ip ospf priority <0-255>} {}
-@deffnx {Interface Command} {no ip ospf priority} {}
-Set RouterPriority integer value.  The router with the highest priority
-will be more eligible to become Designated Router.  Setting the value
-to 0, makes the router ineligible to become Designated Router. The
-default value is 1.
-@end deffn
-
-@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
-@deffnx {Interface Command} {no ip ospf retransmit interval} {}
-Set number of seconds for RxmtInterval timer value.  This value is used
-when retransmitting Database Description and Link State Request packets.
-The default value is 5 seconds.
-@end deffn
-
-@deffn {Interface Command} {ip ospf transmit-delay} {}
-@deffnx {Interface Command} {no ip ospf transmit-delay} {}
-Set number of seconds for InfTransDelay value.  LSAs' age should be 
-incremented by this value when transmitting.
-The default value is 1 seconds.
-@end deffn
-
-@deffn {Interface Command} {ip ospf area (A.B.C.D|<0-4294967295>)} {}
-@deffnx {Interface Command} {no ip ospf area} {}
-Enable ospf on an interface and set associated area.
-@end deffn
-
-@node Redistribute routes to OSPF
-@section Redistribute routes to OSPF
-
-@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
-@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
-@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
-@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
-@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
-@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
-@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
-@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
-@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
-@anchor{OSPF redistribute}Redistribute routes of the specified protocol
-or kind into OSPF, with the metric type and metric set if specified,
-filtering the routes using the given route-map if specified.
-Redistributed routes may also be filtered with distribute-lists, see
-@ref{ospf distribute-list}.
-
-Redistributed routes are distributed as into OSPF as Type-5 External
-LSAs into links to areas that accept external routes, Type-7 External LSAs
-for NSSA areas and are not redistributed at all into Stub areas, where
-external routes are not permitted.
-
-Note that for connected routes, one may instead use
-@dfn{passive-interface}, see @ref{OSPF passive-interface}.
-@end deffn
-
-@deffn {OSPF Command} {default-information originate} {}
-@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
-@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
-@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
-@deffnx {OSPF Command} {default-information originate always} {}
-@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
-@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
-@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
-@deffnx {OSPF Command} {no default-information originate} {}
-Originate an AS-External (type-5) LSA describing a default route into
-all external-routing capable areas, of the specified metric and metric
-type. If the 'always' keyword is given then the default is always
-advertised, even when there is no default present in the routing table.
-@end deffn
-
-@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
-@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
-@anchor{ospf distribute-list}Apply the access-list filter, NAME, to
-redistributed routes of the given type before allowing the routes to
-redistributed into OSPF (@pxref{OSPF redistribute}).
-@end deffn
-
-@deffn {OSPF Command} {default-metric <0-16777214>} {}
-@deffnx {OSPF Command} {no default-metric} {}
-@end deffn
-
-@deffn {OSPF Command} {distance <1-255>} {}
-@deffnx {OSPF Command} {no distance <1-255>} {}
-@end deffn
-
-@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
-@deffnx {OSPF Command} {no distance ospf} {}
-@end deffn
-
-@deffn {Command} {router zebra} {}
-@deffnx {Command} {no router zebra} {}
-@end deffn
-
-@node Showing OSPF information
-@section Showing OSPF information
-
-@deffn {Command} {show ip ospf} {}
-@anchor{show ip ospf}Show information on a variety of general OSPF and
-area state and configuration information.
-@end deffn
-
-@deffn {Command} {show ip ospf interface [INTERFACE]} {}
-Show state and configuration of OSPF the specified interface, or all
-interfaces if no interface is given.
-@end deffn
-
-@deffn {Command} {show ip ospf neighbor} {}
-@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
-@deffnx {Command} {show ip ospf neighbor detail} {}
-@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
-@end deffn
-
-@deffn {Command} {show ip ospf database} {}
-@end deffn
-
-@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
-@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
-@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
-@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
-@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
-@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
-@end deffn
-
-@deffn {Command} {show ip ospf database max-age} {}
-@end deffn
-
-@deffn {Command} {show ip ospf database self-originate} {}
-@end deffn
-
-@deffn {Command} {show ip ospf route} {}
-Show the OSPF routing table, as determined by the most recent SPF calculation.
-@end deffn
-
-@node Opaque LSA
-@section Opaque LSA
-
-@deffn {OSPF Command} {ospf opaque-lsa} {}
-@deffnx {OSPF Command} {capability opaque} {}
-@deffnx {OSPF Command} {no ospf opaque-lsa} {}
-@deffnx {OSPF Command} {no capability opaque} {}
-@command{ospfd} support Opaque LSA (RFC2370) as fondment for MPLS Traffic Engineering LSA. Prior to used MPLS TE, opaque-lsa must be enable in the configuration file. Alternate command could be "mpls-te on" (@ref{OSPF Traffic Engineering}).
-@end deffn
-
-@deffn {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external)} {}
-@deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id}} {}
-@deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id} adv-router @var{adv-router}} {}
-@deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router @var{adv-router}} {}
-@deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id} self-originate} {}
-@deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate} {}
-Show Opaque LSA from the database.
-@end deffn
-
-@node OSPF Traffic Engineering
-@section Traffic Engineering
-
-@deffn {OSPF Command} {mpls-te on} {}
-@deffnx {OSPF Command} {no mpls-te} {}
-Enable Traffic Engineering LSA flooding.
-@end deffn
-
-@deffn {OSPF Command} {mpls-te router-address <A.B.C.D>} {}
-@deffnx {OSPF Command} {no mpls-te} {}
-Configure stable IP address for MPLS-TE. This IP address is then advertise in Opaque LSA Type-10 TLV=1 (TE)
-option 1 (Router-Address).
-@end deffn
-
-@deffn {OSPF Command} {mpls-te inter-as area <area-id>|as} {}
-@deffnx {OSPF Command} {no mpls-te inter-as} {}
-Enable RFC5392 suuport - Inter-AS TE v2 - to flood Traffic Engineering parameters of Inter-AS link.
-2 modes are supported: AREA and AS; LSA are flood in AREA <area-id> with Opaque Type-10,
-respectively in AS with Opaque Type-11. In all case, Opaque-LSA TLV=6.
-@end deffn
-
-@deffn {Command} {show ip ospf mpls-te interface} {}
-@deffnx {Command} {show ip ospf mpls-te interface @var{interface}} {}
-Show MPLS Traffic Engineering parameters for all or specified interface.
-@end deffn
-
-@deffn {Command} {show ip ospf mpls-te router} {}
-Show Traffic Engineering router parameters.
-@end deffn
-
-@node Router Information
-@section Router Information
-
-@deffn {OSPF Command} {router-info [as | area <A.B.C.D>]} {}
-@deffnx {OSPF Command} {no router-info} {}
-Enable Router Information (RFC4970) LSA advertisement with AS scope (default) or Area scope flooding
-when area is specified.
-@end deffn
-
-@deffn {OSPF Command} {pce address <A.B.C.D>} {}
-@deffnx {OSPF Command} {no pce address} {}
-@deffnx {OSPF Command} {pce domain as <0-65535>} {}
-@deffnx {OSPF Command} {no pce domain as <0-65535>} {}
-@deffnx {OSPF Command} {pce neighbor as <0-65535>} {}
-@deffnx {OSPF Command} {no pce neighbor as <0-65535>} {}
-@deffnx {OSPF Command} {pce flag BITPATTERN} {}
-@deffnx {OSPF Command} {no pce flag} {}
-@deffnx {OSPF Command} {pce scope BITPATTERN} {}
-@deffnx {OSPF Command} {no pce scope} {}
-The commands are conform to RFC 5088 and allow OSPF router announce Path Compuatation Elemenent (PCE) capabilities
-through the Router Information (RI) LSA. Router Information must be enable prior to this. The command set/unset
-respectively the PCE IP adress, Autonomous System (AS) numbers of controlled domains, neighbor ASs, flag and scope.
-For flag and scope, please refer to RFC5088 for the BITPATTERN recognition. Multiple 'pce neighbor' command could
-be specified in order to specify all PCE neighbours.
-@end deffn
-
-@deffn {Command} {show ip ospf router-info} {}
-Show Router Capabilities flag.
-@end deffn
-@deffn {Command} {show ip ospf router-info pce} {}
-Show Router Capabilities PCE parameters.
-@end deffn
-
-@node Segment Routing
-@section Segment Routing
-
-This is an EXPERIMENTAL support of Segment Routing as per draft
- draft-ietf-ospf-segment-routing-extensions-24.txt for MPLS dataplane.
-
-@deffn {OSPF Command} {segment-routing on} {}
-@deffnx {OSPF Command} {no segment-routing} {}
-Enable Segment Routing. Even if this also activate routing information support,
-it is preferable to also activate routing information, and set accordingly the
-Area or AS flooding.
-@end deffn
-
-@deffn {OSPF Command} {segment-routing global-block (0-1048575) (0-1048575)} {}
-@deffnx {OSPF Command} {no segment-routing global-block} {}
-Fix the Segment Routing Global Block i.e. the label range used by MPLS to store
-label in the MPLS FIB.
-@end deffn
-
-@deffn {OSPF Command} {segment-routing node-msd (1-16)} {}
-@deffnx {OSPF Command} {no segment-routing node-msd} {}
-Fix the Maximum Stack Depth supported by the router. The value depend of the
-MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32.
-@end deffn
-
-@deffn {OSPF Command} {segment-routing prefix A.B.C.D/M index (0-65535)} {}
-@deffnx {OSPF Command} {segment-routing prefix A.B.C.D/M index (0-65535) no-php-flag} {}
-@deffnx {OSPF Command} {no segment-routing prefix A.B.C.D/M} {}
-Set the Segment Rounting index for the specifyed prefix. Note
-that, only prefix with /32 corresponding to a loopback interface are
-currently supported. The 'no-php-flag' means NO Penultimate Hop Popping that
-allows SR node to request to its neighbor to not pop the label.
-@end deffn
-
-@deffn {Command} {show ip ospf database segment-routing [json]} {}
-@deffnx {Command} {show ip ospf database segment-routing adv-router @var{adv-router} [json]} {}
-@deffnx {Command} {show ip ospf database segment-routing self-originate [json]} {}
-Show Segment Routing Data Base, all SR nodes, specific advertized router or self router.
-Optional Json output could be obtain by adding 'json' at the end of the command.
-@end deffn
-
-@node Debugging OSPF
-@section Debugging OSPF
-
-@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
-@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
-Dump Packet for debugging
-@end deffn
-
-@deffn {Command} {debug ospf ism} {}
-@deffnx {Command} {debug ospf ism (status|events|timers)} {}
-@deffnx {Command} {no debug ospf ism} {}
-@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
-Show debug information of Interface State Machine
-@end deffn
-
-@deffn {Command} {debug ospf nsm} {}
-@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
-@deffnx {Command} {no debug ospf nsm} {}
-@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
-Show debug information of Network State Machine
-@end deffn
-
-@deffn {Command} {debug ospf event} {}
-@deffnx {Command} {no debug ospf event} {}
-Show debug information of OSPF event
-@end deffn
-
-@deffn {Command} {debug ospf nssa} {}
-@deffnx {Command} {no debug ospf nssa} {}
-Show debug information about Not So Stub Area
-@end deffn
-
-@deffn {Command} {debug ospf lsa} {}
-@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
-@deffnx {Command} {no debug ospf lsa} {}
-@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
-Show debug detail of Link State messages
-@end deffn
-
-@deffn {Command} {debug ospf te} {}
-@deffnx {Command} {no debug ospf te} {}
-Show debug information about Traffic Engineering LSA
-@end deffn
-
-@deffn {Command} {debug ospf zebra} {}
-@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
-@deffnx {Command} {no debug ospf zebra} {}
-@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
-Show debug information of ZEBRA API
-@end deffn
-
-@deffn {Command} {show debugging ospf} {}
-@end deffn
-
-@node OSPF Configuration Examples
-@section OSPF Configuration Examples
-A simple example, with MD5 authentication enabled:
-
-@example
-@group
-!
-interface bge0
- ip ospf authentication message-digest
- ip ospf message-digest-key 1 md5 ABCDEFGHIJK
-!
-router ospf
- network 192.168.0.0/16 area 0.0.0.1
- area 0.0.0.1 authentication message-digest
-@end group
-@end example
-
-An @acronym{ABR} router, with MD5 authentication and performing summarisation
-of networks between the areas:
-
-@example
-@group
-!
-password ABCDEF
-log file /var/log/frr/ospfd.log
-service advanced-vty
-!
-interface eth0
- ip ospf authentication message-digest
- ip ospf message-digest-key 1 md5 ABCDEFGHIJK
-!
-interface ppp0
-!
-interface br0
- ip ospf authentication message-digest
- ip ospf message-digest-key 2 md5 XYZ12345
-!
-router ospf
- ospf router-id 192.168.0.1
- redistribute connected
- passive interface ppp0
- network 192.168.0.0/24 area 0.0.0.0
- network 10.0.0.0/16 area 0.0.0.0
- network 192.168.1.0/24 area 0.0.0.1
- area 0.0.0.0 authentication message-digest
- area 0.0.0.0 range 10.0.0.0/16
- area 0.0.0.0 range 192.168.0.0/24
- area 0.0.0.1 authentication message-digest
- area 0.0.0.1 range 10.2.0.0/16
-!
-@end group
-@end example
-
-A Traffic Engineering configuration, with Inter-ASv2 support.
-
- - First, the 'zebra.conf' part:
-
-@example
-@group
-hostname HOSTNAME
-password PASSWORD
-log file /var/log/zebra.log
-!
-interface eth0
- ip address 198.168.1.1/24
- link-params
-  enable
-  admin-grp 0xa1
-  metric 100
-  max-bw 1.25e+07
-  max-rsv-bw 1.25e+06
-  unrsv-bw 0 1.25e+06
-  unrsv-bw 1 1.25e+06
-  unrsv-bw 2 1.25e+06
-  unrsv-bw 3 1.25e+06
-  unrsv-bw 4 1.25e+06
-  unrsv-bw 5 1.25e+06
-  unrsv-bw 6 1.25e+06
-  unrsv-bw 7 1.25e+06
-!
-interface eth1
- ip address 192.168.2.1/24
- link-params
-  enable
-  metric 10
-  max-bw 1.25e+07
-  max-rsv-bw 1.25e+06
-  unrsv-bw 0 1.25e+06
-  unrsv-bw 1 1.25e+06
-  unrsv-bw 2 1.25e+06
-  unrsv-bw 3 1.25e+06
-  unrsv-bw 4 1.25e+06
-  unrsv-bw 5 1.25e+06
-  unrsv-bw 6 1.25e+06
-  unrsv-bw 7 1.25e+06
-  neighbor 192.168.2.2 as 65000
-@end group
-@end example
-
- - Then the 'ospfd.conf' itself:
-
-@example
-@group
-hostname HOSTNAME
-password PASSWORD
-log file /var/log/ospfd.log
-!
-!
-interface eth0
- ip ospf hello-interval 60
- ip ospf dead-interval 240
-!
-interface eth1
- ip ospf hello-interval 60
- ip ospf dead-interval 240
-!
-!
-router ospf
- ospf router-id 192.168.1.1
- network 192.168.0.0/16 area 1
- ospf opaque-lsa
-  mpls-te
-  mpls-te router-address 192.168.1.1
-  mpls-te inter-as area 1
-!
-line vty
-@end group
-@end example
-
-A router information example with PCE advsertisement:
-
-@example
-@group
-!
-router ospf
- ospf router-id 192.168.1.1
- network 192.168.0.0/16 area 1
- capability opaque
-  mpls-te
-  mpls-te router-address 192.168.1.1
- router-info area 0.0.0.1
-  pce address 192.168.1.1
-  pce flag 0x80
-  pce domain as 65400
-  pce neighbor as 65500
-  pce neighbor as 65200
-  pce scope 0x80
-!
-@end group
-@end example
diff --git a/doc/overview.texi b/doc/overview.texi
deleted file mode 100644 (file)
index c988e21..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-@node Overview
-@chapter Overview
-@cindex Overview
-
-  @uref{@value{PACKAGE_URL},,Frr} is a routing software package that
-provides TCP/IP based routing services with routing protocols support such
-as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, IS-IS, BGP-4, and BGP-4+ (@pxref{Supported
-RFCs}). Frr also supports special BGP Route Reflector and Route Server
-behavior.  In addition to traditional IPv4 routing protocols, Frr also
-supports IPv6 routing protocols.  With SNMP daemon which supports SMUX and AgentX
-protocol, Frr provides routing protocol MIBs (@pxref{SNMP Support}).
-
-  Frr uses an advanced software architecture to provide you with a high
-quality, multi server routing engine. Frr has an interactive user
-interface for each routing protocol and supports common client commands. 
-Due to this design, you can add new protocol daemons to Frr easily.  You
-can use Frr library as your program's client user interface.
-
-  Frr is distributed under the @sc{gnu} General Public License.
-
-@menu
-* About Frr::                Basic information about Frr
-* System Architecture::         The Frr system architecture
-* Supported Platforms::         Supported platforms and future plans
-* Supported RFCs::               Supported RFCs
-* How to get Frr::            
-* Mailing List::                Mailing list information
-* Bug Reports::                 Mail address for bug data
-@end menu
-
-@node About Frr
-@comment  node-name,  next,  previous,  up
-@section About Frr
-@cindex About Frr
-
-  Today, TCP/IP networks are covering all of the world.  The Internet has
-been deployed in many countries, companies, and to the home.  When you
-connect to the Internet your packet will pass many routers which have TCP/IP
-routing functionality.
-
-  A system with Frr installed acts as a dedicated router.  With Frr,
-your machine exchanges routing information with other routers using routing
-protocols.  Frr uses this information to update the kernel routing table
-so that the right data goes to the right place.  You can dynamically change
-the configuration and you may view routing table information from the Frr
-terminal interface.
-
-  Adding to routing protocol support, Frr can setup interface's flags,
-interface's address, static routes and so on.  If you have a small network,
-or a stub network, or xDSL connection, configuring the Frr routing
-software is very easy.  The only thing you have to do is to set up the
-interfaces and put a few commands about static routes and/or default routes. 
-If the network is rather large, or if the network structure changes
-frequently, you will want to take advantage of Frr's dynamic routing
-protocol support for protocols such as RIP, OSPF, IS-IS or BGP.
-
-  Traditionally, UNIX based router configuration is done by
-@command{ifconfig} and @command{route} commands.  Status of routing
-table is displayed by @command{netstat} utility.  Almost of these commands
-work only if the user has root privileges.  Frr has a different system
-administration method.  There are two user modes in Frr.  One is normal
-mode, the other is enable mode.  Normal mode user can only view system
-status, enable mode user can change system configuration.  This UNIX account
-independent feature will be great help to the router administrator.
-
-  Currently, Frr supports common unicast routing protocols, that is BGP,
-OSPF, RIP and IS-IS.  Upcoming for MPLS support, an implementation of LDP is
-currently being prepared for merging.  Implementations of BFD and PIM-SSM
-(IPv4) also exist, but are not actively being worked on.
-
-  The ultimate goal of the Frr project is making a productive, quality, free
-TCP/IP routing software package.
-
-@node System Architecture
-@comment  node-name,  next,  previous,  up
-@section System Architecture
-@cindex System architecture
-@cindex Software architecture
-@cindex Software internals
-
-  Traditional routing software is made as a one process program which
-provides all of the routing protocol functionalities.  Frr takes a
-different approach.  It is made from a collection of several daemons that
-work together to build the routing table.  There may be several
-protocol-specific routing daemons and zebra the kernel routing manager.
-
-  The @command{ripd} daemon handles the RIP protocol, while
-@command{ospfd} is a daemon which supports OSPF version 2.
-@command{bgpd} supports the BGP-4 protocol.  For changing the kernel
-routing table and for redistribution of routes between different routing
-protocols, there is a kernel routing table manager @command{zebra} daemon. 
-It is easy to add a new routing protocol daemons to the entire routing
-system without affecting any other software.  You need to run only the
-protocol daemon associated with routing protocols in use.  Thus, user may
-run a specific daemon and send routing reports to a central routing console.
-
-  There is no need for these daemons to be running on the same machine. You
-can even run several same protocol daemons on the same machine.  This
-architecture creates new possibilities for the routing system.
-
-@example
-@group
-+----+  +----+  +-----+  +-----+
-|bgpd|  |ripd|  |ospfd|  |zebra|
-+----+  +----+  +-----+  +-----+
-                            |
-+---------------------------|--+
-|                           v  |
-|  UNIX Kernel  routing table  |
-|                              |
-+------------------------------+
-
-    Frr System Architecture
-@end group
-@end example
-
-Multi-process architecture brings extensibility, modularity and
-maintainability.  At the same time it also brings many configuration files
-and terminal interfaces.  Each daemon has it's own configuration file and
-terminal interface.  When you configure a static route, it must be done in
-@command{zebra} configuration file.  When you configure BGP network it must
-be done in @command{bgpd} configuration file.  This can be a very annoying
-thing.  To resolve the problem, Frr provides integrated user interface
-shell called @command{vtysh}.  @command{vtysh} connects to each daemon with
-UNIX domain socket and then works as a proxy for user input.
-
-Frr was planned to use multi-threaded mechanism when it runs with a
-kernel that supports multi-threads.  But at the moment, the thread library
-which comes with @sc{gnu}/Linux or FreeBSD has some problems with running
-reliable services such as routing software, so we don't use threads at all. 
-Instead we use the @command{select(2)} system call for multiplexing the
-events.
-
-@node Supported Platforms
-@comment  node-name,  next,  previous,  up
-@section Supported Platforms
-
-@cindex Supported platforms
-@cindex Frr on other systems
-@cindex Compatibility with other systems
-@cindex Operating systems that support Frr
-
-Currently Frr supports @sc{gnu}/Linux and BSD. Porting Frr
-to other platforms is not too difficult as platform dependent code should
-most be limited to the @command{zebra} daemon.  Protocol daemons are mostly
-platform independent. Please let us know when you find out Frr runs on a
-platform which is not listed below.
-
-The list of officially supported platforms are listed below. Note that
-Frr may run correctly on other platforms, and may run with partial
-functionality on further platforms.
-
-@sp 1
-@itemize @bullet
-@item
-@sc{gnu}/Linux
-@item
-FreeBSD
-@item
-NetBSD
-@item
-OpenBSD
-@end itemize
-
-Versions of these platforms that are older than around 2 years from the point
-of their original release (in case of @sc{gnu}/Linux, this is since the kernel's
-release on kernel.org) may need some work.  Similarly, the following platforms
-may work with some effort:
-
-@sp 1
-@itemize @bullet
-@item
-Solaris
-@item
-Mac OSX
-@end itemize
-
-Also note that, in particular regarding proprietary platforms, compiler
-and C library choice will affect Frr.  Only recent versions of the
-following C compilers are well-tested:
-
-@sp 1
-@itemize @bullet
-@item
-@sc{gnu}'s GCC
-@item
-LLVM's clang
-@item
-Intel's ICC
-@end itemize
-
-@node Supported RFCs
-@comment  node-name,  next,  previous,  up
-@section Supported RFCs
-
-  Below is the list of currently supported RFC's.
-
-@table @asis
-@item @asis{RFC1058}
-@cite{Routing Information Protocol. C.L. Hedrick. Jun-01-1988.}
-
-@item @asis{RF2082}
-@cite{RIP-2 MD5 Authentication. F. Baker, R. Atkinson. January 1997.}
-
-@item @asis{RFC2453}
-@cite{RIP Version 2. G. Malkin. November 1998.}
-
-@item @asis{RFC2080}
-@cite{RIPng for IPv6. G. Malkin, R. Minnear. January 1997.}
-
-@item @asis{RFC2328}
-@cite{OSPF Version 2. J. Moy. April 1998.}
-
-@item @asis{RFC2370}
-@cite{The OSPF Opaque LSA Option R. Coltun. July 1998.}
-
-@item @asis{RFC3101}
-@cite{The OSPF Not-So-Stubby Area (NSSA) Option P. Murphy. January 2003.}
-
-@item @asis{RFC2740}
-@cite{OSPF for IPv6. R. Coltun, D. Ferguson, J. Moy. December 1999.}
-
-@item @asis{RFC1771} 
-@cite{A Border Gateway Protocol 4 (BGP-4). Y. Rekhter & T. Li. March 1995.}
-
-@item @asis{RFC1965}
-@cite{Autonomous System Confederations for BGP. P. Traina. June 1996.}
-
-@item @asis{RFC1997}
-@cite{BGP Communities Attribute. R. Chandra, P. Traina & T. Li. August 1996.}
-
-@item @asis{RFC2545}
-@cite{Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing. P. Marques, F. Dupont. March 1999.}
-
-@item @asis{RFC2796}
-@cite{BGP Route Reflection An alternative to full mesh IBGP. T. Bates & R. Chandrasekeran. June 1996.}
-
-@item @asis{RFC2858}
-@cite{Multiprotocol Extensions for BGP-4. T. Bates, Y. Rekhter, R. Chandra, D. Katz. June 2000.}
-
-@item @asis{RFC2842}
-@cite{Capabilities Advertisement with BGP-4. R. Chandra, J. Scudder. May 2000.}
-
-@item @asis{RFC3137}
-@cite{OSPF Stub Router Advertisement, A. Retana, L. Nguyen, R. White, A. Zinin, D. McPherson. June 2001}
-@end table
-
-  When SNMP support is enabled, below RFC is also supported.
-
-@table @asis
-
-@item @asis{RFC1227}
-@cite{SNMP MUX protocol and MIB. M.T. Rose. May-01-1991.}
-
-@item @asis{RFC1657}
-@cite{Definitions of Managed Objects for the Fourth Version of the
-Border Gateway Protocol (BGP-4) using SMIv2. S. Willis, J. Burruss,
-J. Chu, Editor. July 1994.}
-
-@item @asis{RFC1724}
-@cite{RIP Version 2 MIB Extension. G. Malkin & F. Baker. November 1994.}
-
-@item @asis{RFC1850}
-@cite{OSPF Version 2 Management Information Base. F. Baker, R. Coltun.
-November 1995.}
-
-@item @asis{RFC2741}
-@cite{Agent Extensibility (AgentX) Protocol. M. Daniele, B. Wijnen. January 2000.}
-
-@end table
-
-@node How to get Frr
-@comment  node-name,  next,  previous,  up
-@section How to get Frr
-
-The official Frr web-site is located at:
-
-@uref{@value{PACKAGE_URL}}
-
-and contains further information, as well as links to additional
-resources. 
-
-@uref{@value{PACKAGE_URL},Frr} is a fork of Quagga, whose
-web-site is located at:
-
-@uref{http://www.quagga.net/}.
-
-@node Mailing List
-@comment  node-name,  next,  previous,  up
-@section Mailing List
-@cindex How to get in touch with Frr
-@cindex Mailing Frr
-@cindex Contact information
-@cindex Mailing lists
-
-There is a mailing list for discussions about Frr.  If you have any
-comments or suggestions to Frr, please subscribe to:
-
-@uref{https://lists.frrouting.org/listinfo/frog}.
-
-The @uref{@value{PACKAGE_URL},,Frr} site has further information on
-the available mailing lists, see:
-
-       @uref{https://lists.frrouting.org/}
-
-@node Bug Reports
-@section Bug Reports
-
-@cindex Bug Reports
-@cindex Bug hunting
-@cindex Found a bug?
-@cindex Reporting bugs
-@cindex Reporting software errors
-@cindex Errors in the software
-
-If you think you have found a bug, please send a bug report to:
-
-@uref{http://github.com/frrouting/frr/issues}
-
-When you send a bug report, please be careful about the points below.
-
-@itemize @bullet
-@item 
-Please note what kind of OS you are using.  If you use the IPv6 stack
-please note that as well.
-@item
-Please show us the results of @code{netstat -rn} and @code{ifconfig -a}.
-Information from zebra's VTY command @code{show ip route} will also be
-helpful.
-@item
-Please send your configuration file with the report.  If you specify
-arguments to the configure script please note that too.
-@end itemize
-
-  Bug reports are very important for us to improve the quality of Frr.
-Frr is still in the development stage, but please don't hesitate to
-send a bug report to @uref{http://github.com/frrouting/frr/issues}.
diff --git a/doc/pimd.8.in b/doc/pimd.8.in
deleted file mode 100644 (file)
index 6db3418..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-.TH PIM 8 "10 December 2008" "@PACKAGE_FULLNAME@ PIM daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-pimd \- a PIM routing for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B pimd
-[
-.B \-dhvZ
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-z
-.I path
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B pimd
-is a protocol-independent multicast component that works with the
-.B @PACKAGE_FULLNAME@
-Routing Suite.
-.SH OPTIONS
-Options available for the
-.B pimd
-command:
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR 
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/pimd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When pimd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart pimd.  The default is \fB\fI@CFG_STATE@/pimd.pid\fR.
-.TP
-\fB\-z\fR, \fB\-\-socket \fR\fIpath\fR
-Specify the socket path for contacting the zebra daemon.
-The default is \fB\fI@CFG_STATE@/zserv.api\fR.  The value of this option
-must be the same as the one given when starting zebra.  Refer to the \fBzebra
-(8)\fR man page for more information.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the pimd VTY will listen on. This defaults to
-2611, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the pimd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-There are currently no such modules for
-\fBpimd\fR in the base package.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.TP
-\fB\-Z\fR, \fB\-\-debug_zclient\fR
-Enable logging information for zclient debugging.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/pimd
-The default location of the 
-.B pimd
-binary.
-.TP
-.BI @CFG_SYSCONF@/pimd.conf
-The default location of the 
-.B pimd
-config file.
-.TP
-.BI @CFG_STATE@/pimd.pid
-The default location of the 
-.B pimd
-pid file.
-.TP
-.BI @CFG_STATE@/zserv.api
-The default location of the 
-.B zebra
-unix socket file.
-.TP
-.BI $(PWD)/pimd.log 
-If the 
-.B pimd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBpimd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options.
-.SH DIAGNOSTICS
-The pimd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs.
-.SH "SEE ALSO"
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-\fBpimd\fR is in early development at the moment and is not ready for
-production use.
-
-.B pimd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI https://github.com/udhos/qpimd
-.SH AUTHORS
-See
-.BI https://github.com/udhos/qpimd
-for an accurate list of authors.
-
diff --git a/doc/pimd.texi b/doc/pimd.texi
deleted file mode 100644 (file)
index 30e85af..0000000
+++ /dev/null
@@ -1,366 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the Frr Manual.
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-@node PIM
-@chapter PIM
-
-PIM -- Protocol Independent Multicast
-
-@command{pimd} supports pim-sm as well as igmp v2 and v3.  pim is
-vrf aware and can work within the context of vrf's in order to
-do S,G mrouting.
-
-@menu
-* Starting and Stopping pimd::
-* PIM Configuration::
-* PIM Interface Configuration::
-* PIM Multicast RIB insertion::
-* Show PIM Information::
-* PIM Debug Commands::
-@end menu
-
-@node Starting and Stopping pimd
-@section Starting and Stopping pimd
-
-The default configuration file name of @command{pimd}'s is
-@file{pimd.conf}.  When invocation @command{pimd} searches directory
-@value{INSTALL_PREFIX_ETC}.  If @file{pimd.conf} is not there
-then next search current directory.
-
-@command{pimd} requires zebra for proper operation.  Additionally
-@command{pimd} depends on routing properly setup and working
-in the network that it is working on.
-
-@example
-@group
-# zebra -d
-# pimd -d
-@end group
-@end example
-
-Please note that @command{zebra} must be invoked before @command{pimd}.
-
-To stop @command{pimd}.  Please use @command{kill `cat
-/var/run/pimd.pid`}.  Certain signals have special meanings to @command{pimd}.
-
-@table @samp
-@item SIGUSR1
-Rotate @command{pimd} logfile.
-@item SIGINT
-@itemx SIGTERM
-@command{pimd} sweeps all installed PIM mroutes then terminates properly.
-@end table
-
-@command{pimd} invocation options.  Common options that can be specified
-(@pxref{Common Invocation Options}).
-
-@node PIM Configuration
-
-@deffn Command {ip pim rp A.B.C.D A.B.C.D/M} {}
-In order to use pim, it is necessary to configure a RP for join
-messages to be sent to.  Currently the only methodology to
-do this is via static rp commands.  All routers in the
-pim network must agree on these values.  The first ip address
-is the RP's address and the second value is the matching
-prefix of group ranges covered.  This command is vrf aware,
-to configure for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim spt-switchover infinity-and-beyond} {}
-On the last hop router if it is desired to not switch over
-to the SPT tree. Configure this command.  This command is
-vrf aware, to configure for a vrf, enter the vrf submode.
-#end deffn
-
-@deffn Comand {ip pim ecmp} {}
-If pim has the a choice of ECMP nexthops for a particular
-RPF, pim will cause S,G flows to be spread out amongst
-the nexthops.  If this command is not specified then
-the first nexthop found will be used.  This command
-is vrf aware, to configure for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim ecmp rebalance} {}
-If pim is using ECMP and an interface goes down, cause
-pim to rebalance all S,G flows aross the remaining
-nexthops.  If this command is not configured pim only
-modifies those S,G flows that were using the interface
-that went down.  This command is vrf aware, to configure
-for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim join-prune-interval (60-600)} {}
-Modify the join/prune interval that pim uses to the
-new value.  Time is specified in seconds.  This command
-is vrf aware, to configure for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim keep-alive-timer (31-60000)} {}
-Modify the time out value for a S,G flow from 31-60000
-seconds.  31 seconds is choosen for a lower bound
-because some hardware platforms cannot see data flowing
-in better than 30 second chunks.  This comand is vrf
-aware, to configure for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim packets (1-100)} {}
-When processing packets from a neighbor process the
-number of packets incoming at one time before moving
-on to the next task.  The default value is 3 packets.
-This command is only useful at scale when you can
-possibly have a large number of pim control packets
-flowing.  This command is vrf aware, to configure for
-a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim register-suppress-time (5-60000)} {}
-Modify the time that pim will register suppress a FHR
-will send register notifications to the kernel.  This command
-is vrf aware, to configure for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim send-v6-secondary} {}
-When sending pim hello packets tell pim to send
-any v6 secondary addresses on the interface.  This
-information is used to allow pim to use v6 nexthops
-in it's decision for RPF lookup.  This command
-is vrf aware, to configure for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip pim ssm prefix-list WORD} {}
-Specify a range of group addresses via a prefix-list
-that forces pim to never do SM over.  This command
-is vrf aware, to configure for a vrf, enter the vrf submode.
-@end deffn
-
-@deffn Command {ip multicast rpf-lookup-mode WORD} {}
-Modify how PIM does RPF lookups in the zebra routing table.
-You can use these choices:
-@table @lookup_modes
-@item longer-prefix
-Lookup the RPF in both tables using the longer prefix as a match
-@item lower-distance
-Lookup the RPF in both tables using the lower distance as a match
-@item mrib-only
-Lookup in the Multicast RIB only
-@item mrib-then-urib
-Lookup in the Multicast RIB then the Unicast Rib, returning first found.
-This is the default value for lookup if this command is not entered
-@item urib-only
-Lookup in the Unicast Rib only.
-@end table
-@end deffn
-
-@node PIM Interface Configuration
-@section PIM Interface Configuration
-
-PIM interface commands allow you to configure an
-interface as either a Receiver or a interface
-that you would like to form pim neighbors on.  If the
-interface is in a vrf, enter the interface command with
-the vrf keyword at the end.
-
-@deffn {PIM Interface Command] {ip pim bfd} {}
-Turns on BFD support for PIM for this interface.
-@end deffn
-
-@deffn {PIM Interface Command} {ip pim drpriority (1-4294967295)} {}
-Set the DR Priority for the interface.  This command is useful
-to allow the user to influence what node becomes the DR for a
-lan segment.
-@end deffn
-
-@deffn {PIM Interface Command} {ip pim hello (1-180) (1-180)} {}
-Set the pim hello and hold interval for a interface.
-@end deffn
-
-@deffn {PIM Interface Command} {ip pim sm} {}
-Tell pim that we would like to use this interface to form
-pim neighbors over.  Please note we will *not* accept
-igmp reports over this interface with this command.
-@end deffn
-
-@deffn {PIM Interface Command} {ip igmp} {}
-Tell pim to receive IGMP reports and Query on this
-interface.  The default version is v3.  This command
-is useful on the LHR.
-@end deffn
-
-@deffn {PIM Interface Command} {ip igmp query-interval (1-1800)} {}
-Set the IGMP query interval that PIM will use.
-@end deffn
-
-@deffn {PIM Interface Command} {ip igmp query-max-response-time (10-250)} {}
-Set the IGMP query response timeout value.  If an report is not returned
-in the specified time we will assume the S,G or *,G has timed out.
-@end deffn
-
-@deffn {PIM Interface Command} {ip igmp version (2-3)} {}
-Set the IGMP version used on this interface.  The default value
-is 3.
-@end deffn
-
-@deffn {PIM Interface Command} {ip multicat boundary oil WORD} {}
-Set a pim multicast boundary, based upon the WORD prefix-list.  If
-a pim join or IGMP report is received on this interface and the Group
-is denyed by the prefix-list, PIM will ignore the join or report.
-@end deffn
-
-@node PIM Multicast RIB insertion::
-@section PIM Multicast RIB insertion::
-
-In order to influence Multicast RPF lookup, it is possible to insert
-into zebra routes for the Multicast RIB.  These routes are only
-used for RPF lookup and will not be used by zebra for insertion
-into the kernel *or* for normal rib processing.  As such it is
-possible to create weird states with these commands.  Use with
-caution.  Most of the time this will not be necessary.
-
-@deffn {PIM Multicast RIB insertion} {ip mroute A.B.C.D/M A.B.C.D (1-255)} {}
-Insert into the Multicast Rib Route A.B.C.D/M with specified nexthop.  The distance can be specified as well if desired.
-@end deffn
-
-@deffn {PIM Multicast RIB insertion} {ip mroute A.B.C.D/M INTERFACE (1-255)} {}
-Insert into the Multicast Rib Route A.B.C.D/M using the specified INTERFACE.
-The distance can be specified as well if desired.
-@end deffn
-
-@node Show PIM Information::
-@section Show PIM Information
-
-All PIM show commands are vrf aware and typically allow you to insert
-a specified vrf command if information is desired about a specific vrf.
-If no vrf is specified then the default vrf is assumed.  Finally
-the special keyword 'all' allows you to look at all vrfs for the command.
-Naming a vrf 'all' will cause great confusion.
-
-@deffn {Show PIM Information} {show ip multicast}
-Display various information about the interfaces used in this pim
-instance.
-@end deffn
-
-@deffn {Show PIM Information} {show ip mroute}
-Display information about installed into the kernel S,G mroutes.
-@end deffn
-
-@deffn {Show PIM Information} {show ip mroute count}
-Display information about installed into the kernel S,G mroutes
-and in addition display data about packet flow for the mroutes.
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim assert}
-Display information about asserts in the PIM system for S,G mroutes.
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim assert-internal}
-Display internal assert state for S,G mroutes
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim assert-metric}
-Display metric information about assert state for S,G mroutes
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim assert-winner-metric}
-Display winner metric for assert state for S,G mroutes
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim group-type}
-Display SSM group ranges
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim interface}
-Display information about interfaces PIM is using.
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim join}
-Display information about PIM joins received.
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim local-membership} {}
-Display information about PIM interface local-membership
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim neighbor} {}
-Display information about PIM neighbors
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim nexthop} {}
-Display information about pim nexthops that are being
-used
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim nexthop-lookup} {}
-Display information about a S,G pair and how the RPF would
-be choosen.  This is especially useful if there are ECMP's
-available from the RPF lookup.
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim rp-info} {}
-Display information about RP's that are configured on
-this router
-@end deffn
-
-@deffn {Show PIM Information} {show ip pim rpf} {}
-Display information about currently being used S,G's
-and their RPF lookup information.  Additionally display
-some statistics about what has been happening on the
-router
-@end deffn
-
-@deffn {show PIM Information} {show ip pim secondary} {}
-Display information about an interface and all the
-secondary addresses associated with it
-@end deffn
-
-@deffn {show PIM Information} {show ip pim state} {}
-Display information about known S,G's and incoming
-interface as well as the OIL and how they were choosen
-@end deffn
-
-@deffn {show PIM Information} {show ip pim upstream} {}
-Display upstream information about a S,G mroute
-@end deffn
-
-@deffn {show PIM Information} {show ip pim upstream-join-desired} {}
-Display upstream information for S,G's and if we desire to
-join the mcast tree
-@end deffn
-
-@deffn {show PIM Information} {show ip pim upstream-rpf} {}
-Display upstream information for S,G's and the RPF data
-associated with them
-@end deffn
-
-@deffn {show PIM Information} {show ip rpf} {}
-Display the multicast RIB created in zebra
-@end deffn
-
-@node  PIM Debug Commands
-@section PIM Debug Commands
-
-The debugging subsystem for PIM behaves in accordance with how FRR handles debugging.  You can specify debugging at the enable cli mode as well as the configure cli mode.  If you specify debug commands in the configuration cli mode, the debug commands can be persistent across restarts of the FRR pimd if the config was written out.
-
-@deffn {PIM Debug Commands} {debug pim events}
-This turns on debugging for PIM system events.  Especially timers.
-@end deffn
-
-@deffn {PIM Debug Commands} {debug pim nht}
-This turns on debugging for PIM nexthop tracking.  It will display information about RPF lookups and information about when a nexthop changes.
-@end deffn
-
-@deffn {PIM Debug Commands} {debug pim packet-dump}
-This turns on an extraordinary amount of data.  Each pim packet sent and received is dumped for debugging purposes.  This should be considered a developer only command
-@end deffn
-
-@deffn {PIM Debug Commands} {debug pim packets}
-This turns on information about packet generation for sending and about packet handling from a received packet
-@end deffn
-
-@deffn {PIM Debug Commands} {debug pim trace}
-This traces pim code and how it is running.
-@end deffn
-
-@deffn {PIM Debug Commands} {debug pim zebra}
-This gathers data about events from zebra that come up through the zapi
-@end deffn
diff --git a/doc/protocol.texi b/doc/protocol.texi
deleted file mode 100644 (file)
index 7e8a96d..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-@node  Zebra Protocol
-@appendix Zebra Protocol
-@appendixsection Overview of the Zebra Protocol
-
-Zebra Protocol is used by protocol daemons to communicate with the
-zebra daemon.
-
-Each protocol daemon may request and send information to and from the
-zebra daemon such as interface states, routing state,
-nexthop-validation, and so on. Protocol daemons may also install routes
-with zebra. The zebra daemon manages which route is installed into the
-forwarding table with the kernel.
-
-Zebra Protocol is a streaming protocol, with a common header. Two
-versions of the header are in use. Version 0 is implicitely versioned.
-Version 1 has an explicit version field. Version 0 can be distinguished
-from all other versions by examining the 3rd byte of the header, which
-contains a marker value for all versions bar version 0. The marker byte
-corresponds to the command field in version 0, and the marker value is
-a reserved command in version 0.
-
-We do not anticipate there will be further versions of the header for
-the foreseeable future, as the command field in version 1 is wide
-enough to allow for future extensions to done compatibly through
-seperate commands.
-
-Version 0 is used by all versions of GNU Zebra as of this writing, and
-versions of Quagga up to and including Quagga 0.98. Version 2 was created
-for 0.99.21 of Quagga.  Version 3 designates VRF compatibility and was
-released in 1.0. Version 4 will be used as of Frr 2.0 to indicate that
-we are a different Routing Suite now and to hopefully prevent accidental
-Quagga <-> FRR issues.
-
-@appendixsection Zebra Protocol Definition
-@appendixsubsec Zebra Protocol Header (version 0)
-@example
-@group
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-------------------------------+---------------+
-|           Length (2)          |   Command (1) |
-+-------------------------------+---------------+
-@end group
-@end example
-
-@appendixsubsec Zebra Protocol Common Header (version 1)
-@example
-@group
-0                   1                   2                   3
-0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-+-------------------------------+---------------+-------------+
-|           Length (2)          |   Marker (1)  | Version (1) |
-+-------------------------------+---------------+-------------+
-|          Command (2)          |
-+-------------------------------+
-@end group
-@end example
-
-@appendixsubsec Zebra Protocol Header Field Definitions
-@table @samp
-@item Length
-Total packet length including this header. The minimum length is 3
-bytes for version 0 messages and 6 bytes for version 1 messages.
-
-@item Marker
-Static marker with a value of 255 always. This is to allow version 0
-Zserv headers (which do not include version explicitely) to be
-distinguished from versioned headers. Not present in version 0
-messages.
-
-@item Version
-Version number of the Zserv message. Clients should not continue
-processing messages past the version field for versions they do not
-recognise. Not present in version 0 messages.
-
-@item Command
-The Zebra Protocol command.
-@end table
-
-@appendixsubsec Zebra Protocol Commands
-@multitable {ZEBRA_REDISTRIBUTE_DEFAULT_DELETE_WHATEVER} {99999}
-@headitem Command @tab Value
-@item ZEBRA_INTERFACE_ADD      
-@tab 1
-@item ZEBRA_INTERFACE_DELETE
-@tab 2
-@item ZEBRA_INTERFACE_ADDRESS_ADD
-@tab 3
-@item ZEBRA_INTERFACE_ADDRESS_DELETE
-@tab 4
-@item ZEBRA_INTERFACE_UP
-@tab 5
-@item ZEBRA_INTERFACE_DOWN
-@tab 6
-@item ZEBRA_IPV4_ROUTE_ADD
-@tab 7
-@item ZEBRA_IPV4_ROUTE_DELETE
-@tab 8
-@item ZEBRA_IPV6_ROUTE_ADD
-@tab 9
-@item ZEBRA_IPV6_ROUTE_DELETE
-@tab 10
-@item ZEBRA_REDISTRIBUTE_ADD
-@tab 11
-@item ZEBRA_REDISTRIBUTE_DELETE
-@tab 12
-@item ZEBRA_REDISTRIBUTE_DEFAULT_ADD
-@tab 13
-@item ZEBRA_REDISTRIBUTE_DEFAULT_DELETE
-@tab 14
-@item ZEBRA_IPV4_NEXTHOP_LOOKUP
-@tab 15
-@item ZEBRA_IPV6_NEXTHOP_LOOKUP
-@tab 16
-@end multitable
diff --git a/doc/ripd.8.in b/doc/ripd.8.in
deleted file mode 100644 (file)
index a84668e..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-.TH RIPD 8 "25 November 2004" "@PACKAGE_FULLNAME@ RIP daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-ripd \- a RIP routing engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B ripd
-[
-.B \-dhrv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B ripd
-is a routing component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B ripd
-command:
-.SH OPTIONS
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/ripd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When ripd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart ripd.  The default is \fB\fI@CFG_STATE@/ripd.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the ripd VTY will listen on. This defaults to
-2602, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the ripd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-r\fR, \fB\-\-retain\fR 
-When the program terminates, retain routes added by \fBripd\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-The \fBsnmp\fR module may be available for
-\fBripd\fR, if the package was built with SNMP support.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/ripd
-The default location of the 
-.B ripd
-binary.
-.TP
-.BI @CFG_SYSCONF@/ripd.conf
-The default location of the 
-.B ripd
-config file.
-.TP
-.BI $(PWD)/ripd.log 
-If the 
-.B ripd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBripd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The ripd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBripd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-.B ripd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
diff --git a/doc/ripd.texi b/doc/ripd.texi
deleted file mode 100644 (file)
index da0f596..0000000
+++ /dev/null
@@ -1,623 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the Frr Manual.
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-@node RIP
-@chapter RIP
-
-RIP -- Routing Information Protocol is widely deployed interior gateway
-protocol.  RIP was developed in the 1970s at Xerox Labs as part of the
-XNS routing protocol.  RIP is a @dfn{distance-vector} protocol and is
-based on the @dfn{Bellman-Ford} algorithms.  As a distance-vector
-protocol, RIP router send updates to its neighbors periodically, thus
-allowing the convergence to a known topology.  In each update, the
-distance to any given network will be broadcasted to its neighboring
-router.
-
-@command{ripd} supports RIP version 2 as described in RFC2453 and RIP
-version 1 as described in RFC1058.
-
-@menu
-* Starting and Stopping ripd::  
-* RIP Configuration::           
-* RIP Version Control::
-* How to Announce RIP route::   
-* Filtering RIP Routes::        
-* RIP Metric Manipulation::     
-* RIP distance::                
-* RIP route-map::               
-* RIP Authentication::          
-* RIP Timers::                  
-* Show RIP Information::        
-* RIP Debug Commands::          
-@end menu
-
-@node Starting and Stopping ripd
-@section Starting and Stopping ripd
-
-The default configuration file name of @command{ripd}'s is
-@file{ripd.conf}.  When invocation @command{ripd} searches directory
-@value{INSTALL_PREFIX_ETC}.  If @file{ripd.conf} is not there next
-search current directory.
-
-RIP uses UDP port 520 to send and receive RIP packets.  So the user must have
-the capability to bind the port, generally this means that the user must
-have superuser privileges.  RIP protocol requires interface information
-maintained by @command{zebra} daemon.  So running @command{zebra}
-is mandatory to run @command{ripd}.  Thus minimum sequence for running
-RIP is like below:
-
-@example
-@group
-# zebra -d
-# ripd -d
-@end group
-@end example
-
-Please note that @command{zebra} must be invoked before @command{ripd}.
-
-To stop @command{ripd}.  Please use @command{kill `cat
-/var/run/ripd.pid`}.  Certain signals have special meaningss to @command{ripd}.
-
-@table @samp
-@item SIGHUP
-Reload configuration file @file{ripd.conf}.  All configurations are
-reseted.  All routes learned so far are cleared and removed from routing
-table.
-@item SIGUSR1
-Rotate @command{ripd} logfile.
-@item SIGINT
-@itemx SIGTERM
-@command{ripd} sweeps all installed RIP routes then terminates properly.
-@end table
-
-@command{ripd} invocation options.  Common options that can be specified
-(@pxref{Common Invocation Options}).
-
-@table @samp
-@item -r
-@itemx --retain
-When the program terminates, retain routes added by @command{ripd}.
-@end table
-
-@menu
-* RIP netmask::                 
-@end menu
-
-@node RIP netmask
-@subsection RIP netmask
-
-The netmask features of @command{ripd} support both version 1 and version 2 of
-RIP.  Version 1 of RIP originally contained no netmask information.  In
-RIP version 1, network classes were originally used to determine the
-size of the netmask.  Class A networks use 8 bits of mask, Class B
-networks use 16 bits of masks, while Class C networks use 24 bits of
-mask.  Today, the most widely used method of a network mask is assigned
-to the packet on the basis of the interface that received the packet.
-Version 2 of RIP supports a variable length subnet mask (VLSM).  By
-extending the subnet mask, the mask can be divided and reused.  Each
-subnet can be used for different purposes such as large to middle size
-LANs and WAN links.  Frr @command{ripd} does not support the non-sequential
-netmasks that are included in RIP Version 2.
-
-In a case of similar information with the same prefix and metric, the
-old information will be suppressed.  Ripd does not currently support
-equal cost multipath routing.
-
-
-@node RIP Configuration
-@section RIP Configuration
-
-@deffn Command {router rip} {}
-The @code{router rip} command is necessary to enable RIP.  To disable
-RIP, use the @code{no router rip} command.  RIP must be enabled before
-carrying out any of the RIP commands.
-@end deffn
-
-@deffn Command {no router rip} {}
-Disable RIP.
-@end deffn
-
-@deffn {RIP Command} {network @var{network}} {}
-@deffnx {RIP Command} {no network @var{network}} {}
-Set the RIP enable interface by @var{network}.  The interfaces which
-have addresses matching with @var{network} are enabled.
-
-This group of commands either enables or disables RIP interfaces between
-certain numbers of a specified network address.  For example, if the
-network for 10.0.0.0/24 is RIP enabled, this would result in all the
-addresses from 10.0.0.0 to 10.0.0.255 being enabled for RIP.  The @code{no
-network} command will disable RIP for the specified network.
-@end deffn
-
-@deffn {RIP Command} {network @var{ifname}} {}
-@deffnx {RIP Command} {no network @var{ifname}} {}
-Set a RIP enabled interface by @var{ifname}.  Both the sending and
-receiving of RIP packets will be enabled on the port specified in the
-@code{network ifname} command.  The @code{no network ifname} command will disable
-RIP on the specified interface.
-@end deffn
-
-@deffn {RIP Command} {neighbor @var{a.b.c.d}} {}
-@deffnx {RIP Command} {no neighbor @var{a.b.c.d}} {}
-Specify RIP neighbor.  When a neighbor doesn't understand multicast,
-this command is used to specify neighbors.  In some cases, not all
-routers will be able to understand multicasting, where packets are sent
-to a network or a group of addresses.  In a situation where a neighbor
-cannot process multicast packets, it is necessary to establish a direct
-link between routers.  The neighbor command allows the network
-administrator to specify a router as a RIP neighbor.  The @code{no
-neighbor a.b.c.d} command will disable the RIP neighbor.
-@end deffn
-
-Below is very simple RIP configuration.  Interface @code{eth0} and
-interface which address match to @code{10.0.0.0/8} are RIP enabled.
-
-@example
-@group
-!
-router rip
- network 10.0.0.0/8
- network eth0
-!
-@end group
-@end example
-
-Passive interface
-
-@deffn {RIP command} {passive-interface (@var{IFNAME}|default)} {}
-@deffnx {RIP command} {no passive-interface @var{IFNAME}} {}
-This command sets the specified interface to passive mode.  On passive mode
-interface, all receiving packets are processed as normal and ripd does
-not send either multicast or unicast RIP packets except to RIP neighbors
-specified with @code{neighbor} command. The interface may be specified
-as @var{default} to make ripd default to passive on all interfaces. 
-
-The default is to be passive on all interfaces.
-@end deffn
-
-RIP split-horizon
-
-@deffn {Interface command} {ip split-horizon} {}
-@deffnx {Interface command} {no ip split-horizon} {}
-Control split-horizon on the interface.  Default is @code{ip
-split-horizon}.  If you don't perform split-horizon on the interface,
-please specify @code{no ip split-horizon}.
-@end deffn
-
-@node RIP Version Control
-@section RIP Version Control
-
-RIP can be configured to send either Version 1 or Version 2 packets.
-The default is to send RIPv2 while accepting both RIPv1 and RIPv2 (and
-replying with packets of the appropriate version for REQUESTS /
-triggered updates). The version to receive and send can be specified
-globally, and further overriden on a per-interface basis if needs be
-for send and receive seperately (see below).
-
-It is important to note that RIPv1 can not be authenticated. Further,
-if RIPv1 is enabled then RIP will reply to REQUEST packets, sending the
-state of its RIP routing table to any remote routers that ask on
-demand. For a more detailed discussion on the security implications of
-RIPv1 see @ref{RIP Authentication}.
-
-@deffn {RIP Command} {version @var{version}} {}
-Set RIP version to accept for reads and send.  @var{version}
-can be either `1'' or `2''. 
-
-Disabling RIPv1 by specifying version 2 is STRONGLY encouraged,
-@xref{RIP Authentication}. This may become the default in a future
-release.
-
-Default: Send Version 2, and accept either version.
-@end deffn
-
-@deffn {RIP Command} {no version} {}
-Reset the global version setting back to the default.
-@end deffn
-
-@deffn {Interface command} {ip rip send version @var{version}} {}
-@var{version} can be `1', `2' or `1 2'.
-
-This interface command overrides the global rip version setting, and
-selects which version of RIP to send packets with, for this interface
-specifically. Choice of RIP Version 1, RIP Version 2, or both versions. 
-In the latter case, where `1 2' is specified, packets will be both
-broadcast and multicast.
-
-Default: Send packets according to the global version (version 2)
-@end deffn
-
-@deffn {Interface command} {ip rip receive version @var{version}} {}
-@var{version} can be `1', `2' or `1 2'.
-
-This interface command overrides the global rip version setting, and
-selects which versions of RIP packets will be accepted on this
-interface. Choice of RIP Version 1, RIP Version 2, or both.
-
-Default: Accept packets according to the global setting (both 1 and 2).
-@end deffn
-
-@node How to Announce RIP route
-@section How to Announce RIP route
-
-@deffn {RIP command} {redistribute kernel} {}
-@deffnx {RIP command} {redistribute kernel metric <0-16>} {}
-@deffnx {RIP command} {redistribute kernel route-map @var{route-map}} {}
-@deffnx {RIP command} {no redistribute kernel} {}
-@code{redistribute kernel} redistributes routing information from
-kernel route entries into the RIP tables. @code{no redistribute kernel}
-disables the routes.
-@end deffn
-
-@deffn {RIP command} {redistribute static} {}
-@deffnx {RIP command} {redistribute static metric <0-16>} {}
-@deffnx {RIP command} {redistribute static route-map @var{route-map}} {}
-@deffnx {RIP command} {no redistribute static} {}
-@code{redistribute static} redistributes routing information from
-static route entries into the RIP tables. @code{no redistribute static}
-disables the routes.
-@end deffn
-
-@deffn {RIP command} {redistribute connected} {}
-@deffnx {RIP command} {redistribute connected metric <0-16>} {}
-@deffnx {RIP command} {redistribute connected route-map @var{route-map}} {}
-@deffnx {RIP command} {no redistribute connected} {}
-Redistribute connected routes into the RIP tables.  @code{no
-redistribute connected} disables the connected routes in the RIP tables.
-This command redistribute connected of the interface which RIP disabled.
-The connected route on RIP enabled interface is announced by default.
-@end deffn
-
-@deffn {RIP command} {redistribute ospf} {}
-@deffnx {RIP command} {redistribute ospf metric <0-16>} {}
-@deffnx {RIP command} {redistribute ospf route-map @var{route-map}} {}
-@deffnx {RIP command} {no redistribute ospf} {}
-@code{redistribute ospf} redistributes routing information from
-ospf route entries into the RIP tables. @code{no redistribute ospf}
-disables the routes.
-@end deffn
-
-@deffn {RIP command} {redistribute bgp} {}
-@deffnx {RIP command} {redistribute bgp metric <0-16>} {}
-@deffnx {RIP command} {redistribute bgp route-map @var{route-map}} {}
-@deffnx {RIP command} {no redistribute bgp} {}
-@code{redistribute bgp} redistributes routing information from
-bgp route entries into the RIP tables. @code{no redistribute bgp}
-disables the routes.
-@end deffn
-
-If you want to specify RIP only static routes:
-
-@deffn {RIP command} {default-information originate} {}
-@end deffn
-
-@deffn {RIP command} {route @var{a.b.c.d/m}} {}
-@deffnx {RIP command} {no route @var{a.b.c.d/m}} {}
-This command is specific to Frr.  The @code{route} command makes a static
-route only inside RIP. This command should be used only by advanced
-users who are particularly knowledgeable about the RIP protocol.  In
-most cases, we recommend creating a static route in Frr and
-redistributing it in RIP using @code{redistribute static}.
-@end deffn
-
-@node  Filtering RIP Routes
-@section Filtering RIP Routes
-
-RIP routes can be filtered by a distribute-list.
-
-@deffn Command {distribute-list @var{access_list} @var{direct} @var{ifname}} {}
-You can apply access lists to the interface with a @code{distribute-list}
-command.  @var{access_list} is the access list name.  @var{direct} is
-@samp{in} or @samp{out}.  If @var{direct} is @samp{in} the access list
-is applied to input packets.
-
-The @code{distribute-list} command can be used to filter the RIP path.
-@code{distribute-list} can apply access-lists to a chosen interface.
-First, one should specify the access-list.  Next, the name of the
-access-list is used in the distribute-list command.  For example, in the
-following configuration @samp{eth0} will permit only the paths that
-match the route 10.0.0.0/8
-
-@example
-@group
-!
-router rip
- distribute-list private in eth0
-!
-access-list private permit 10 10.0.0.0/8
-access-list private deny any
-!
-@end group
-@end example
-@end deffn
-
-@code{distribute-list} can be applied to both incoming and outgoing data.
-
-@deffn Command {distribute-list prefix @var{prefix_list} (in|out) @var{ifname}} {}
-You can apply prefix lists to the interface with a
-@code{distribute-list} command.  @var{prefix_list} is the prefix list
-name.  Next is the direction of @samp{in} or @samp{out}.  If
-@var{direct} is @samp{in} the access list is applied to input packets.
-@end deffn
-
-@node RIP Metric Manipulation
-@section RIP Metric Manipulation
-
-RIP metric is a value for distance for the network.  Usually
-@command{ripd} increment the metric when the network information is
-received.  Redistributed routes' metric is set to 1.
-
-@deffn {RIP command} {default-metric <1-16>} {}
-@deffnx {RIP command} {no default-metric <1-16>} {}
-This command modifies the default metric value for redistributed routes.  The
-default value is 1.  This command does not affect connected route
-even if it is redistributed by @command{redistribute connected}.  To modify
-connected route's metric value, please use @command{redistribute
-connected metric} or @command{route-map}.  @command{offset-list} also
-affects connected routes.
-@end deffn
-
-@deffn {RIP command} {offset-list @var{access-list} (in|out)} {}
-@deffnx {RIP command} {offset-list @var{access-list} (in|out) @var{ifname}} {}
-@end deffn
-
-@node RIP distance
-@section RIP distance
-
-Distance value is used in zebra daemon.  Default RIP distance is 120.
-
-@deffn {RIP command} {distance <1-255>} {}
-@deffnx {RIP command} {no distance <1-255>} {}
-Set default RIP distance to specified value.
-@end deffn
-
-@deffn {RIP command} {distance <1-255> @var{A.B.C.D/M}} {}
-@deffnx {RIP command} {no distance <1-255> @var{A.B.C.D/M}} {}
-Set default RIP distance to specified value when the route's source IP
-address matches the specified prefix.
-@end deffn
-
-@deffn {RIP command} {distance <1-255> @var{A.B.C.D/M} @var{access-list}} {}
-@deffnx {RIP command} {no distance <1-255> @var{A.B.C.D/M} @var{access-list}} {}
-Set default RIP distance to specified value when the route's source IP
-address matches the specified prefix and the specified access-list.
-@end deffn
-
-@node RIP route-map
-@section RIP route-map
-
-Usage of @command{ripd}'s route-map support.
-
-Optional argument route-map MAP_NAME can be added to each @code{redistribute}
-statement.
-
-@example
-redistribute static [route-map MAP_NAME]
-redistribute connected [route-map MAP_NAME]
-.....
-@end example
-
-Cisco applies route-map _before_ routes will exported to rip route table. 
-In current Frr's test implementation, @command{ripd} applies route-map
-after routes are listed in the route table and before routes will be
-announced to an interface (something like output filter). I think it is not
-so clear, but it is draft and it may be changed at future.
-
-Route-map statement (@pxref{Route Map}) is needed to use route-map
-functionality.
-
-@deffn {Route Map} {match interface @var{word}} {}
-This command match to incoming interface.  Notation of this match is
-different from Cisco. Cisco uses a list of interfaces - NAME1 NAME2
-... NAMEN.  Ripd allows only one name (maybe will change in the
-future).  Next - Cisco means interface which includes next-hop of
-routes (it is somewhat similar to "ip next-hop" statement).  Ripd
-means interface where this route will be sent. This difference is
-because "next-hop" of same routes which sends to different interfaces
-must be different. Maybe it'd be better to made new matches - say
-"match interface-out NAME" or something like that.
-@end deffn
-
-@deffn {Route Map} {match ip address @var{word}} {}
-@deffnx {Route Map} {match ip address prefix-list @var{word}} {}
-Match if route destination is permitted by access-list.
-@end deffn
-
-@deffn {Route Map} {match ip next-hop @var{word}} {}
-@deffnx {Route Map} {match ip next-hop prefix-list @var{word}} {}
-Match if route next-hop (meaning next-hop listed in the rip route-table
-as displayed by "show ip rip") is permitted by access-list.
-@end deffn
-
-@deffn {Route Map} {match metric <0-4294967295>} {}
-This command match to the metric value of RIP updates.  For other
-protocol compatibility metric range is shown as <0-4294967295>.  But
-for RIP protocol only the value range <0-16> make sense.
-@end deffn
-
-@deffn {Route Map} {set ip next-hop A.B.C.D} {}
-This command set next hop value in RIPv2 protocol.  This command does
-not affect RIPv1 because there is no next hop field in the packet.
-@end deffn
-
-@deffn {Route Map} {set metric <0-4294967295>} {}
-Set a metric for matched route when sending announcement.  The metric
-value range is very large for compatibility with other protocols.  For
-RIP, valid metric values are from 1 to 16.
-@end deffn
-
-@node RIP Authentication
-@section RIP Authentication
-
-RIPv2 allows packets to be authenticated via either an insecure plain
-text password, included with the packet, or via a more secure MD5 based
-@acronym{HMAC, keyed-Hashing for Message AuthentiCation},
-RIPv1 can not be authenticated at all, thus when authentication is
-configured @code{ripd} will discard routing updates received via RIPv1
-packets.
-
-However, unless RIPv1 reception is disabled entirely, 
-@xref{RIP Version Control}, RIPv1 REQUEST packets which are received,
-which query the router for routing information, will still be honoured
-by @code{ripd}, and @code{ripd} WILL reply to such packets. This allows 
-@code{ripd} to honour such REQUESTs (which sometimes is used by old
-equipment and very simple devices to bootstrap their default route),
-while still providing security for route updates which are received.
-
-In short: Enabling authentication prevents routes being updated by
-unauthenticated remote routers, but still can allow routes (I.e. the
-entire RIP routing table) to be queried remotely, potentially by anyone
-on the internet, via RIPv1.
-
-To prevent such unauthenticated querying of routes disable RIPv1,
-@xref{RIP Version Control}.
-
-@deffn {Interface command} {ip rip authentication mode md5} {}
-@deffnx {Interface command} {no ip rip authentication mode md5} {}
-Set the interface with RIPv2 MD5 authentication.
-@end deffn
-
-@deffn {Interface command} {ip rip authentication mode text} {}
-@deffnx {Interface command} {no ip rip authentication mode text} {}
-Set the interface with RIPv2 simple password authentication.
-@end deffn
-
-@deffn {Interface command} {ip rip authentication string @var{string}} {}
-@deffnx {Interface command} {no ip rip authentication string @var{string}} {}
-RIP version 2 has simple text authentication.  This command sets
-authentication string.  The string must be shorter than 16 characters.
-@end deffn
-
-@deffn {Interface command} {ip rip authentication key-chain @var{key-chain}} {}
-@deffnx {Interface command} {no ip rip authentication key-chain @var{key-chain}} {}
-Specifiy Keyed MD5 chain.
-@end deffn
-
-@example
-!
-key chain test
- key 1
-  key-string test
-!
-interface eth1
- ip rip authentication mode md5
- ip rip authentication key-chain test
-!
-@end example
-
-@node RIP Timers
-@section RIP Timers
-
-@deffn {RIP command} {timers basic @var{update} @var{timeout} @var{garbage}} {}
-
-RIP protocol has several timers.  User can configure those timers' values
-by @code{timers basic} command.
-
-The default settings for the timers are as follows: 
-
-@itemize @bullet 
-@item
-The update timer is 30 seconds. Every update timer seconds, the RIP
-process is awakened to send an unsolicited Response message containing
-the complete routing table to all neighboring RIP routers.
-
-@item
-The timeout timer is 180 seconds. Upon expiration of the timeout, the
-route is no longer valid; however, it is retained in the routing table
-for a short time so that neighbors can be notified that the route has
-been dropped.
-
-@item
-The garbage collect timer is 120 seconds.  Upon expiration of the
-garbage-collection timer, the route is finally removed from the routing
-table.
-
-@end itemize
-
-The @code{timers basic} command allows the the default values of the timers
-listed above to be changed.
-@end deffn
-
-@deffn {RIP command} {no timers basic} {}
-The @code{no timers basic} command will reset the timers to the default
-settings listed above.
-@end deffn
-
-@node Show RIP Information
-@section Show RIP Information
-
-To display RIP routes.
-
-@deffn Command {show ip rip} {}
-Show RIP routes.
-@end deffn
-
-The command displays all RIP routes. For routes that are received
-through RIP, this command will display the time the packet was sent and
-the tag information.  This command will also display this information
-for routes redistributed into RIP.
-
-@c Exmaple here.
-
-@deffn Command {show ip rip status} {}
-The command displays current RIP status.  It includes RIP timer,
-filtering, version, RIP enabled interface and RIP peer inforation.
-@end deffn
-
-@example
-@group
-ripd> @b{show ip rip status}
-Routing Protocol is "rip"
-  Sending updates every 30 seconds with +/-50%, next due in 35 seconds
-  Timeout after 180 seconds, garbage collect after 120 seconds
-  Outgoing update filter list for all interface is not set
-  Incoming update filter list for all interface is not set
-  Default redistribution metric is 1
-  Redistributing: kernel connected
-  Default version control: send version 2, receive version 2 
-    Interface        Send  Recv
-  Routing for Networks:
-    eth0
-    eth1
-    1.1.1.1
-    203.181.89.241
-  Routing Information Sources:
-    Gateway          BadPackets BadRoutes  Distance Last Update
-@end group
-@end example
-
-@node RIP Debug Commands
-@section RIP Debug Commands
-
-Debug for RIP protocol.
-
-@deffn Command {debug rip events} {}
-Debug rip events.
-@end deffn
-
-@code{debug rip} will show RIP events.  Sending and receiving
-packets, timers, and changes in interfaces are events shown with @command{ripd}.
-
-@deffn Command {debug rip packet} {}
-Debug rip packet.
-@end deffn
-
-@code{debug rip packet} will display detailed information about the RIP
-packets.  The origin and port number of the packet as well as a packet
-dump is shown.
-
-@deffn Command {debug rip zebra} {}
-Debug rip between zebra communication.
-@end deffn
-
-This command will show the communication between @command{ripd} and
-@command{zebra}.  The main information will include addition and deletion of
-paths to the kernel and the sending and receiving of interface information.
-
-@deffn Command {show debugging rip} {}
-Display @command{ripd}'s debugging option.
-@end deffn
-
-@code{show debugging rip} will show all information currently set for ripd
-debug.
diff --git a/doc/ripngd.8.in b/doc/ripngd.8.in
deleted file mode 100644 (file)
index 9803921..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-.TH RIPNGD 8 "25 November 2004" "@PACKAGE_FULLNAME@ RIPNG daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-ripngd \- a RIPNG routing engine for use with @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B ripngd
-[
-.B \-dhlrv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-]
-.SH DESCRIPTION
-.B ripngd
-is a routing component that works with the
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B ripngd
-command:
-.SH OPTIONS
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR 
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/ripngd.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When ripngd starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart ripngd.  The default is \fB\fI@CFG_STATE@/ripngd.pid\fR.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the ripngd VTY will listen on. This defaults to
-2603, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the ripngd VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-r\fR, \fB\-\-retain\fR 
-When the program terminates, retain routes added by \fBripd\fR.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-There are currently no such modules for
-\fBripngd\fR in the base package.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/ripngd
-The default location of the 
-.B ripngd
-binary.
-.TP
-.BI @CFG_SYSCONF@/ripngd.conf
-The default location of the 
-.B ripngd
-config file.
-.TP
-.BI $(PWD)/ripngd.log 
-If the 
-.B ripngd
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBripngd\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The ripngd process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBripngd\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR zebra (8),
-.BR vtysh (1)
-.SH BUGS
-.B ripngd
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/doc/ripngd.texi b/doc/ripngd.texi
deleted file mode 100644 (file)
index 1adda69..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the Frr Manual.
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-@node RIPng
-@chapter RIPng
-
-@command{ripngd} supports the RIPng protocol as described in RFC2080.  It's an
-IPv6 reincarnation of the RIP protocol.
-
-@menu
-* Invoking ripngd::             
-* ripngd Configuration::        
-* ripngd Terminal Mode Commands::  
-* ripngd Filtering Commands::   
-@end menu
-
-@node Invoking ripngd
-@section Invoking ripngd
-
-There are no @code{ripngd} specific invocation options.  Common options
-can be specified (@pxref{Common Invocation Options}).
-
-@node ripngd Configuration
-@section ripngd Configuration
-
-Currently ripngd supports the following commands:
-
-@deffn Command {router ripng} {}
-Enable RIPng.
-@end deffn
-
-@deffn {RIPng Command} {flush_timer @var{time}} {}
-Set flush timer.
-@end deffn
-
-@deffn {RIPng Command} {network @var{network}} {}
-Set RIPng enabled interface by @var{network}
-@end deffn
-
-@deffn {RIPng Command} {network @var{ifname}} {}
-Set RIPng enabled interface by @var{ifname}
-@end deffn
-
-@deffn {RIPng Command} {route @var{network}} {}
-Set RIPng static routing announcement of @var{network}.
-@end deffn
-
-@deffn Command {router zebra} {}
-This command is the default and does not appear in the configuration.
-With this statement, RIPng routes go to the @command{zebra} daemon.
-@end deffn
-
-@node ripngd Terminal Mode Commands
-@section ripngd Terminal Mode Commands
-
-@deffn Command {show ip ripng} {}
-@end deffn
-
-@deffn Command {show debugging ripng} {}
-@end deffn
-
-@deffn Command {debug ripng events} {}
-@end deffn
-
-@deffn Command {debug ripng packet} {}
-@end deffn
-
-@deffn Command {debug ripng zebra} {}
-@end deffn
-
-@node ripngd Filtering Commands
-@section ripngd Filtering Commands
-
-@deffn Command {distribute-list @var{access_list} (in|out) @var{ifname}} {}
-You can apply an access-list to the interface using the
-@code{distribute-list} command.  @var{access_list} is an access-list
-name.  @var{direct} is @samp{in} or @samp{out}.  If @var{direct} is
-@samp{in}, the access-list is applied only to incoming packets.
-
-@example
-distribute-list local-only out sit1
-@end example
-@end deffn
diff --git a/doc/routemap.texi b/doc/routemap.texi
deleted file mode 100644 (file)
index 3e683f4..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-@node Route Map
-@chapter Route Map
-
-Route maps provide a means to both filter and/or apply actions to
-route, hence allowing policy to be applied to routes.
-
-@menu
-* Route Map Command::
-* Route Map Match Command::
-* Route Map Set Command::
-* Route Map Call Command::
-* Route Map Exit Action Command::
-* Route Map Examples::
-@end menu
-
-Route-maps are an ordered list of route-map entries. Each entry may
-specify up to four distincts sets of clauses:
-
-@table @samp
-@item Matching Policy
-
-This specifies the policy implied if the @samp{Matching Conditions} are
-met or not met, and which actions of the route-map are to be taken, if
-any. The two possibilities are:
-
-@itemize @minus
-@item
-@samp{permit}: If the entry matches, then carry out the @samp{Set
-Actions}. Then finish processing the route-map, permitting the route,
-unless an @samp{Exit Action} indicates otherwise.
-
-@item
-@samp{deny}: If the entry matches, then finish processing the route-map and
-deny the route (return @samp{deny}).
-@end itemize
-
-The @samp{Matching Policy} is specified as part of the command which
-defines the ordered entry in the route-map. See below.
-
-@item Matching Conditions
-
-A route-map entry may, optionally, specify one or more conditions which
-must be matched if the entry is to be considered further, as governed
-by the Match Policy. If a route-map entry does not explicitely specify
-any matching conditions, then it always matches.
-
-@item Set Actions
-
-A route-map entry may, optionally, specify one or more @samp{Set
-Actions} to set or modify attributes of the route.
-
-@item Call Action
-
-Call to another route-map, after any @samp{Set Actions} have been
-carried out. If the route-map called returns @samp{deny} then
-processing of the route-map finishes and the route is denied,
-regardless of the @samp{Matching Policy} or the @samp{Exit Policy}. If
-the called route-map returns @samp{permit}, then @samp{Matching Policy}
-and @samp{Exit Policy} govern further behaviour, as normal.
-
-@item Exit Policy
-
-An entry may, optionally, specify an alternative @samp{Exit Policy} to
-take if the entry matched, rather than the normal policy of exiting the
-route-map and permitting the route. The two possibilities are:
-
-@itemize @minus 
-@item
-@samp{next}: Continue on with processing of the route-map entries.
-
-@item
-@samp{goto N}: Jump ahead to the first route-map entry whose order in
-the route-map is >= N. Jumping to a previous entry is not permitted.
-@end itemize
-@end table
-
-The default action of a route-map, if no entries match, is to deny.
-I.e. a route-map essentially has as its last entry an empty @samp{deny}
-entry, which matches all routes. To change this behaviour, one must
-specify an empty @samp{permit} entry as the last entry in the route-map.
-
-To summarise the above:
-
-@multitable {permit} {action} {No Match}
-@headitem           @tab Match  @tab No Match
-@item @emph{Permit} @tab action @tab cont
-@item @emph{Deny}   @tab deny   @tab cont
-@end multitable
-
-@table @samp
-
-@item action
-@itemize @minus
-@item
-Apply @emph{set} statements
-
-@item
-If @emph{call} is present, call given route-map. If that returns a @samp{deny}, finish
-processing and return @samp{deny}.
-
-@item
-If @samp{Exit Policy} is @emph{next}, goto next route-map entry
-
-@item
-If @samp{Exit Policy} is @emph{goto}, goto first entry whose order in the list
-is >= the given order.
-
-@item
-Finish processing the route-map and permit the route.
-@end itemize
-
-@item deny
-@itemize @minus
-@item
-The route is denied by the route-map (return @samp{deny}).
-@end itemize
-
-@item cont
-@itemize @minus
-@item
-goto next route-map entry
-@end itemize
-@end table
-
-@node Route Map Command
-@section Route Map Command
-
-@deffn {Command} {route-map @var{route-map-name} (permit|deny) @var{order}} {}
-
-Configure the @var{order}'th entry in @var{route-map-name} with
-@samp{Match Policy} of either @emph{permit} or @emph{deny}.
-
-@end deffn
-
-@node Route Map Match Command
-@section Route Map Match Command
-
-@deffn {Route-map Command} {match ip address @var{access_list}} {}
-Matches the specified @var{access_list}
-@end deffn
-
-@deffn {Route-map Command} {match ip address @var{prefix-list}} {}
-Matches the specified @var{prefix-list}
-@end deffn
-
-@deffn {Route-map Command} {match ip address prefix-len @var{0-32}} {}
-Matches the specified @var{prefix-len}.  This is a Zebra specific command.
-@end deffn
-
-@deffn {Route-map Command} {match ipv6 address @var{access_list}} {}
-Matches the specified @var{access_list}
-@end deffn
-
-@deffn {Route-map Command} {match ipv6 address @var{prefix-list}} {}
-Matches the specified @var{prefix-list}
-@end deffn
-
-@deffn {Route-map Command} {match ipv6 address prefix-len @var{0-128}} {}
-Matches the specified @var{prefix-len}.  This is a Zebra specific command.
-@end deffn
-
-@deffn {Route-map Command} {match ip next-hop @var{ipv4_addr}} {}
-Matches the specified @var{ipv4_addr}.
-@end deffn
-
-@deffn {Route-map Command} {match aspath @var{as_path}} {}
-Matches the specified @var{as_path}.
-@end deffn
-
-@deffn {Route-map Command} {match metric @var{metric}} {}
-Matches the specified @var{metric}.
-@end deffn
-
-@deffn {Route-map Command} {match tag @var{tag}} {}
-Matches the specified tag value associated with the route.
-This tag value can be in the range of (1-4294967295).
-@end deffn
-
-@deffn {Route-map Command} {match local-preference @var{metric}} {}
-Matches the specified @var{local-preference}.
-@end deffn
-
-@deffn {Route-map Command} {match community @var{community_list}} {}
-Matches the specified  @var{community_list}
-@end deffn
-
-@deffn {Route-map Command} {match peer @var{ipv4_addr}} {}
-This is a BGP specific match command.  Matches the peer ip address
-if the neighbor was specified in this manner.
-@end deffn
-
-@deffn {Route-map Command} {match peer @var{ipv6_addr}} {}
-This is a BGP specific match command.  Matches the peer ipv6
-address if the neighbor was specified in this manner.
-@end deffn
-
-@deffn {Route-map Command} {match peer @var{interface_name}} {}
-This is a BGP specific match command.  Matches the peer
-interface name specified if the neighbor was specified
-in this manner.
-@end deffn
-
-@node Route Map Set Command
-@section Route Map Set Command
-
-@deffn {Route-map Command} {set tag @var{tag}} {}
-Set a tag on the matched route.  This tag value can be from
-(1-4294967295).  Additionally if you have compiled with
-the --enable-realms configure option.  Tag values from (1-255)
-are sent to the linux kernel as a realm value.  Then route
-policy can be applied.  See the tc man page.
-@end deffn
-
-@deffn {Route-map Command} {set ip next-hop @var{ipv4_address}} {}
-Set the BGP nexthop address.
-@end deffn
-
-@deffn {Route-map Command} {set local-preference @var{local_pref}} {}
-Set the BGP local preference to @var{local_pref}. 
-@end deffn
-
-@deffn {Route-map Command} {set weight @var{weight}} {}
-Set the route's weight.
-@end deffn
-
-@deffn {Route-map Command} {set metric @var{metric}} {}
-@anchor{routemap set metric}
-Set the BGP attribute MED.
-@end deffn
-
-@deffn {Route-map Command} {set as-path prepend @var{as_path}} {}
-Set the BGP AS path to prepend.
-@end deffn
-
-@deffn {Route-map Command} {set community @var{community}} {}
-Set the BGP community attribute.
-@end deffn
-
-@deffn {Route-map Command} {set ipv6 next-hop global @var{ipv6_address}} {}
-Set the BGP-4+ global IPv6 nexthop address.
-@end deffn
-
-@deffn {Route-map Command} {set ipv6 next-hop local @var{ipv6_address}} {}
-Set the BGP-4+ link local IPv6 nexthop address.
-@end deffn
-
-@node Route Map Call Command
-@section Route Map Call Command
-
-@deffn {Route-map Command} {call @var{name}} {}
-Call route-map @var{name}. If it returns deny, deny the route and
-finish processing the route-map.
-@end deffn
-
-@node Route Map Exit Action Command
-@section Route Map Exit Action Command
-
-@deffn {Route-map Command} {on-match next} {}
-@deffnx {Route-map Command} {continue} {}
-Proceed on to the next entry in the route-map.
-@end deffn
-
-@deffn {Route-map Command} {on-match goto @var{N}} {}
-@deffnx {Route-map Command} {continue @var{N}} {}
-Proceed processing the route-map at the first entry whose order is >= N
-@end deffn
-
-@node Route Map Examples
-@section Route Map Examples
-
-A simple example of a route-map:
-
-@example
-@group
-route-map test permit 10
- match ip address 10
- set local-preference 200
-@end group
-@end example
-
-This means that if a route matches ip access-list number 10 it's
-local-preference value is set to 200.
-
-See @ref{BGP Configuration Examples} for examples of more sophisticated
-useage of route-maps, including of the @samp{call} action.
diff --git a/doc/routeserver.texi b/doc/routeserver.texi
deleted file mode 100644 (file)
index b258001..0000000
+++ /dev/null
@@ -1,561 +0,0 @@
-@c -*-texinfo-*-
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-@c
-@c This file is a modified version of Jose Luis Rubio's TeX sources 
-@c of his RS-Manual document
-
-@node Configuring Frr as a Route Server
-@chapter Configuring Frr as a Route Server
-
-The purpose of a Route Server is to centralize the peerings between BGP
-speakers. For example if we have an exchange point scenario with four BGP
-speakers, each of which maintaining a BGP peering with the other three
-(@pxref{fig:full-mesh}), we can convert it into a centralized scenario where
-each of the four establishes a single BGP peering against the Route Server
-(@pxref{fig:route-server}).
-
-We will first describe briefly the Route Server model implemented by Frr.
-We will explain the commands that have been added for configuring that
-model. And finally we will show a full example of Frr configured as Route
-Server.
-
-@menu
-* Description of the Route Server model::
-* Commands for configuring a Route Server::
-* Example of Route Server Configuration::
-@end menu
-
-@node Description of the Route Server model
-@section Description of the Route Server model
-
-First we are going to describe the normal processing that BGP announcements
-suffer inside a standard BGP speaker, as shown in @ref{fig:normal-processing},
-it consists of three steps:
-
-@itemize @bullet
-@item
-When an announcement is received from some peer, the `In' filters
-configured for that peer are applied to the announcement. These filters can
-reject the announcement, accept it unmodified, or accept it with some of its
-attributes modified.
-
-@item
-The announcements that pass the `In' filters go into the
-Best Path Selection process, where they are compared to other
-announcements referred to the same destination that have been
-received from different peers (in case such other
-announcements exist). For each different destination, the announcement
-which is selected as the best is inserted into the BGP speaker's Loc-RIB.
-
-@item
-The routes which are inserted in the Loc-RIB are
-considered for announcement to all the peers (except the one
-from which the route came). This is done by passing the routes
-in the Loc-RIB through the `Out' filters corresponding to each
-peer. These filters can reject the route,
-accept it unmodified, or accept it with some of its attributes
-modified. Those routes which are accepted by the `Out' filters
-of a peer are announced to that peer.
-@end itemize
-
-@float Figure,fig:normal-processing
-@image{fig-normal-processing,400pt,,Normal announcement processing}
-@caption{Announcement processing inside a ``normal'' BGP speaker}
-@end float
-
-@float Figure,fig:full-mesh
-@image{fig_topologies_full,120pt,,Full Mesh BGP Topology}
-@caption{Full Mesh}
-@end float
-
-@float Figure,fig:route-server
-@image{fig_topologies_rs,120pt,,Route Server BGP Topology}
-@caption{Route Server and clients} 
-@end float
-
-Of course we want that the routing tables obtained in each of the routers
-are the same when using the route server than when not. But as a consequence
-of having a single BGP peering (against the route server), the BGP speakers
-can no longer distinguish from/to which peer each announce comes/goes.
-@anchor{filter-delegation}This means that the routers connected to the route
-server are not able to apply by themselves the same input/output filters
-as in the full mesh scenario, so they have to delegate those functions to
-the route server.
-
-Even more, the ``best path'' selection must be also performed inside
-the route server on behalf of its clients. The reason is that if, after
-applying the filters of the announcer and the (potential) receiver, the
-route server decides to send to some client two or more different
-announcements referred to the same destination, the client will only
-retain the last one, considering it as an implicit withdrawal of the
-previous announcements for the same destination. This is the expected
-behavior of a BGP speaker as defined in @cite{RFC1771}, and even though
-there are some proposals of mechanisms that permit multiple paths for
-the same destination to be sent through a single BGP peering, none are
-currently supported by most existing BGP implementations.
-
-As a consequence a route server must maintain additional information and
-perform additional tasks for a RS-client that those necessary for common BGP
-peerings. Essentially a route server must:
-
-@anchor{Route Server tasks}
-@itemize @bullet
-@item
-Maintain a separated Routing Information Base (Loc-RIB)
-for each peer configured as RS-client, containing the routes
-selected as a result of the ``Best Path Selection'' process
-that is performed on behalf of that RS-client.
-
-@item
-Whenever it receives an announcement from a RS-client,
-it must consider it for the Loc-RIBs of the other RS-clients.
-
-@anchor{Route-server path filter process}
-@itemize @bullet
-@item
-This means that for each of them the route server must pass the
-announcement through the appropriate `Out' filter of the
-announcer.
-
-@item
-Then through the  appropriate `In' filter of
-the potential  receiver. 
-
-@item
-Only if the announcement is accepted by both filters it will be passed
-to the ``Best Path Selection'' process.
-
-@item
-Finally, it might go into the Loc-RIB of the receiver.
-@end itemize
-@end itemize
-
-When we talk about the ``appropriate'' filter, both the announcer and the
-receiver of the route must be taken into account. Suppose that the route
-server receives an announcement from client A, and the route server is
-considering it for the Loc-RIB of client B. The filters that should be
-applied are the same that would be used in the full mesh scenario, i.e.,
-first the `Out' filter of router A for announcements going to router B, and
-then the `In' filter of router B for announcements coming from router A.
-
-We call ``Export Policy'' of a RS-client to the set of `Out' filters that
-the client would use if there was no route server. The same applies for the
-``Import Policy'' of a RS-client and the set of `In' filters of the client
-if there was no route server.
-
-It is also common to demand from a route server that it does not
-modify some BGP attributes (next-hop, as-path and MED) that are usually
-modified by standard BGP speakers before announcing a route.
-
-The announcement processing model implemented by Frr is shown in
-@ref{fig:rs-processing}. The figure shows a mixture of RS-clients (B, C and D)
-with normal BGP peers (A). There are some details that worth additional
-comments:
-
-@itemize @bullet
-@item
-Announcements coming from a normal BGP peer are also
-considered for the Loc-RIBs of all the RS-clients. But
-logically they do not pass through any export policy.
-
-@item
-Those peers that are configured as RS-clients do not
-receive any announce from the `Main' Loc-RIB.
-
-@item
-Apart from import and export policies,
-`In' and `Out' filters can also be set for RS-clients. `In'
-filters might be useful when the route server has also normal
-BGP peers. On the other hand, `Out' filters for RS-clients are
-probably unnecessary, but we decided not to remove them as
-they do not hurt anybody (they can always be left empty).
-@end itemize
-
-@float Figure,fig:rs-processing
-@image{fig-rs-processing,450pt,,Route Server Processing Model}
-@caption{Announcement processing model implemented by the Route Server}
-@end float
-
-@node Commands for configuring a Route Server
-@section Commands for configuring a Route Server
-
-Now we will describe the commands that have been added to frr
-in order to support the route server features.
-
-@deffn {Route-Server} {neighbor @var{peer-group} route-server-client} {}
-@deffnx {Route-Server} {neighbor @var{A.B.C.D} route-server-client} {}
-@deffnx {Route-Server} {neighbor @var{X:X::X:X} route-server-client} {}
-This command configures the peer given by @var{peer}, @var{A.B.C.D} or
-@var{X:X::X:X} as an RS-client.
-
-Actually this command is not new, it already existed in standard Frr. It
-enables the transparent mode for the specified peer. This means that some
-BGP attributes (as-path, next-hop and MED) of the routes announced to that
-peer are not modified.
-
-With the route server patch, this command, apart from setting the
-transparent mode, creates a new Loc-RIB dedicated to the specified peer
-(those named `Loc-RIB for X' in @ref{fig:rs-processing}.). Starting from
-that moment, every announcement received by the route server will be also
-considered for the new Loc-RIB.
-@end deffn
-
-@deffn {Route-Server} {neigbor @{A.B.C.D|X.X::X.X|peer-group@} route-map WORD @{import|export@}} {}
-This set of commands can be used to specify the route-map that
-represents the Import or Export policy of a peer which is
-configured as a RS-client (with the previous command).
-@end deffn
-
-@deffn {Route-Server} {match peer @{A.B.C.D|X:X::X:X@}} {}
-This is a new @emph{match} statement for use in route-maps, enabling them to
-describe import/export policies. As we said before, an import/export policy
-represents a set of input/output filters of the RS-client. This statement
-makes possible that a single route-map represents the full set of filters
-that a BGP speaker would use for its different peers in a non-RS scenario.
-
-The @emph{match peer} statement has different semantics whether it is used
-inside an import or an export route-map. In the first case the statement
-matches if the address of the peer who sends the announce is the same that
-the address specified by @{A.B.C.D|X:X::X:X@}. For export route-maps it
-matches when @{A.B.C.D|X:X::X:X@} is the address of the RS-Client into whose
-Loc-RIB the announce is going to be inserted (how the same export policy is
-applied before different Loc-RIBs is shown in @ref{fig:rs-processing}.).
-@end deffn
-
-@deffn {Route-map Command} {call @var{WORD}} {}
-This command (also used inside a route-map) jumps into a different
-route-map, whose name is specified by @var{WORD}. When the called
-route-map finishes, depending on its result the original route-map
-continues or not. Apart from being useful for making import/export
-route-maps easier to write, this command can also be used inside
-any normal (in or out) route-map.
-@end deffn
-
-@node Example of Route Server Configuration
-@section Example of Route Server Configuration
-
-Finally we are going to show how to configure a Frr daemon to act as a
-Route Server. For this purpose we are going to present a scenario without
-route server, and then we will show how to use the configurations of the BGP
-routers to generate the configuration of the route server.
-
-All the configuration files shown in this section have been taken
-from scenarios which were tested using the VNUML tool
-@uref{http://www.dit.upm.es/vnuml,VNUML}. 
-
-@menu
-* Configuration of the BGP routers without Route Server::
-* Configuration of the BGP routers with Route Server::
-* Configuration of the Route Server itself::
-* Further considerations about Import and Export route-maps::
-@end menu
-
-@node Configuration of the BGP routers without Route Server
-@subsection Configuration of the BGP routers without Route Server
-
-We will suppose that our initial scenario is an exchange point with three
-BGP capable routers, named RA, RB and RC. Each of the BGP speakers generates
-some routes (with the @var{network} command), and establishes BGP peerings
-against the other two routers. These peerings have In and Out route-maps
-configured, named like ``PEER-X-IN'' or ``PEER-X-OUT''. For example the
-configuration file for router RA could be the following:
-
-@exampleindent 0
-@example
-#Configuration for router 'RA'
-!
-hostname RA
-password ****
-!
-router bgp 65001
-  no bgp default ipv4-unicast
-  neighbor 2001:0DB8::B remote-as 65002
-  neighbor 2001:0DB8::C remote-as 65003
-!
-  address-family ipv6
-    network 2001:0DB8:AAAA:1::/64
-    network 2001:0DB8:AAAA:2::/64
-    network 2001:0DB8:0000:1::/64
-    network 2001:0DB8:0000:2::/64
-
-    neighbor 2001:0DB8::B activate
-    neighbor 2001:0DB8::B soft-reconfiguration inbound
-    neighbor 2001:0DB8::B route-map PEER-B-IN in
-    neighbor 2001:0DB8::B route-map PEER-B-OUT out
-
-    neighbor 2001:0DB8::C activate
-    neighbor 2001:0DB8::C soft-reconfiguration inbound
-    neighbor 2001:0DB8::C route-map PEER-C-IN in
-    neighbor 2001:0DB8::C route-map PEER-C-OUT out
-  exit-address-family
-!
-ipv6 prefix-list COMMON-PREFIXES seq  5 permit 2001:0DB8:0000::/48 ge 64 le 64
-ipv6 prefix-list COMMON-PREFIXES seq 10 deny any
-!
-ipv6 prefix-list PEER-A-PREFIXES seq  5 permit 2001:0DB8:AAAA::/48 ge 64 le 64
-ipv6 prefix-list PEER-A-PREFIXES seq 10 deny any
-!
-ipv6 prefix-list PEER-B-PREFIXES seq  5 permit 2001:0DB8:BBBB::/48 ge 64 le 64
-ipv6 prefix-list PEER-B-PREFIXES seq 10 deny any
-!
-ipv6 prefix-list PEER-C-PREFIXES seq  5 permit 2001:0DB8:CCCC::/48 ge 64 le 64
-ipv6 prefix-list PEER-C-PREFIXES seq 10 deny any
-!
-route-map PEER-B-IN permit 10
-  match ipv6 address prefix-list COMMON-PREFIXES
-  set metric 100
-route-map PEER-B-IN permit 20
-  match ipv6 address prefix-list PEER-B-PREFIXES
-  set community 65001:11111
-!
-route-map PEER-C-IN permit 10
-  match ipv6 address prefix-list COMMON-PREFIXES
-  set metric 200
-route-map PEER-C-IN permit 20
-  match ipv6 address prefix-list PEER-C-PREFIXES
-  set community 65001:22222
-!
-route-map PEER-B-OUT permit 10
-  match ipv6 address prefix-list PEER-A-PREFIXES
-!
-route-map PEER-C-OUT permit 10
-  match ipv6 address prefix-list PEER-A-PREFIXES
-!
-line vty
-!
-@end example
-
-@node Configuration of the BGP routers with Route Server
-@subsection Configuration of the BGP routers with Route Server
-
-To convert the initial scenario into one with route server, first we must
-modify the configuration of routers RA, RB and RC. Now they must not peer
-between them, but only with the route server. For example, RA's
-configuration would turn into:
-
-@example
-# Configuration for router 'RA'
-!
-hostname RA
-password ****
-!
-router bgp 65001
-  no bgp default ipv4-unicast
-  neighbor 2001:0DB8::FFFF remote-as 65000
-!
-  address-family ipv6
-    network 2001:0DB8:AAAA:1::/64
-    network 2001:0DB8:AAAA:2::/64
-    network 2001:0DB8:0000:1::/64
-    network 2001:0DB8:0000:2::/64
-
-    neighbor 2001:0DB8::FFFF activate
-    neighbor 2001:0DB8::FFFF soft-reconfiguration inbound
-  exit-address-family
-!
-line vty
-!
-@end example
-
-Which is logically much simpler than its initial configuration, as it now
-maintains only one BGP peering and all the filters (route-maps) have
-disappeared.
-
-@node Configuration of the Route Server itself
-@subsection Configuration of the Route Server itself
-
-As we said when we described the functions of a route server
-(@pxref{Description of the Route Server model}), it is in charge of all the
-route filtering. To achieve that, the In and Out filters from the RA, RB and
-RC configurations must be converted into Import and Export policies in the
-route server.
-
-This is a fragment of the route server configuration (we only show
-the policies for client RA):
-
-@example
-# Configuration for Route Server ('RS')
-!
-hostname RS
-password ix
-!
-bgp multiple-instance
-!
-router bgp 65000 view RS
-  no bgp default ipv4-unicast
-  neighbor 2001:0DB8::A  remote-as 65001
-  neighbor 2001:0DB8::B  remote-as 65002
-  neighbor 2001:0DB8::C  remote-as 65003
-!
-  address-family ipv6
-    neighbor 2001:0DB8::A activate
-    neighbor 2001:0DB8::A route-server-client
-    neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import
-    neighbor 2001:0DB8::A route-map RSCLIENT-A-EXPORT export
-    neighbor 2001:0DB8::A soft-reconfiguration inbound
-
-    neighbor 2001:0DB8::B activate
-    neighbor 2001:0DB8::B route-server-client
-    neighbor 2001:0DB8::B route-map RSCLIENT-B-IMPORT import
-    neighbor 2001:0DB8::B route-map RSCLIENT-B-EXPORT export
-    neighbor 2001:0DB8::B soft-reconfiguration inbound
-
-    neighbor 2001:0DB8::C activate
-    neighbor 2001:0DB8::C route-server-client
-    neighbor 2001:0DB8::C route-map RSCLIENT-C-IMPORT import
-    neighbor 2001:0DB8::C route-map RSCLIENT-C-EXPORT export
-    neighbor 2001:0DB8::C soft-reconfiguration inbound
-  exit-address-family
-!
-ipv6 prefix-list COMMON-PREFIXES seq  5 permit 2001:0DB8:0000::/48 ge 64 le 64
-ipv6 prefix-list COMMON-PREFIXES seq 10 deny any
-!
-ipv6 prefix-list PEER-A-PREFIXES seq  5 permit 2001:0DB8:AAAA::/48 ge 64 le 64
-ipv6 prefix-list PEER-A-PREFIXES seq 10 deny any
-!
-ipv6 prefix-list PEER-B-PREFIXES seq  5 permit 2001:0DB8:BBBB::/48 ge 64 le 64
-ipv6 prefix-list PEER-B-PREFIXES seq 10 deny any
-!
-ipv6 prefix-list PEER-C-PREFIXES seq  5 permit 2001:0DB8:CCCC::/48 ge 64 le 64
-ipv6 prefix-list PEER-C-PREFIXES seq 10 deny any
-!
-route-map RSCLIENT-A-IMPORT permit 10
-  match peer 2001:0DB8::B
-  call A-IMPORT-FROM-B
-route-map RSCLIENT-A-IMPORT permit 20
-  match peer 2001:0DB8::C
-  call A-IMPORT-FROM-C
-!
-route-map A-IMPORT-FROM-B permit 10
-  match ipv6 address prefix-list COMMON-PREFIXES
-  set metric 100
-route-map A-IMPORT-FROM-B permit 20
-  match ipv6 address prefix-list PEER-B-PREFIXES
-  set community 65001:11111
-!
-route-map A-IMPORT-FROM-C permit 10
-  match ipv6 address prefix-list COMMON-PREFIXES
-  set metric 200
-route-map A-IMPORT-FROM-C permit 20
-  match ipv6 address prefix-list PEER-C-PREFIXES
-  set community 65001:22222
-!
-route-map RSCLIENT-A-EXPORT permit 10
-  match peer 2001:0DB8::B
-  match ipv6 address prefix-list PEER-A-PREFIXES
-route-map RSCLIENT-A-EXPORT permit 20
-  match peer 2001:0DB8::C
-  match ipv6 address prefix-list PEER-A-PREFIXES
-!
-...
-...
-...
-@end example
-
-If you compare the initial configuration of RA with the route server
-configuration above, you can see how easy it is to generate the Import and
-Export policies for RA from the In and Out route-maps of RA's original
-configuration.
-
-When there was no route server, RA maintained two peerings, one with RB and
-another with RC. Each of this peerings had an In route-map configured. To
-build the Import route-map for client RA in the route server, simply add
-route-map entries following this scheme:
-
-@example
-route-map <NAME> permit 10
-    match peer <Peer Address>
-    call <In Route-Map for this Peer>
-route-map <NAME> permit 20
-    match peer <Another Peer Address>
-    call <In Route-Map for this Peer>
-@end example
-
-This is exactly the process that has been followed to generate the route-map
-RSCLIENT-A-IMPORT. The route-maps that are called inside it (A-IMPORT-FROM-B
-and A-IMPORT-FROM-C) are exactly the same than the In route-maps from the
-original configuration of RA (PEER-B-IN and PEER-C-IN), only the name is
-different.
-
-The same could have been done to create the Export policy for RA (route-map
-RSCLIENT-A-EXPORT), but in this case the original Out route-maps where so
-simple that we decided not to use the @var{call WORD} commands, and we
-integrated all in a single route-map (RSCLIENT-A-EXPORT).
-
-The Import and Export policies for RB and RC are not shown, but
-the process would be identical.
-
-@node Further considerations about Import and Export route-maps
-@subsection Further considerations about Import and Export route-maps
-
-The current version of the route server patch only allows to specify a
-route-map for import and export policies, while in a standard BGP speaker
-apart from route-maps there are other tools for performing input and output
-filtering (access-lists, community-lists, ...). But this does not represent
-any limitation, as all kinds of filters can be included in import/export
-route-maps. For example suppose that in the non-route-server scenario peer
-RA had the following filters configured for input from peer B:
-
-@example
-    neighbor 2001:0DB8::B prefix-list LIST-1 in
-    neighbor 2001:0DB8::B filter-list LIST-2 in
-    neighbor 2001:0DB8::B route-map PEER-B-IN in
-    ...
-    ...
-route-map PEER-B-IN permit 10
-  match ipv6 address prefix-list COMMON-PREFIXES
-  set local-preference 100
-route-map PEER-B-IN permit 20
-  match ipv6 address prefix-list PEER-B-PREFIXES
-  set community 65001:11111
-@end example
-
-It is posible to write a single route-map which is equivalent to
-the three filters (the community-list, the prefix-list and the
-route-map). That route-map can then be used inside the Import
-policy in the route server. Lets see how to do it:
-
-@example
-    neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import
-    ...
-!
-...
-route-map RSCLIENT-A-IMPORT permit 10
-  match peer 2001:0DB8::B
-  call A-IMPORT-FROM-B
-...
-...
-!
-route-map A-IMPORT-FROM-B permit 1
-  match ipv6 address prefix-list LIST-1
-  match as-path LIST-2
-  on-match goto 10
-route-map A-IMPORT-FROM-B deny 2
-route-map A-IMPORT-FROM-B permit 10
-  match ipv6 address prefix-list COMMON-PREFIXES
-  set local-preference 100
-route-map A-IMPORT-FROM-B permit 20
-  match ipv6 address prefix-list PEER-B-PREFIXES
-  set community 65001:11111
-!
-...
-...
-@end example
-
-The route-map A-IMPORT-FROM-B is equivalent to the three filters
-(LIST-1, LIST-2 and PEER-B-IN). The first entry of route-map
-A-IMPORT-FROM-B (sequence number 1) matches if and only if both
-the prefix-list LIST-1 and the filter-list LIST-2 match. If that
-happens, due to the ``on-match goto 10'' statement the next
-route-map entry to be processed will be number 10, and as of that
-point route-map A-IMPORT-FROM-B is identical to PEER-B-IN. If
-the first entry does not match, `on-match goto 10'' will be
-ignored and the next processed entry will be number 2, which will
-deny the route.
-
-Thus, the result is the same that with the three original filters,
-i.e., if either LIST-1 or LIST-2 rejects the route, it does not
-reach the route-map PEER-B-IN. In case both LIST-1 and LIST-2
-accept the route, it passes to PEER-B-IN, which can reject, accept
-or modify the route.
diff --git a/doc/rpki.texi b/doc/rpki.texi
deleted file mode 100644 (file)
index c1c8a8a..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the FRR Manual.
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-@node Prefix Origin Validation Using RPKI
-@section Prefix Origin Validation Using RPKI
-
-Prefix Origin Validation allows BGP routers to verify if the origin AS of
-an IP prefix is legitimate to announce this IP prefix. The required
-attestation objects are stored in the Resource Public Key Infrastructure
-(@acronym{RPKI}).  However, RPKI-enabled routers do not store cryptographic
-data itself but only validation information. The validation of the
-cryptographic data (so called Route Origin Authorization, or short
-@acronym{ROA}, objects) will be performed by trusted cache servers. The
-RPKI/RTR protocol defines a standard mechanism to maintain the exchange of
-the prefix/origin AS mapping between the cache server and routers.
-In combination with a  BGP Prefix Origin Validation scheme a router is able
-to verify received BGP updates without suffering from cryptographic
-complexity.
-
-
-The RPKI/RTR protocol is defined in @cite{RFC6810, The Resource Public Key
-Infrastructure (RPKI) to Router Protocol}, and the validation scheme in
-@cite{RFC6811, BGP Prefix Origin Validation}. The current version of Prefix
-Origin Validation in FRR implements both RFCs.
-
-For a more detailed but still easy-to-read background, we suggest the
-following two articles:
-@enumerate
-@item @cite{Geoff Huston, Randy Bush: Securing BGP, In: The Internet
-Protocol Journal, Volume 14, No. 2, 2011.}
-@uref{http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_14-2/142_bgp.html}
-
-@item @cite{Geoff Huston: Resource Certification, In: The Internet Protocol
-Journal, Volume 12, No.1, 2009.}
-@uref{http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_12-1/121_resource.html}
-@end enumerate
-
-@menu
-* Features of the Current Implementation::
-* Enabling RPKI::
-* Configuring RPKI/RTR Cache Servers::
-* Validating BGP Updates::
-* Debugging::
-* Displaying RPKI::
-* RPKI Configuration Example::
-@end menu
-
-@node Features of the Current Implementation
-@subsection Features of the Current Implementation
-
-In a nutshell, the current implementation provides the following features
-@itemize @bullet
-@item The BGP router can connect to one or more RPKI cache servers to
-receive validated prefix to origin AS mappings.
-Advanced failover can be implemented by server sockets with different
-preference values.
-
-@item If no connection to an RPKI cache server can be established after a
-pre-defined timeout, the router will process routes without prefix origin
-validation. It still will try to establish a connection to an RPKI cache
-server in the background.
-
-@item By default, enabling RPKI does not change best path selection. In
-particular, invalid prefixes will still be considered during best path
-selection.  However, the router can be configured to ignore all invalid
-prefixes.
-
-@item Route maps can be configured to match a specific RPKI validation
-state. This allows the creation of local policies, which handle BGP routes
-based on the outcome of the Prefix Origin Validation.
-
-@c @item When the router receives updated validation information from the RPKI
-@c cache server, all routes in the local routing table will be re-evaluated.
-
-@end itemize
-
-
-@node Enabling RPKI
-@subsection Enabling RPKI
-@deffn {Command} {rpki} {}
-This command enables the RPKI configuration mode. Most commands that start
-with @command{rpki} can only be used in this mode.
-
-When it is used in a telnet session, leaving of this mode cause rpki to be initialized.
-
-Executing this command alone does not activate prefix
-validation. You need to configure at least one reachable cache server. See section
-@ref{Configuring RPKI/RTR Cache Servers} for configuring a cache server.
-@end deffn
-
-@node Configuring RPKI/RTR Cache Servers
-@subsection Configuring RPKI/RTR Cache Servers
-
-The following commands are independent of a specific cache server.
-
-@deffn {RPKI Command} {rpki polling_period <1-3600>} {}
-@deffnx {RPKI Command} {no rpki polling_period} {}
-Set the number of seconds the router waits until the router asks the cache again
-for updated data.
-
-The default value is 300 seconds.
-@end deffn
-
-@deffn {RPKI Command} {rpki timeout <1-4,294,967,296>} {}
-@deffnx {RPKI Command} {no rpki timeout} {}
-Set the number of seconds the router waits for the cache reply. If the
-cache server is not replying within this time period, the router deletes
-all received prefix records from the prefix table.
-
-The default value is 600 seconds.
-@end deffn
-
-@deffn {RPKI Command} {rpki initial-synchronisation-timeout <1-4,294,967,296>} {}
-@deffnx {RPKI Command} {no rpki initial-synchronisation-timeout} {}
-Set the number of seconds until the first synchronization with the cache
-server needs to be completed. If the timeout expires, BGP routing is
-started without RPKI. The router will try to establish the cache server
-connection in the background.
-
-The default value is 30 seconds.
-@end deffn
-
-@noindent The following commands configure one or multiple cache servers.
-
-@deffn {RPKI Socket Command} {rpki cache (@var{A.B.C.D}|@var{WORD}) @var{PORT} [@var{SSH_USERNAME}] [@var{SSH_PRIVKEY_PATH}] [@var{SSH_PUBKEY_PATH}] [@var{KNOWN_HOSTS_PATH}] @var{PREFERENCE}} {}
-@deffnx {RPKI Socket Command} {no rpki cache (@var{A.B.C.D}|@var{WORD}) [@var{PORT}] @var{PREFERENCE}} {}
-Add a cache server to the socket. By default, the connection between
-router and cache server is based on plain TCP. Protecting the connection
-between router and cache server by SSH is optional.
-Deleting a socket removes the associated cache server and
-terminates the existing connection.
-@end deffn
-
-@table @code
-@item @var{A.B.C.D}|@var{WORD}
-Address of the cache server.
-
-@item @var{PORT}
-Port number to connect to the cache server
-
-@item @var{SSH_USERNAME}
-SSH username to establish an SSH connection to the cache server.
-
-@item @var{SSH_PRIVKEY_PATH}
-Local path that includes the private key file of the router.
-
-@item @var{SSH_PUBKEY_PATH}
-Local path that includes the public key file of the router.
-
-@item @var{KNOWN_HOSTS_PATH}
-Local path that includes the known hosts file. The default value depends on the
-configuration of the operating system environment, usually
-@file{~/.ssh/known_hosts}.
-
-@end table
-
-@node Validating BGP Updates
-@subsection Validating BGP Updates
-
-@deffn {Route Map Command} {match rpki @{notfound|invalid|valid@}} {}
-@deffnx {Route Map Command} {no match rpki @{notfound|invalid|valid@}} {}
-Create a clause for a route map to match prefixes with the specified RPKI state.
-
-@strong{Note} that the matching of invalid prefixes requires that invalid
-prefixes are considered for best path selection, i.e., @command{bgp
-bestpath prefix-validate disallow-invalid} is not enabled.
-
-In the following example, the router prefers valid routes over invalid
-prefixes because invalid routes have a lower local preference.
-@example
-  ! Allow for invalid routes in route selection process
-  route bgp 60001
-  !
-  ! Set local preference of invalid prefixes to 10
-  route-map rpki permit 10
-   match rpki invalid
-   set local-preference 10
-  !
-  ! Set local preference of valid prefixes to 500
-  route-map rpki permit 500
-   match rpki valid
-   set local-preference 500
-@end example
-
-@end deffn
-
-@node Debugging
-@subsection Debugging
-
-@deffn {Command} {debug rpki} {}
-@deffnx {Command} {no debug rpki} {}
-Enable or disable debugging output for RPKI.
-@end deffn
-
-
-@node Displaying RPKI
-@subsection Displaying RPKI
-
-@deffn {Command} {show rpki prefix-table} {}
-Display all validated prefix to origin AS mappings/records which have been
-received from the cache servers and stored in the router. Based on this data,
-the router validates BGP Updates.
-@end deffn
-
-@deffn {Command} {show rpki cache-connection} {}
-Display all configured cache servers, whether active or not.
-@end deffn
-
-@node RPKI Configuration Example
-@subsection RPKI Configuration Example
-
-
-@example
-hostname bgpd1
-password zebra
-! log stdout
-debug bgp updates
-debug bgp keepalives
-debug rpki
-!
-rpki
- rpki polling_period 1000
- rpki timeout 10
-  ! SSH Example:
-  rpki cache example.com 22 rtr-ssh ./ssh_key/id_rsa ./ssh_key/id_rsa.pub preference 1
-  ! TCP Example:
-  rpki cache rpki-validator.realmv6.org 8282 preference 2
-  exit
-!
-router bgp 60001
- bgp router-id 141.22.28.223
- network 192.168.0.0/16
- neighbor 123.123.123.0 remote-as 60002
- neighbor 123.123.123.0 route-map rpki in
-!
- address-family ipv6
-  neighbor 123.123.123.0 activate
-   neighbor 123.123.123.0 route-map rpki in
- exit-address-family
-!
-route-map rpki permit 10
- match rpki invalid
- set local-preference 10
-!
-route-map rpki permit 20
- match rpki notfound
- set local-preference 20
-!
-route-map rpki permit 30
- match rpki valid
- set local-preference 30
-!
-route-map rpki permit 40
-!
-@end example
diff --git a/doc/snmp.texi b/doc/snmp.texi
deleted file mode 100644 (file)
index d965694..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-@node SNMP Support
-@chapter SNMP Support
-
-@acronym{SNMP,Simple Network Managing Protocol} is a widely implemented
-feature for collecting network information from router and/or host.
-Frr itself does not support SNMP agent (server daemon) functionality
-but is able to connect to a SNMP agent using the SMUX protocol
-(@cite{RFC1227}) or the AgentX protocol (@cite{RFC2741}) and make the
-routing protocol MIBs available through it.
-
-Note that SNMP Support needs to be enabled at compile-time and loaded as
-module on daemon startup.  Refer to @ref{Loadable Module Support} on
-the latter.
-
-@menu
-* Getting and installing an SNMP agent::
-* AgentX configuration::
-* SMUX configuration::
-* MIB and command reference::
-* Handling SNMP Traps::
-@end menu
-
-@node Getting and installing an SNMP agent
-@section Getting and installing an SNMP agent
-
-There are several SNMP agent which support SMUX or AgentX. We recommend to use the latest
-version of @code{net-snmp} which was formerly known as @code{ucd-snmp}.
-It is free and open software and available at @uref{http://www.net-snmp.org/}
-and as binary package for most Linux distributions.
-@code{net-snmp} has to be compiled with @code{--with-mib-modules=agentx} to
-be able to accept connections from Frr using AgentX protocol or with
-@code{--with-mib-modules=smux} to use SMUX protocol.
-
-Nowadays, SMUX is a legacy protocol. The AgentX protocol should be
-preferred for any new deployment. Both protocols have the same coverage.
-
-@node AgentX configuration
-@section AgentX configuration
-
-To enable AgentX protocol support, Frr must have been build with the
-@code{--enable-snmp} or @code{--enable-snmp=agentx} option. Both the
-master SNMP agent (snmpd) and each of the Frr daemons must be
-configured. In @code{/etc/snmp/snmpd.conf}, @code{master agentx}
-directive should be added. In each of the Frr daemons, @code{agentx}
-command will enable AgentX support.
-
-@example
-/etc/snmp/snmpd.conf:
-       #
-       # example access restrictions setup
-       #
-       com2sec readonly default public
-       group MyROGroup v1 readonly
-       view all included .1 80
-       access MyROGroup "" any noauth exact all none none
-       #
-       # enable master agent for AgentX subagents
-       #
-       master agentx
-
-/etc/frr/ospfd.conf:
-       ! ... the rest of ospfd.conf has been omitted for clarity ...
-       !
-       agentx
-       !
-@end example
-
-Upon successful connection, you should get something like this in the
-log of each Frr daemons:
-
-@example
-2012/05/25 11:39:08 ZEBRA: snmp[info]: NET-SNMP version 5.4.3 AgentX subagent connected
-@end example
-
-Then, you can use the following command to check everything works as expected:
-
-@example
-# snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
-OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
-[...]
-@end example
-
-The AgentX protocol can be transported over a Unix socket or using TCP
-or UDP. It usually defaults to a Unix socket and depends on how NetSNMP
-was built. If need to configure Frr to use another transport, you can
-configure it through @code{/etc/snmp/frr.conf}:
-
-@example
-/etc/snmp/frr.conf:
-       [snmpd]
-       # Use a remote master agent
-       agentXSocket tcp:192.168.15.12:705
-@end example
-
-@node SMUX configuration
-@section SMUX configuration
-
-To enable SMUX protocol support, Frr must have been build with the
-@code{--enable-snmp=smux} option.
-
-A separate connection has then to be established between the
-SNMP agent (snmpd) and each of the Frr daemons. This connections
-each use different OID numbers and passwords. Be aware that this OID
-number is not the one that is used in queries by clients, it is solely
-used for the intercommunication of the daemons.
-
-In the following example the ospfd daemon will be connected to the
-snmpd daemon using the password "frr_ospfd". For testing it is
-recommending to take exactly the below snmpd.conf as wrong access
-restrictions can be hard to debug.
-
-@example
-/etc/snmp/snmpd.conf:
-       #
-       # example access restrictions setup
-       #
-       com2sec readonly default public
-       group MyROGroup v1 readonly
-       view all included .1 80
-       access MyROGroup "" any noauth exact all none none
-       #
-       # the following line is relevant for Frr
-       #
-       smuxpeer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
-
-/etc/frr/ospf:
-       ! ... the rest of ospfd.conf has been omitted for clarity ...
-       !
-       smux peer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
-       !
-@end example
-
-After restarting snmpd and frr, a successful connection can be verified in
-the syslog and by querying the SNMP daemon:
-
-@example
-snmpd[12300]: [smux_accept] accepted fd 12 from 127.0.0.1:36255 
-snmpd[12300]: accepted smux peer: \
-       oid GNOME-PRODUCT-ZEBRA-MIB::ospfd, frr-0.96.5
-
-# snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
-OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
-@end example
-
-Be warned that the current version (5.1.1) of the Net-SNMP daemon writes a line
-for every SNMP connect to the syslog which can lead to enormous log file sizes.
-If that is a problem you should consider to patch snmpd and comment out the
-troublesome @code{snmp_log()} line in the function
-@code{netsnmp_agent_check_packet()} in @code{agent/snmp_agent.c}.
-
-@node MIB and command reference
-@section MIB and command reference
-
-The following OID numbers are used for the interprocess communication of snmpd and
-the Frr daemons with SMUX only.
-@example
-            (OIDs below .iso.org.dod.internet.private.enterprises)
-zebra  .1.3.6.1.4.1.3317.1.2.1 .gnome.gnomeProducts.zebra.zserv
-bgpd   .1.3.6.1.4.1.3317.1.2.2 .gnome.gnomeProducts.zebra.bgpd
-ripd   .1.3.6.1.4.1.3317.1.2.3 .gnome.gnomeProducts.zebra.ripd
-ospfd  .1.3.6.1.4.1.3317.1.2.5 .gnome.gnomeProducts.zebra.ospfd
-ospf6d .1.3.6.1.4.1.3317.1.2.6 .gnome.gnomeProducts.zebra.ospf6d
-@end example
-
-Sadly, SNMP has not been implemented in all daemons yet. The following
-OID numbers are used for querying the SNMP daemon by a client:
-@example
-zebra  .1.3.6.1.2.1.4.24   .iso.org.dot.internet.mgmt.mib-2.ip.ipForward
-ospfd  .1.3.6.1.2.1.14     .iso.org.dot.internet.mgmt.mib-2.ospf
-bgpd   .1.3.6.1.2.1.15     .iso.org.dot.internet.mgmt.mib-2.bgp 
-ripd   .1.3.6.1.2.1.23     .iso.org.dot.internet.mgmt.mib-2.rip2
-ospf6d .1.3.6.1.3.102      .iso.org.dod.internet.experimental.ospfv3
-@end example
-
-The following syntax is understood by the Frr daemons for configuring SNMP using SMUX:
-@deffn {Command} {smux peer @var{oid}} {}
-@deffnx {Command} {no smux peer @var{oid}} {}
-@end deffn
-
-@deffn {Command} {smux peer @var{oid} @var{password}} {}
-@deffnx {Command} {no smux peer @var{oid} @var{password}} {}
-@end deffn
-
-Here is the syntax for using AgentX:
-@deffn {Command} {agentx} {}
-@deffnx {Command} {no agentx} {}
-@end deffn
-
-@include snmptrap.texi
diff --git a/doc/snmptrap.texi b/doc/snmptrap.texi
deleted file mode 100644 (file)
index 0dd3a70..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-@c Documentation on configuring Frr and snmpd for SNMP traps
-@c contributed by Jeroen Simonetti, jsimonetti@denit.net
-
-@node Handling SNMP Traps
-@section Handling SNMP Traps
-
-To handle snmp traps make sure your snmp setup of frr works
-correctly as described in the frr documentation in @xref{SNMP Support}.
-
-The BGP4 mib will send traps on peer up/down events. These should be
-visible in your snmp logs with a message similar to:
-
-@samp{snmpd[13733]: Got trap from peer on fd 14}
-
-To react on these traps they should be handled by a trapsink. Configure
-your trapsink by adding the following lines to @file{/etc/snmpd/snmpd.conf}:
-
-@example
-  # send traps to the snmptrapd on localhost
-  trapsink localhost
-@end example
-
-This will send all traps to an snmptrapd running on localhost. You can
-of course also use a dedicated management station to catch traps.
-Configure the snmptrapd daemon by adding the following line to
-@file{/etc/snmpd/snmptrapd.conf}:
-
-@c Documentation contributed by Jeroen Simonetti, jsimonetti@denit.net
-
-@example
-  traphandle .1.3.6.1.4.1.3317.1.2.2 /etc/snmp/snmptrap_handle.sh
-@end example
-
-This will use the bash script @file{/etc/snmp/snmptrap_handle.sh} to handle
-the BGP4 traps. To add traps for other protocol daemons, lookup their
-appropriate OID from their mib. (For additional information about which
-traps are supported by your mib, lookup the mib on
-@uref{http://www.oidview.com/mibs/detail.html}).
-
-Make sure snmptrapd is started.
-
-The snmptrap_handle.sh script I personally use for handling BGP4 traps
-is below. You can of course do all sorts of things when handling traps,
-like sound a siren, have your display flash, etc., be creative ;).
-
-@verbatim
-  #!/bin/bash
-
-  # routers name
-  ROUTER=`hostname -s`
-
-  #email address use to sent out notification
-  EMAILADDR="john@doe.com"
-  #email address used (allongside above) where warnings should be sent
-  EMAILADDR_WARN="sms-john@doe.com"
-
-  # type of notification
-  TYPE="Notice"
-
-  # local snmp community for getting AS belonging to peer
-  COMMUNITY="<community>"
-
-  # if a peer address is in $WARN_PEERS a warning should be sent
-  WARN_PEERS="192.0.2.1"
-
-
-  # get stdin
-  INPUT=`cat -`
-
-  # get some vars from stdin
-  uptime=`echo $INPUT | cut -d' ' -f5`
-  peer=`echo $INPUT | cut -d' ' -f8 | sed -e 's/SNMPv2-SMI::mib-2.15.3.1.14.//g'`
-  peerstate=`echo $INPUT | cut -d' ' -f13`
-  errorcode=`echo $INPUT | cut -d' ' -f9 | sed -e 's/\"//g'`
-  suberrorcode=`echo $INPUT | cut -d' ' -f10 | sed -e 's/\"//g'`
-  remoteas=`snmpget -v2c -c $COMMUNITY localhost SNMPv2-SMI::mib-2.15.3.1.9.$peer | cut -d' ' -f4`
-
-  WHOISINFO=`whois -h whois.ripe.net " -r AS$remoteas" | egrep '(as-name|descr)'`
-  asname=`echo "$WHOISINFO" | grep "^as-name:" | sed -e 's/^as-name://g' -e 's/  //g' -e 's/^ //g' | uniq`
-  asdescr=`echo "$WHOISINFO" | grep "^descr:" | sed -e 's/^descr://g' -e 's/  //g' -e 's/^ //g' | uniq`
-
-  # if peer address is in $WARN_PEER, the email should also
-  # be sent to $EMAILADDR_WARN
-  for ip in $WARN_PEERS; do
-    if [ "x$ip" == "x$peer" ]; then
-      EMAILADDR="$EMAILADDR,$EMAILADDR_WARN"
-      TYPE="WARNING"
-      break
-    fi
-  done
-  
-
-  # convert peer state
-  case "$peerstate" in
-    1) peerstate="Idle" ;;
-    2) peerstate="Connect" ;;
-    3) peerstate="Active" ;;
-    4) peerstate="Opensent" ;;
-    5) peerstate="Openconfirm" ;;
-    6) peerstate="Established" ;;
-    *) peerstate="Unknown" ;;
-  esac
-
-  # get textual messages for errors
-  case "$errorcode" in
-    00)
-      error="No error"
-      suberror=""
-      ;;
-    01)
-      error="Message Header Error"
-      case "$suberrorcode" in
-        01) suberror="Connection Not Synchronized" ;;
-        02) suberror="Bad Message Length" ;;
-        03) suberror="Bad Message Type" ;;
-        *) suberror="Unknown" ;;
-      esac
-      ;;
-    02)    
-      error="OPEN Message Error"
-      case "$suberrorcode" in
-        01) suberror="Unsupported Version Number" ;;
-        02) suberror="Bad Peer AS" ;;
-        03) suberror="Bad BGP Identifier" ;;
-        04) suberror="Unsupported Optional Parameter" ;;
-        05) suberror="Authentication Failure" ;;
-        06) suberror="Unacceptable Hold Time" ;;
-        *) suberror="Unknown" ;;
-      esac
-      ;;
-    03)
-      error="UPDATE Message Error"
-      case "$suberrorcode" in
-        01) suberror="Malformed Attribute List" ;;
-        02) suberror="Unrecognized Well-known Attribute" ;;
-        03) suberror="Missing Well-known Attribute" ;;
-        04) suberror="Attribute Flags Error" ;;
-        05) suberror="Attribute Length Error" ;;
-        06) suberror="Invalid ORIGIN Attribute" ;;
-        07) suberror="AS Routing Loop" ;;
-        08) suberror="Invalid NEXT_HOP Attribute" ;;
-        09) suberror="Optional Attribute Error" ;;
-        10) suberror="Invalid Network Field" ;;
-        11) suberror="Malformed AS_PATH" ;;
-        *) suberror="Unknown" ;;
-      esac
-      ;;
-    04)
-      error="Hold Timer Expired"
-      suberror=""
-      ;;
-    05)
-      error="Finite State Machine Error"
-      suberror=""
-      ;;
-    06)
-      error="Cease"
-      case "$suberrorcode" in
-        01) suberror="Maximum Number of Prefixes Reached" ;;
-        02) suberror="Administratively Shutdown" ;;
-        03) suberror="Peer Unconfigured" ;;
-        04) suberror="Administratively Reset" ;;
-        05) suberror="Connection Rejected" ;;
-        06) suberror="Other Configuration Change" ;;
-        07) suberror="Connection collision resolution" ;;
-        08) suberror="Out of Resource" ;;
-        09) suberror="MAX" ;;
-        *) suberror="Unknown" ;;
-      esac
-      ;;
-    *)
-      error="Unknown"
-      suberror=""
-      ;;
-  esac
-
-  # create textual message from errorcodes
-  if [ "x$suberror" == "x" ]; then
-    NOTIFY="$errorcode ($error)"
-  else
-    NOTIFY="$errorcode/$suberrorcode ($error/$suberror)"
-  fi
-
-  # form a decent subject
-  SUBJECT="$TYPE: $ROUTER [bgp] $peer is $peerstate: $NOTIFY"
-  # create the email body
-  MAIL=`cat << EOF
-  BGP notification on router $ROUTER.
-  
-  Peer: $peer
-  AS: $remoteas
-  New state: $peerstate
-  Notification: $NOTIFY
-
-  Info:
-  $asname
-  $asdescr
-  Snmpd uptime: $uptime
-  EOF`
-
-  # mail the notification
-  echo "$MAIL" | mail -s "$SUBJECT" $EMAILADDR
-@end verbatim
diff --git a/doc/user/.gitignore b/doc/user/.gitignore
new file mode 100644 (file)
index 0000000..0505537
--- /dev/null
@@ -0,0 +1,3 @@
+/_templates
+/_build
+!/Makefile
diff --git a/doc/user/Makefile b/doc/user/Makefile
new file mode 100644 (file)
index 0000000..223f8a6
--- /dev/null
@@ -0,0 +1,55 @@
+include ../frr-sphinx.mk
+
+# -----------------------------------------------------------------------------
+# Automake requires that 3rd-party Makefiles recognize these targets.
+# -----------------------------------------------------------------------------
+# install
+# install-data
+# install-exec
+# uninstall
+# install-dvi
+# install-html
+# install-info
+# install-ps
+# install-pdf
+# installdirs
+# check
+# installcheck
+# mostlyclean
+# clean
+# distclean
+# maintainer-clean
+# dvi
+# pdf
+# ps
+# info
+# html
+# tags
+# ctags
+
+# ignore these targets
+EMPTY_AUTOMAKE_TARGETS = dvi ps tags ctags distdir install-exec install-dvi install-ps installdirs check installcheck install-html install-pdf install-data install
+.PHONY: $(EMPTY_AUTOMAKE_TARGETS)
+$(EMPTY_AUTOMAKE_TARGETS):
+
+# When building 'all', the logic is that we want to make docs that are easily
+# readable by the person that just built them. Technically the reST source is
+# readable in its own right, but we'll also build info and html because those
+# offer sequentially better reading experiences. PDF is not built by default
+# because it takes quite a while.
+all: info
+
+# info and html already have built-in sphinx rules; pdf goes to latexpdf
+pdf: latexpdf
+
+# install user manual as info file
+install-info: info
+       install -d ${DESTDIR}${infodir}
+       gzip < _build/texinfo/frr.info > ${DESTDIR}${infodir}/frr.info.gz
+       install-info _build/texinfo/frr.info ${DESTDIR}${infodir}/dir
+
+install-data: install-info
+
+install: install-data
+
+mostlyclean distclean maintainer-clean: clean
diff --git a/doc/user/Useful_Sysctl_Settings.md b/doc/user/Useful_Sysctl_Settings.md
new file mode 100644 (file)
index 0000000..4244b5f
--- /dev/null
@@ -0,0 +1,61 @@
+# Useful Sysctl Settings
+Sysctl on Linux systems can tweak many useful behaviors. When it comes to a routing protocol suite like FRRouting there are numerous values depending on your use case that make sense to optimize.
+
+The below sysctl values provide a logical set of defaults which can be further optimized.
+
+
+```
+# /etc/sysctl.d/99frr_defaults.conf
+# Place this file at the location above and reload the device.
+# or run the sysctl -p /etc/sysctl.d/99frr_defaults.conf
+  
+# Enables IPv4/IPv6 Routing
+net.ipv4.ip_forward = 1
+net.ipv6.conf.all.forwarding=1
+
+# Routing
+net.ipv6.route.max_size=131072
+net.ipv4.conf.all.ignore_routes_with_linkdown=1
+net.ipv6.conf.all.ignore_routes_with_linkdown=1
+
+# Best Settings for Peering w/ BGP Unnumbered
+#    and OSPF Neighbors
+net.ipv4.conf.all.rp_filter = 0
+net.ipv4.conf.default.rp_filter = 0
+net.ipv4.conf.lo.rp_filter = 0
+net.ipv4.conf.all.forwarding = 1
+net.ipv4.conf.default.forwarding = 1
+net.ipv4.conf.default.arp_announce = 2
+net.ipv4.conf.default.arp_notify = 1
+net.ipv4.conf.default.arp_ignore=1
+net.ipv4.conf.all.arp_announce = 2
+net.ipv4.conf.all.arp_notify = 1
+net.ipv4.conf.all.arp_ignore=1
+net.ipv4.icmp_errors_use_inbound_ifaddr=1
+
+# Miscellaneous Settings
+
+#   Keep ipv6 permanent addresses on an admin down
+net.ipv6.conf.all.keep_addr_on_down=1
+
+# igmp
+net.ipv4.igmp_max_memberships=1000
+net.ipv4.neigh.default.mcast_solicit = 10
+
+# MLD
+net.ipv6.mld_max_msf=512
+
+# Garbage Collection Settings for ARP and Neighbors
+net.ipv4.neigh.default.gc_thresh2=7168
+net.ipv4.neigh.default.gc_thresh3=8192
+net.ipv4.neigh.default.base_reachable_time_ms=14400000
+net.ipv6.neigh.default.gc_thresh2=3584
+net.ipv6.neigh.default.gc_thresh3=4096
+net.ipv6.neigh.default.base_reachable_time_ms=14400000
+
+# Use neigh information on selection of nexthop for multipath hops
+net.ipv4.fib_multipath_use_neigh=1
+
+# Allows Apps to Work with VRF
+net.ipv4.tcp_l3mdev_accept=1
+```
diff --git a/doc/user/appendix.rst b/doc/user/appendix.rst
new file mode 100644 (file)
index 0000000..6120c3b
--- /dev/null
@@ -0,0 +1,221 @@
+.. _packet-binary-dump-format:
+
+Packet Binary Dump Format
+=========================
+
+FRR can dump routing protocol packets into a file with a binary format.
+
+It seems to be better that we share the MRT's header format for
+backward compatibility with MRT's dump logs. We should also define the
+binary format excluding the header, because we must support both IP
+v4 and v6 addresses as socket addresses and / or routing entries.
+
+In the last meeting, we discussed to have a version field in the
+header. But Masaki told us that we can define new 'type' value rather
+than having a 'version' field, and it seems to be better because we
+don't need to change header format.
+
+Here is the common header format. This is same as that of MRT.::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                              Time                             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |             Type              |            Subtype            |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                             Length                            |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+
+If 'type' is PROTOCOL_BGP4MP_ET, the common header format will
+contain an additional microsecond field (RFC6396 2011).::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                              Time                             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |             Type              |            Subtype            |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                             Length                            |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                          Microsecond                          |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+If 'type' is PROTOCOL_BGP4MP, 'subtype' is BGP4MP_STATE_CHANGE, and
+Address Family == IP (version 4)::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Source AS number       |     Destination AS number     |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Interface Index        |      Address Family           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address                      |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address                    |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |            Old State          |           New State           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+Where State is the value defined in RFC1771.
+
+If 'type' is PROTOCOL_BGP4MP, 'subtype' is BGP4MP_STATE_CHANGE,
+and Address Family == IP version 6::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Source AS number       |     Destination AS number     |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Interface Index        |      Address Family           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address                      |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address (Cont'd)             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address (Cont'd)             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address (Cont'd)             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address                    |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address (Cont'd)           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address (Cont'd)           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address (Cont'd)           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |            Old State          |           New State           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+If 'type' is PROTOCOL_BGP4MP, 'subtype' is BGP4MP_MESSAGE,
+and Address Family == IP (version 4)::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Source AS number       |     Destination AS number     |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Interface Index        |      Address Family           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address                      |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address                    |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                       BGP Message Packet                      |
+    |                                                               |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+Where BGP Message Packet is the whole contents of the
+BGP4 message including header portion.
+
+If 'type' is PROTOCOL_BGP4MP, 'subtype' is BGP4MP_MESSAGE,
+and Address Family == IP version 6::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Source AS number       |     Destination AS number     |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |        Interface Index        |      Address Family           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address                      |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address (Cont'd)             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address (Cont'd)             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Source IP address (Cont'd)             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address                    |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address (Cont'd)           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address (Cont'd)           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                     Destination IP address (Cont'd)           |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                       BGP Message Packet                      |
+    |                                                               |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+If 'type' is PROTOCOL_BGP4MP, 'subtype' is BGP4MP_ENTRY,
+and Address Family == IP (version 4)::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |            View #             |            Status             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Time Last Change                       |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |       Address Family          |    SAFI       | Next-Hop-Len  |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Next Hop Address                       |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    | Prefix Length |             Address Prefix [variable]         |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |       Attribute Length        |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |      BGP Attribute [variable length]                     |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+If 'type' is PROTOCOL_BGP4MP, 'subtype' is BGP4MP_ENTRY,
+and Address Family == IP version 6::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |            View #             |            Status             |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Time Last Change                       |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |       Address Family          |    SAFI       | Next-Hop-Len  |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Next Hop Address                       |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Next Hop Address (Cont'd)              |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Next Hop Address (Cont'd)              |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |                        Next Hop Address (Cont'd)              |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    | Prefix Length |             Address Prefix [variable]         |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |     Address Prefix (cont'd) [variable]        |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |       Attribute Length        |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |      BGP Attribute [variable length]                         |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+BGP4 Attribute must not contain MP_UNREACH_NLRI. If BGP Attribute has
+MP_REACH_NLRI field, it must has zero length NLRI, e.g., MP_REACH_NLRI has only
+Address Family, SAFI and next-hop values.
+
+If 'type' is PROTOCOL_BGP4MP and 'subtype' is BGP4MP_SNAPSHOT::
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |           View #              |       File Name [variable]    |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+The file specified in "File Name" contains all routing entries,
+which are in the format of ``subtype == BGP4MP_ENTRY``.
+
+::
+
+   Constants:
+
+     /\* type value \*/
+     #define MSG_PROTOCOL_BGP4MP    16
+     #define MSG_PROTOCOL_BGP4MP_ET 17
+     /\* subtype value \*/
+     #define BGP4MP_STATE_CHANGE 0
+     #define BGP4MP_MESSAGE 1
+     #define BGP4MP_ENTRY 2
+     #define BGP4MP_SNAPSHOT 3
diff --git a/doc/user/babeld.rst b/doc/user/babeld.rst
new file mode 100644 (file)
index 0000000..d46550d
--- /dev/null
@@ -0,0 +1,291 @@
+.. _babel:
+
+*****
+Babel
+*****
+
+Babel is an interior gateway protocol that is suitable both for wired networks
+and for wireless mesh networks.  Babel has been described as 'RIP on speed' --
+it is based on the same principles as RIP, but includes a number of refinements
+that make it react much faster to topology changes without ever counting to
+infinity, and allow it to perform reliable link quality estimation on wireless
+links.  Babel is a double-stack routing protocol, meaning that a single Babel
+instance is able to perform routing for both IPv4 and IPv6.
+
+FRR implements Babel as described in :rfc:`6126`.
+
+.. _configuring-babeld:
+
+Configuring babeld
+==================
+
+The *babeld* daemon can be invoked with any of the common
+options (:ref:`common-invocation-options`).
+
+The *zebra* daemon must be running before *babeld* is
+invoked. Also, if *zebra* is restarted then *babeld*
+must be too.
+
+Configuration of *babeld* is done in its configuration file
+:file:`babeld.conf`.
+
+.. _babel-configuration:
+
+Babel configuration
+===================
+
+.. index::
+   single: router babel
+   single: no router babel
+
+.. clicmd:: [no] router babel
+
+   Enable or disable Babel routing.
+
+.. index::
+   single: babel resend-delay (20-655340)
+   single: no babel resend-delay [(20-655340)]
+
+.. clicmd:: [no] babel resend-delay (20-655340)
+
+   Specifies the time after which important messages are resent when
+   avoiding a black-hole. The default is 2000 ms.
+
+.. index::
+   single: babel diversity
+   single: no babel diversity
+
+.. clicmd:: [no] babel diversity
+
+   Enable or disable routing using radio frequency diversity.  This is
+   highly recommended in networks with many wireless nodes.
+   If you enable this, you will probably want to set `babel
+   diversity-factor` and `babel channel` below.
+
+.. index:: babel diversity-factor (1-256)
+
+.. clicmd:: babel diversity-factor (1-256)
+
+   Sets the multiplicative factor used for diversity routing, in units of
+   1/256; lower values cause diversity to play a more important role in
+   route selection.  The default it 256, which means that diversity plays
+   no role in route selection; you will probably want to set that to 128
+   or less on nodes with multiple independent radios.
+
+.. index::
+   single: network IFNAME
+   single: no network IFNAME
+
+.. clicmd:: no network IFNAME
+
+   Enable or disable Babel on the given interface.
+
+.. index:: babel <wired|wireless>
+
+.. clicmd:: babel <wired|wireless>
+
+   Specifies whether this interface is wireless, which disables a number
+   of optimisations that are only correct on wired interfaces.
+   Specifying `wireless` (the default) is always correct, but may
+   cause slower convergence and extra routing traffic.
+
+.. index::
+   single: babel split-horizon
+   single: no babel split-horizon
+
+.. clicmd:: [no] babel split-horizon
+
+   Specifies whether to perform split-horizon on the interface.  Specifying
+   ``no babel split-horizon`` is always correct, while ``babel
+   split-horizon`` is an optimisation that should only be used on symmetric
+   and transitive (wired) networks.  The default is ``babel split-horizon``
+   on wired interfaces, and ``no babel split-horizon`` on wireless
+   interfaces.  This flag is reset when the wired/wireless status of an
+   interface is changed.
+
+.. index:: babel hello-interval (20-655340)
+
+.. clicmd:: babel hello-interval (20-655340)
+
+   Specifies the time in milliseconds between two scheduled hellos.  On
+   wired links, Babel notices a link failure within two hello intervals;
+   on wireless links, the link quality value is reestimated at every
+   hello interval.  The default is 4000 ms.
+
+.. index:: babel update-interval (20-655340)
+
+.. clicmd:: babel update-interval (20-655340)
+
+   Specifies the time in milliseconds between two scheduled updates.  Since
+   Babel makes extensive use of triggered updates, this can be set to fairly
+   high values on links with little packet loss.  The default is 20000 ms.
+
+.. index::
+   single: babel channel (1-254)
+   single: babel channel interfering
+   single: babel channel noninterfering
+
+.. clicmd:: babel channel (1-254)
+.. clicmd:: babel channel interfering
+.. clicmd:: babel channel noninterfering
+
+   Set the channel number that diversity routing uses for this interface (see
+   `babel diversity` above).  Noninterfering interfaces are assumed to only
+   interfere with themselves, interfering interfaces are assumed to interfere
+   with all other channels except noninterfering channels, and interfaces with
+   a channel number interfere with interfering interfaces and interfaces with
+   the same channel number.  The default is ``babel channel interfering`` for
+   wireless interfaces, and ``babel channel noninterfering`` for wired
+   interfaces.  This is reset when the wired/wireless status of an interface is
+   changed.
+
+.. index:: babel rxcost (1-65534)
+
+.. clicmd:: babel rxcost (1-65534)
+
+   Specifies the base receive cost for this interface.  For wireless
+   interfaces, it specifies the multiplier used for computing the ETX
+   reception cost (default 256); for wired interfaces, it specifies the
+   cost that will be advertised to neighbours.  This value is reset when
+   the wired/wireless attribute of the interface is changed.
+
+.. note::
+   Do not use this command unless you know what you are doing; in most
+   networks, acting directly on the cost using route maps is a better
+   technique.
+
+.. index:: babel rtt-decay (1-256)
+
+.. clicmd:: babel rtt-decay (1-256)
+
+   This specifies the decay factor for the exponential moving average of
+   RTT samples, in units of 1/256.  Higher values discard old samples
+   faster.  The default is 42.
+
+.. index:: babel rtt-min (1-65535)
+
+.. clicmd:: babel rtt-min (1-65535)
+
+   This specifies the minimum RTT, in milliseconds, starting from which we
+   increase the cost to a neighbour. The additional cost is linear in
+   (rtt - rtt-min).  The default is 100 ms.
+
+.. index:: babel rtt-max (1-65535)
+
+.. clicmd:: babel rtt-max (1-65535)
+
+   This specifies the maximum RTT, in milliseconds, above which we don't
+   increase the cost to a neighbour. The default is 120 ms.
+
+.. index:: babel max-rtt-penalty (0-65535)
+
+.. clicmd:: babel max-rtt-penalty (0-65535)
+
+   This specifies the maximum cost added to a neighbour because of RTT, i.e.
+   when the RTT is higher or equal than rtt-max.  The default is 0, which
+   effectively disables the use of a RTT-based cost.
+
+.. index::
+   single: babel enable-timestamps
+   single: no babel enable-timestamps
+
+.. clicmd:: [no] babel enable-timestamps
+
+   Enable or disable sending timestamps with each Hello and IHU message in
+   order to compute RTT values.  The default is `no babel enable-timestamps`.
+
+.. index:: babel resend-delay (20-655340)
+
+.. clicmd:: babel resend-delay (20-655340)
+
+   Specifies the time in milliseconds after which an 'important' request or
+   update will be resent.  The default is 2000 ms.  You probably don't want to
+   tweak this value.
+
+.. index:: babel smoothing-half-life (0-65534)
+
+.. clicmd:: babel smoothing-half-life (0-65534)
+
+   Specifies the time constant, in seconds, of the smoothing algorithm used for
+   implementing hysteresis.  Larger values reduce route oscillation at the cost
+   of very slightly increasing convergence time.  The value 0 disables
+   hysteresis, and is suitable for wired networks.  The default is 4 s.
+
+.. _babel-redistribution:
+
+Babel redistribution
+====================
+
+.. index::
+   single: redistribute <ipv4|ipv6> KIND
+   single: no redistribute <ipv4|ipv6> KIND
+
+.. clicmd:: [no] redistribute <ipv4|ipv6> KIND
+
+   Specify which kind of routes should be redistributed into Babel.
+
+.. _show-babel-information:
+
+Show Babel information
+======================
+
+These commands dump various parts of *babeld*'s internal state.
+
+.. index:: show babel route
+
+.. clicmd:: show babel route
+
+.. index:: show babel route A.B.C.D
+
+.. clicmd:: show babel route A.B.C.D
+
+.. index:: show babel route X:X::X:X
+
+.. clicmd:: show babel route X:X::X:X
+
+.. index:: show babel route A.B.C.D/M
+
+.. clicmd:: show babel route A.B.C.D/M
+
+.. index:: show babel route X:X::X:X/M
+
+.. clicmd:: show babel route X:X::X:X/M
+
+.. index:: show babel interface
+
+.. clicmd:: show babel interface
+
+.. index:: show babel interface IFNAME
+
+.. clicmd:: show babel interface IFNAME
+
+.. index:: show babel neighbor
+
+.. clicmd:: show babel neighbor
+
+.. index:: show babel parameters
+
+.. clicmd:: show babel parameters
+
+Babel debugging commands
+========================
+
+.. index::
+   simple: debug babel KIND
+   simple: no debug babel KIND
+
+.. clicmd:: [no] debug babel KIND
+
+   Enable or disable debugging messages of a given kind. ``KIND`` can
+   be one of:
+
+   - ``common``
+   - ``filter``
+   - ``timeout``
+   - ``interface``
+   - ``route``
+   - ``all``
+
+.. note::
+   If you have compiled with the ``NO_DEBUG`` flag, then these commands aren't
+   available.
diff --git a/doc/user/basic.rst b/doc/user/basic.rst
new file mode 100644 (file)
index 0000000..29d05ab
--- /dev/null
@@ -0,0 +1,642 @@
+.. _basic-commands:
+
+**************
+Basic commands
+**************
+
+There are five routing daemons in use, and there is one manager daemon.
+These daemons may be located on separate machines from the manager
+daemon. Each of these daemons will listen on a particular port for
+incoming VTY connections. The routing daemons are:
+
+- *ripd*
+- *ripngd*
+- *ospfd*
+- *ospf6d*
+- *bgpd*
+- *zebra*
+
+The following sections discuss commands common to all the routing
+daemons.
+
+.. _config-commands:
+
+Config Commands
+===============
+
+.. index:: Configuration files for running the software
+
+.. index:: Files for running configurations
+
+.. index:: Modifying the herd's behavior
+
+.. index:: Getting the herd running
+
+In a config file, you can write the debugging options, a vty's password,
+routing daemon configurations, a log file name, and so forth. This
+information forms the initial command set for a routing beast as it is
+starting.
+
+Config files are generally found in |INSTALL_PREFIX_ETC|.
+
+Each of the daemons has its own config file. The daemon name plus ``.conf`` is
+the default config file name. For example, zebra's default config file name is
+:file:`zebra.conf`. You can specify a config file using the :option:`-f` or
+:option:`--config-file` options when starting the daemon.
+
+.. _basic-config-commands:
+
+Basic Config Commands
+---------------------
+
+.. index:: hostname HOSTNAME
+
+.. clicmd:: hostname HOSTNAME
+
+   Set hostname of the router.
+
+.. index:: password PASSWORD
+
+.. clicmd:: password PASSWORD
+
+   Set password for vty interface. If there is no password, a vty won't
+   accept connections.
+
+.. index:: enable password PASSWORD
+
+.. clicmd:: enable password PASSWORD
+
+   Set enable password.
+
+.. index::
+   single: no log trap [LEVEL]
+   single: log trap LEVEL
+
+.. clicmd:: [no] log trap LEVEL
+
+   These commands are deprecated and are present only for historical
+   compatibility. The log trap command sets the current logging level for all
+   enabled logging destinations, and it sets the default for all future logging
+   commands that do not specify a level. The normal default logging level is
+   debugging. The ``no`` form of the command resets the default level for future
+   logging commands to debugging, but it does not change the logging level of
+   existing logging destinations.
+
+.. index::
+   single: no log stdout [LEVEL]
+   single: log stdout [LEVEL]
+
+.. clicmd:: [no] log stdout LEVEL
+
+   Enable logging output to stdout. If the optional second argument specifying
+   the logging level is not present, the default logging level (typically
+   debugging, but can be changed using the deprecated ``log trap`` command) will
+   be used. The ``no`` form of the command disables logging to stdout. The
+   ``LEVEL`` argument must have one of these values: emergencies, alerts,
+   critical, errors, warnings, notifications, informational, or debugging. Note
+   that the existing code logs its most important messages with severity
+   ``errors``.
+
+.. index::
+   single: no log file [FILENAME [LEVEL]]
+   single: log file FILENAME [LEVEL]
+
+.. clicmd:: [no] log file [FILENAME [LEVEL]]
+
+   If you want to log into a file, please specify ``filename`` as
+   in this example: ::
+
+     log file /var/log/frr/bgpd.log informational
+
+   If the optional second argument specifying the logging level is not present,
+   the default logging level (typically debugging, but can be changed using the
+   deprecated ``log trap`` command) will be used. The ``no`` form of the command
+   disables logging to a file. *Note:* if you do not configure any file logging,
+   and a daemon crashes due to a signal or an assertion failure, it will attempt
+   to save the crash information in a file named /var/tmp/frr.<daemon
+   name>.crashlog. For security reasons, this will not happen if the file exists
+   already, so it is important to delete the file after reporting the crash
+   information.
+
+.. index::
+   single: no log syslog [LEVEL]
+   single: log syslog [LEVEL]
+
+.. clicmd:: [no] log syslog [LEVEL]
+
+   Enable logging output to syslog. If the optional second argument specifying
+   the logging level is not present, the default logging level (typically
+   debugging, but can be changed using the deprecated ``log trap`` command) will
+   be used. The ``no`` form of the command disables logging to syslog.
+
+.. index::
+   single: no log monitor [LEVEL]
+   single: log monitor [LEVEL]
+
+.. clicmd:: [no] log monitor [LEVEL]
+
+   Enable logging output to vty terminals that have enabled logging using the
+   ``terminal monitor`` command. By default, monitor logging is enabled at the
+   debugging level, but this command (or the deprecated ``log trap`` command) can
+   be used to change the monitor logging level. If the optional second argument
+   specifying the logging level is not present, the default logging level
+   (typically debugging, but can be changed using the deprecated ``log trap``
+   command) will be used. The ``no`` form of the command disables logging to
+   terminal monitors.
+
+.. index::
+   single: no log facility [FACILITY]
+   single: log facility [FACILITY]
+
+.. clicmd:: [no] log facility [FACILITY]
+
+   This command changes the facility used in syslog messages. The default
+   facility is ``daemon``. The ``no`` form of the command resets
+   the facility to the default ``daemon`` facility.
+
+.. index::
+   single: no log record-priority
+   single: log record-priority
+
+.. clicmd:: [no] log record-priority
+
+   To include the severity in all messages logged to a file, to stdout, or to
+   a terminal monitor (i.e. anything except syslog),
+   use the ``log record-priority`` global configuration command.
+   To disable this option, use the ``no`` form of the command. By default,
+   the severity level is not included in logged messages. Note: some
+   versions of syslogd (including Solaris) can be configured to include
+   the facility and level in the messages emitted.
+
+.. index::
+   single: log timestamp precision (0-6)
+   single: [no] log timestamp precision (0-6)
+
+.. clicmd:: [no] log timestamp precision [(0-6)]
+
+   This command sets the precision of log message timestamps to the given number
+   of digits after the decimal point. Currently, the value must be in the range
+   0 to 6 (i.e. the maximum precision is microseconds). To restore the default
+   behavior (1-second accuracy), use the ``no`` form of the command, or set the
+   precision explicitly to 0.
+
+::
+
+     log timestamp precision 3
+
+   In this example, the precision is set to provide timestamps with
+   millisecond accuracy.
+
+.. index:: log commands
+
+.. clicmd:: log commands
+
+   This command enables the logging of all commands typed by a user to
+   all enabled log destinations. The note that logging includes full
+   command lines, including passwords. Once set, command logging can only
+   be turned off by restarting the daemon.
+
+.. index:: service password-encryption
+
+.. clicmd:: service password-encryption
+
+   Encrypt password.
+
+.. index:: service advanced-vty
+
+.. clicmd:: service advanced-vty
+
+   Enable advanced mode VTY.
+
+.. index:: service terminal-length (0-512)
+
+.. clicmd:: service terminal-length (0-512)
+
+   Set system wide line configuration. This configuration command applies
+   to all VTY interfaces.
+
+.. index:: line vty
+
+.. clicmd:: line vty
+
+   Enter vty configuration mode.
+
+.. index:: banner motd default
+
+.. clicmd:: banner motd default
+
+   Set default motd string.
+
+.. index:: no banner motd
+
+.. clicmd:: no banner motd
+
+   No motd banner string will be printed.
+
+.. index:: exec-timeout MINUTE [SECOND]
+
+.. clicmd:: exec-timeout MINUTE [SECOND]
+
+   Set VTY connection timeout value. When only one argument is specified
+   it is used for timeout value in minutes. Optional second argument is
+   used for timeout value in seconds. Default timeout value is 10 minutes.
+   When timeout value is zero, it means no timeout.
+
+.. index:: no exec-timeout
+
+.. clicmd:: no exec-timeout
+
+   Do not perform timeout at all. This command is as same as *exec-timeout 0 0*.
+
+.. index:: access-class ACCESS-LIST
+
+.. clicmd:: access-class ACCESS-LIST
+
+   Restrict vty connections with an access list.
+
+.. _sample-config-file:
+
+Sample Config File
+------------------
+
+Below is a sample configuration file for the zebra daemon.
+
+::
+
+  !
+  ! Zebra configuration file
+  !
+  hostname Router
+  password zebra
+  enable password zebra
+  !
+  log stdout
+  !
+  !
+
+
+'!' and '#' are comment characters. If the first character of the word
+is one of the comment characters then from the rest of the line forward
+will be ignored as a comment.
+
+::
+
+  password zebra!password
+
+If a comment character is not the first character of the word, it's a
+normal character. So in the above example '!' will not be regarded as a
+comment and the password is set to 'zebra!password'.
+
+.. _terminal-mode-commands:
+
+Terminal Mode Commands
+======================
+
+.. index:: write terminal
+
+.. clicmd:: write terminal
+
+   Displays the current configuration to the vty interface.
+
+.. index:: write file
+
+.. clicmd:: write file
+
+   Write current configuration to configuration file.
+
+.. index:: configure terminal
+
+.. clicmd:: configure terminal
+
+   Change to configuration mode. This command is the first step to
+   configuration.
+
+.. index:: terminal length (0-512)
+
+.. clicmd:: terminal length (0-512)
+
+   Set terminal display length to ``(0-512)``. If length is 0, no
+   display control is performed.
+
+.. index:: who
+
+.. clicmd:: who
+
+   Show a list of currently connected vty sessions.
+
+.. index:: list
+
+.. clicmd:: list
+
+   List all available commands.
+
+.. index:: show version
+
+.. clicmd:: show version
+
+   Show the current version of |PACKAGE_NAME| and its build host information.
+
+.. index:: show logging
+
+.. clicmd:: show logging
+
+   Shows the current configuration of the logging system. This includes
+   the status of all logging destinations.
+
+.. index:: logmsg LEVEL MESSAGE
+
+.. clicmd:: logmsg LEVEL MESSAGE
+
+   Send a message to all logging destinations that are enabled for messages
+   of the given severity.
+
+.. _common-invocation-options:
+
+Common Invocation Options
+=========================
+
+These options apply to all |PACKAGE_NAME| daemons.
+
+
+.. option:: -d
+.. option:: --daemon
+
+   Run in daemon mode.
+
+.. option:: -f <file>
+.. option:: --config-file <file>
+
+   Set configuration file name.
+
+.. option:: -h, --help
+
+   Display this help and exit.
+
+.. option:: -i <file>
+.. option:: --pid-file <file>
+
+   Upon startup the process identifier of the daemon is written to a file,
+   typically in :file:`/var/run`. This file can be used by the init system
+   to implement commands such as ``.../init.d/zebra status``,
+   ``.../init.d/zebra restart`` or ``.../init.d/zebra stop``.
+
+   The file name is an run-time option rather than a configure-time option
+   so that multiple routing daemons can be run simultaneously. This is
+   useful when using |PACKAGE_NAME| to implement a routing looking glass. One
+   machine can be used to collect differing routing views from differing
+   points in the network.
+
+.. option:: -A <address>
+.. option:: --vty-addr <address>
+
+   Set the VTY local address to bind to. If set, the VTY socket will only
+   be bound to this address.
+
+.. option:: -P <port>
+.. option:: --vty-port <port>
+
+   Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not
+   be opened.
+
+.. option:: -u <user>
+.. option:: --vty_addr <user>
+
+   Set the user and group to run as.
+
+.. option:: -v
+.. option:: --version
+
+   Print program version.
+
+.. _loadable-module-support:
+
+Loadable Module Support
+=======================
+
+FRR supports loading extension modules at startup. Loading, reloading or
+unloading modules at runtime is not supported (yet). To load a module, use
+the following command line option at daemon startup:
+
+
+.. option:: -M <module:options>
+.. option:: --module <module:options>
+
+   Load the specified module, optionally passing options to it. If the module
+   name contains a slash (/), it is assumed to be a full pathname to a file to
+   be loaded. If it does not contain a slash, the |INSTALL_PREFIX_MODULES|
+   directory is searched for a module of the given name; first with the daemon
+   name prepended (e.g. ``zebra_mod`` for ``mod``), then without the daemon
+   name prepended.
+
+   This option is available on all daemons, though some daemons may not have
+   any modules available to be loaded.
+
+The SNMP Module
+---------------
+
+If SNMP is enabled during compile-time and installed as part of the package,
+the ``snmp`` module can be loaded for the *zebra*, *bgpd*, *ospfd*, *ospf6d*
+and *ripd* daemons.
+
+The module ignores any options passed to it. Refer to :ref:`snmp-support`
+for information on its usage.
+
+The FPM Module
+--------------
+
+If FPM is enabled during compile-time and installed as part of the package, the
+``fpm`` module can be loaded for the *zebra* daemon. This provides the
+Forwarding Plane Manager ("FPM") API.
+
+The module expects its argument to be either ``netlink`` or ``protobuf``,
+specifying the encapsulation to use. ``netlink`` is the default, and
+``protobuf`` may not be available if the module was built without protobuf
+support. Refer to :ref:`zebra-fib-push-interface` for more information.
+
+.. _virtual-terminal-interfaces:
+
+Virtual Terminal Interfaces
+===========================
+
+VTY -- Virtual Terminal [aka TeletYpe] Interface is a command line
+interface (CLI) for user interaction with the routing daemon.
+
+.. _vty-overview:
+
+VTY Overview
+------------
+
+VTY stands for Virtual TeletYpe interface. It means you can connect to
+the daemon via the telnet protocol.
+
+To enable a VTY interface, you have to setup a VTY password. If there
+is no VTY password, one cannot connect to the VTY interface at all.
+
+::
+
+  % telnet localhost 2601
+  Trying 127.0.0.1...
+  Connected to localhost.
+  Escape character is '^]'.
+
+  Hello, this is |PACKAGE_NAME| (version |PACKAGE_VERSION|)
+  |COPYRIGHT_STR|
+
+  User Access Verification
+
+  Password: XXXXX
+  Router> ?
+    enable .  .  .  Turn on privileged commands
+    exit   .  .  .  Exit current mode and down to previous mode
+    help   .  .  .  Description of the interactive help system
+    list   .  .  .  Print command list
+    show   .  .  .  Show system inform
+
+    wh. . .  Display who is on a vty
+  Router> enable
+  Password: XXXXX
+  Router# configure terminal
+  Router(config)# interface eth0
+  Router(config-if)# ip address 10.0.0.1/8
+  Router(config-if)# ^Z
+  Router#
+
+
+:kbd:`?` and the ``find`` command are very useful for looking up commands.
+
+.. _vty-modes:
+
+VTY Modes
+---------
+
+There are three basic VTY modes:
+
+There are commands that may be restricted to specific VTY modes.
+
+.. _vty-view-mode:
+
+VTY View Mode
+^^^^^^^^^^^^^
+
+This mode is for read-only access to the CLI. One may exit the mode by
+leaving the system, or by entering `enable` mode.
+
+.. _vty-enable-mode:
+
+VTY Enable Mode
+^^^^^^^^^^^^^^^
+
+This mode is for read-write access to the CLI. One may exit the mode by
+leaving the system, or by escaping to view mode.
+
+.. _vty-other-modes:
+
+VTY Other Modes
+^^^^^^^^^^^^^^^
+
+This page is for describing other modes.
+
+.. _vty-cli-commands:
+
+VTY CLI Commands
+----------------
+
+Commands that you may use at the command-line are described in the following
+three subsubsections.
+
+.. _cli-movement-commands:
+
+CLI Movement Commands
+^^^^^^^^^^^^^^^^^^^^^
+
+These commands are used for moving the CLI cursor. The :kbd:`C` character
+means press the Control Key.
+
+:kbd:`C-f` / :kbd:`LEFT`
+  Move forward one character.
+
+:kbd:`C-b` / :kbd:`RIGHT`
+  Move backward one character.
+
+:kbd:`M-f`
+  Move forward one word.
+
+:kbd:`M-b`
+  Move backward one word.
+
+:kbd:`C-a`
+  Move to the beginning of the line.
+
+:kbd:`C-e`
+  Move to the end of the line.
+
+
+.. _cli-editing-commands:
+
+CLI Editing Commands
+^^^^^^^^^^^^^^^^^^^^
+
+These commands are used for editing text on a line. The :kbd:`C`
+character means press the Control Key.
+
+
+:kbd:`C-h` / :kbd:`DEL`
+  Delete the character before point.
+
+
+:kbd:`C-d`
+  Delete the character after point.
+
+
+:kbd:`M-d`
+  Forward kill word.
+
+
+:kbd:`C-w`
+  Backward kill word.
+
+
+:kbd:`C-k`
+  Kill to the end of the line.
+
+
+:kbd:`C-u`
+  Kill line from the beginning, erasing input.
+
+
+:kbd:`C-t`
+  Transpose character.
+
+
+CLI Advanced Commands
+^^^^^^^^^^^^^^^^^^^^^
+
+There are several additional CLI commands for command line completions,
+insta-help, and VTY session management.
+
+
+:kbd:`C-c`
+  Interrupt current input and moves to the next line.
+
+
+:kbd:`C-z`
+  End current configuration session and move to top node.
+
+
+:kbd:`C-n` / :kbd:`DOWN`
+  Move down to next line in the history buffer.
+
+
+:kbd:`C-p` / :kbd:`UP`
+  Move up to previous line in the history buffer.
+
+
+:kbd:`TAB`
+  Use command line completion by typing :kbd:`TAB`.
+
+
+:kbd:`?`
+  You can use command line help by typing `help` at the beginning of
+  the line. Typing :kbd:`?` at any point in the line will show possible
+  completions.
+
diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst
new file mode 100644 (file)
index 0000000..b5ee632
--- /dev/null
@@ -0,0 +1,2437 @@
+.. _bgp:
+
+***
+BGP
+***
+
+:abbr:`BGP` stands for a Border Gateway Protocol. The lastest BGP version is 4.
+It is referred as BGP-4. BGP-4 is one of the Exterior Gateway Protocols and
+de-fact standard of Inter Domain routing protocol.  BGP-4 is described in
+:rfc:`1771`.
+
+Many extensions have been added to :rfc:`1771`. :rfc:`2858` provides
+multiprotocol support to BGP-4.
+
+.. _starting-bgp:
+
+Starting BGP
+============
+
+Default configuration file of *bgpd* is :file:`bgpd.conf`.  *bgpd* searches the
+current directory first then |INSTALL_PREFIX_ETC|/bgpd.conf. All of bgpd's
+command must be configured in :file:`bgpd.conf`.
+
+*bgpd* specific invocation options are described below. Common options may also
+be specified (:ref:`common-invocation-options`).
+
+.. program:: bgpd
+
+.. option:: -p <port>
+.. option:: --bgp_port <port>
+
+   Set the bgp protocol's port number.
+
+.. option:: -r
+.. option:: --retain
+
+   When program terminates, retain BGP routes added by zebra.
+
+.. option:: -l
+.. option:: --listenon
+
+   Specify a specific IP address for bgpd to listen on, rather than its
+   default of INADDR_ANY / IN6ADDR_ANY. This can be useful to constrain bgpd
+   to an internal address, or to run multiple bgpd processes on one host.
+
+
+.. _bgp-router:
+
+BGP router
+==========
+
+First of all you must configure BGP router with *router bgp* command. To
+configure BGP router, you need AS number. AS number is an identification of
+autonomous system. BGP protocol uses the AS number for detecting whether the
+BGP connection is internal one or external one.
+
+.. index:: router bgp ASN
+.. clicmd:: router bgp ASN
+
+   Enable a BGP protocol process with the specified ASN. After
+   this statement you can input any `BGP Commands`. You can not
+   create different BGP process under different ASN without
+   specifying `multiple-instance` (:ref:`multiple-instance`).
+
+.. index:: no router bgp ASN
+.. clicmd:: no router bgp ASN
+
+   Destroy a BGP protocol process with the specified ASN.
+
+.. index:: bgp router-id A.B.C.D
+.. clicmd:: bgp router-id A.B.C.D
+
+   This command specifies the router-ID. If *bgpd* connects to *zebra* it gets
+   interface and address information. In that case default router ID value is
+   selected as the largest IP Address of the interfaces. When `router zebra` is
+   not enabled *bgpd* can't get interface information so `router-id` is set to
+   0.0.0.0. So please set router-id by hand.
+
+.. _bgp-distance:
+
+BGP distance
+------------
+
+.. index:: distance bgp (1-255) (1-255) (1-255)
+.. clicmd:: distance bgp (1-255) (1-255) (1-255)
+
+   This command change distance value of BGP. Each argument is distance value
+   for external routes, internal routes and local routes.
+
+.. index:: distance (1-255) A.B.C.D/M
+.. clicmd:: distance (1-255) A.B.C.D/M
+
+.. index:: distance (1-255) A.B.C.D/M word
+.. clicmd:: distance (1-255) A.B.C.D/M word
+
+.. _bgp-decision-process:
+
+BGP decision process
+--------------------
+
+The decision process FRR BGP uses to select routes is as follows:
+
+1. Weight check
+
+
+   Prefer higher local weight routes to lower routes.
+
+2. Local preference check
+
+
+   Prefer higher local preference routes to lower.
+
+3. Local route check
+
+   Prefer local routes (statics, aggregates, redistributed) to received routes.
+
+4. AS path length check
+
+   Prefer shortest hop-count AS_PATHs.
+
+5. Origin check
+
+   Prefer the lowest origin type route. That is, prefer IGP origin routes to
+   EGP, to Incomplete routes.
+
+6. MED check
+
+   Where routes with a MED were received from the same AS, prefer the route
+   with the lowest MED. :ref:`bgp-med`.
+
+7. External check
+
+   Prefer the route received from an external, eBGP peer over routes received
+   from other types of peers.
+
+8. IGP cost check
+
+   Prefer the route with the lower IGP cost.
+
+9. Multi-path check
+
+   If multi-pathing is enabled, then check whether the routes not yet
+   distinguished in preference may be considered equal. If
+   :clicmd:`bgp bestpath as-path multipath-relax` is set, all such routes are
+   considered equal, otherwise routes received via iBGP with identical AS_PATHs
+   or routes received from eBGP neighbours in the same AS are considered equal.
+
+10. Already-selected external check
+
+    Where both routes were received from eBGP peers, then prefer the route
+    which is already selected. Note that this check is not applied if
+    :clicmd:`bgp bestpath compare-routerid` is configured. This check can
+    prevent some cases of oscillation.
+
+11. Router-ID check
+
+    Prefer the route with the lowest `router-ID`. If the route has an
+    `ORIGINATOR_ID` attribute, through iBGP reflection, then that router ID is
+    used, otherwise the `router-ID` of the peer the route was received from is
+    used.
+
+12. Cluster-List length check
+
+    The route with the shortest cluster-list length is used. The cluster-list
+    reflects the iBGP reflection path the route has taken.
+
+
+13. Peer address
+
+    Prefer the route received from the peer with the higher
+    transport layer address, as a last-resort tie-breaker.
+
+
+.. index:: bgp bestpath as-path confed
+.. clicmd:: bgp bestpath as-path confed
+
+   This command specifies that the length of confederation path sets and
+   sequences should should be taken into account during the BGP best path
+   decision process.
+
+.. index:: bgp bestpath as-path multipath-relax
+.. clicmd:: bgp bestpath as-path multipath-relax
+
+   This command specifies that BGP decision process should consider paths
+   of equal AS_PATH length candidates for multipath computation. Without
+   the knob, the entire AS_PATH must match for multipath computation.
+
+.. clicmd:: bgp bestpath compare-routerid
+
+   Ensure that when comparing routes where both are equal on most metrics,
+   including local-pref, AS_PATH length, IGP cost, MED, that the tie is broken
+   based on router-ID.
+
+   If this option is enabled, then the already-selected check, where
+   already selected eBGP routes are preferred, is skipped.
+
+   If a route has an `ORIGINATOR_ID` attribute because it has been reflected,
+   that `ORIGINATOR_ID` will be used. Otherwise, the router-ID of the peer the
+   route was received from will be used.
+
+   The advantage of this is that the route-selection (at this point) will be
+   more deterministic. The disadvantage is that a few or even one lowest-ID
+   router may attract all trafic to otherwise-equal paths because of this
+   check. It may increase the possibility of MED or IGP oscillation, unless
+   other measures were taken to avoid these. The exact behaviour will be
+   sensitive to the iBGP and reflection topology.
+
+
+.. _bgp-route-flap-dampening:
+
+BGP route flap dampening
+------------------------
+
+.. clicmd:: bgp dampening (1-45) (1-20000) (1-20000) (1-255)
+
+
+   This command enables BGP route-flap dampening and specifies dampening parameters.
+
+
+   half-life
+      Half-life time for the penalty
+
+   reuse-threshold
+      Value to start reusing a route
+
+   suppress-threshold
+      Value to start suppressing a route
+
+   max-suppress
+      Maximum duration to suppress a stable route
+
+   The route-flap damping algorithm is compatible with :rfc:`2439`. The use of
+   this command is not recommended nowadays.
+
+.. seealso::
+
+   `http://www.ripe.net/ripe/docs/ripe-378,,RIPE-378 <http://www.ripe.net/ripe/docs/ripe-378,,RIPE-378>`_
+
+.. _bgp-med:
+
+BGP MED
+=======
+
+The BGP :abbr:`MED (Multi Exit Discriminator)` attribute has properties which
+can cause subtle convergence problems in BGP. These properties and problems
+have proven to be hard to understand, at least historically, and may still not
+be widely understood. The following attempts to collect together and present
+what is known about MED, to help operators and FRR users in designing and
+configuring their networks.
+
+The BGP :abbr:`MED` attribute is intended to allow one AS to indicate its
+preferences for its ingress points to another AS. The MED attribute will not be
+propagated on to another AS by the receiving AS - it is 'non-transitive' in the
+BGP sense.
+
+E.g., if AS X and AS Y have 2 different BGP peering points, then AS X might set
+a MED of 100 on routes advertised at one and a MED of 200 at the other. When AS
+Y selects between otherwise equal routes to or via AS X, AS Y should prefer to
+take the path via the lower MED peering of 100 with AS X. Setting the MED
+allows an AS to influence the routing taken to it within another, neighbouring
+AS.
+
+In this use of MED it is not really meaningful to compare the MED value on
+routes where the next AS on the paths differs. E.g., if AS Y also had a route
+for some destination via AS Z in addition to the routes from AS X, and AS Z had
+also set a MED, it wouldn't make sense for AS Y to compare AS Z's MED values to
+those of AS X. The MED values have been set by different administrators, with
+different frames of reference.
+
+The default behaviour of BGP therefore is to not compare MED values across
+routes received from different neighbouring ASes. In FRR this is done by
+comparing the neighbouring, left-most AS in the received AS_PATHs of the routes
+and only comparing MED if those are the same.
+
+Unfortunately, this behaviour of MED, of sometimes being compared across routes
+and sometimes not, depending on the properties of those other routes, means MED
+can cause the order of preference over all the routes to be undefined. That is,
+given routes A, B, and C, if A is preferred to B, and B is preferred to C, then
+a well-defined order should mean the preference is transitive (in the sense of
+orders [#med-transitivity-rant]_) and that A would be preferred to C.
+
+However, when MED is involved this need not be the case. With MED it is
+possible that C is actually preferred over A. So A is preferred to B, B is
+preferred to C, but C is preferred to A. This can be true even where BGP
+defines a deterministic 'most preferred' route out of the full set of A,B,C.
+With MED, for any given set of routes there may be a deterministically
+preferred route, but there need not be any way to arrange them into any order
+of preference. With unmodified MED, the order of preference of routes literally
+becomes undefined.
+
+That MED can induce non-transitive preferences over routes can cause issues.
+Firstly, it may be perceived to cause routing table churn locally at speakers;
+secondly, and more seriously, it may cause routing instability in iBGP
+topologies, where sets of speakers continually oscillate between different
+paths.
+
+The first issue arises from how speakers often implement routing decisions.
+Though BGP defines a selection process that will deterministically select the
+same route as best at any given speaker, even with MED, that process requires
+evaluating all routes together. For performance and ease of implementation
+reasons, many implementations evaluate route preferences in a pair-wise fashion
+instead. Given there is no well-defined order when MED is involved, the best
+route that will be chosen becomes subject to implementation details, such as
+the order the routes are stored in. That may be (locally) non-deterministic,
+e.g.: it may be the order the routes were received in.
+
+This indeterminism may be considered undesirable, though it need not cause
+problems. It may mean additional routing churn is perceived, as sometimes more
+updates may be produced than at other times in reaction to some event .
+
+This first issue can be fixed with a more deterministic route selection that
+ensures routes are ordered by the neighbouring AS during selection.
+:clicmd:`bgp deterministic-med`. This may reduce the number of updates as routes
+are received, and may in some cases reduce routing churn. Though, it could
+equally deterministically produce the largest possible set of updates in
+response to the most common sequence of received updates.
+
+A deterministic order of evaluation tends to imply an additional overhead of
+sorting over any set of n routes to a destination. The implementation of
+deterministic MED in FRR scales significantly worse than most sorting
+algorithms at present, with the number of paths to a given destination.  That
+number is often low enough to not cause any issues, but where there are many
+paths, the deterministic comparison may quickly become increasingly expensive
+in terms of CPU.
+
+Deterministic local evaluation can *not* fix the second, more major, issue of
+MED however. Which is that the non-transitive preference of routes MED can
+cause may lead to routing instability or oscillation across multiple speakers
+in iBGP topologies. This can occur with full-mesh iBGP, but is particularly
+problematic in non-full-mesh iBGP topologies that further reduce the routing
+information known to each speaker. This has primarily been documented with iBGP
+route-reflection topologies. However, any route-hiding technologies potentially
+could also exacerbate oscillation with MED.
+
+This second issue occurs where speakers each have only a subset of routes, and
+there are cycles in the preferences between different combinations of routes -
+as the undefined order of preference of MED allows - and the routes are
+distributed in a way that causes the BGP speakers to 'chase' those cycles. This
+can occur even if all speakers use a deterministic order of evaluation in route
+selection.
+
+E.g., speaker 4 in AS A might receive a route from speaker 2 in AS X, and from
+speaker 3 in AS Y; while speaker 5 in AS A might receive that route from
+speaker 1 in AS Y. AS Y might set a MED of 200 at speaker 1, and 100 at speaker
+3. I.e, using ASN:ID:MED to label the speakers:
+
+::
+
+   .
+             /---------------\\
+   X:2------|--A:4-------A:5--|-Y:1:200
+               Y:3:100--|-/   |
+             \\---------------/
+
+
+
+Assuming all other metrics are equal (AS_PATH, ORIGIN, 0 IGP costs), then based
+on the RFC4271 decision process speaker 4 will choose X:2 over Y:3:100, based
+on the lower ID of 2. Speaker 4 advertises X:2 to speaker 5.  Speaker 5 will
+continue to prefer Y:1:200 based on the ID, and advertise this to speaker 4.
+Speaker 4 will now have the full set of routes, and the Y:1:200 it receives
+from 5 will beat X:2, but when speaker 4 compares Y:1:200 to Y:3:100 the MED
+check now becomes active as the ASes match, and now Y:3:100 is preferred.
+Speaker 4 therefore now advertises Y:3:100 to 5, which will also agrees that
+Y:3:100 is preferred to Y:1:200, and so withdraws the latter route from 4.
+Speaker 4 now has only X:2 and Y:3:100, and X:2 beats Y:3:100, and so speaker 4
+implicitly updates its route to speaker 5 to X:2. Speaker 5 sees that Y:1:200
+beats X:2 based on the ID, and advertises Y:1:200 to speaker 4, and the cycle
+continues.
+
+The root cause is the lack of a clear order of preference caused by how MED
+sometimes is and sometimes is not compared, leading to this cycle in the
+preferences between the routes:
+
+::
+
+   .
+    /---> X:2 ---beats---> Y:3:100 --\\
+   |                                   |
+   |                                   |
+    \\---beats--- Y:1:200 <---beats---/
+
+
+
+This particular type of oscillation in full-mesh iBGP topologies can  be
+avoided by speakers preferring already selected, external routes rather than
+choosing to update to new a route based on a post-MED metric (e.g.  router-ID),
+at the cost of a non-deterministic selection process. FRR implements this, as
+do many other implementations, so long as it is not overridden by setting
+:clicmd:`bgp bestpath compare-routerid`, and see also
+:ref:`bgp-decision-process`.
+
+However, more complex and insidious cycles of oscillation are possible with
+iBGP route-reflection, which are not so easily avoided. These have been
+documented in various places. See, e.g.:
+
+- [bgp-route-osci-cond]_
+- [stable-flexible-ibgp]_
+- [ibgp-correctness]_
+
+for concrete examples and further references.
+
+There is as of this writing *no* known way to use MED for its original purpose;
+*and* reduce routing information in iBGP topologies; *and* be sure to avoid the
+instability problems of MED due the non-transitive routing preferences it can
+induce; in general on arbitrary networks.
+
+There may be iBGP topology specific ways to reduce the instability risks, even
+while using MED, e.g.: by constraining the reflection topology and by tuning
+IGP costs between route-reflector clusters, see :rfc:`3345` for details.  In the
+near future, the Add-Path extension to BGP may also solve MED oscillation while
+still allowing MED to be used as intended, by distributing "best-paths per
+neighbour AS". This would be at the cost of distributing at least as many
+routes to all speakers as a full-mesh iBGP would, if not more, while also
+imposing similar CPU overheads as the "Deterministic MED" feature at each
+Add-Path reflector.
+
+More generally, the instability problems that MED can introduce on more
+complex, non-full-mesh, iBGP topologies may be avoided either by:
+
+- Setting :clicmd:`bgp always-compare-med`, however this allows MED to be compared
+  across values set by different neighbour ASes, which may not produce
+  coherent desirable results, of itself.
+- Effectively ignoring MED by setting MED to the same value (e.g.: 0) using
+  :clicmd:`set metric METRIC` on all received routes, in combination with
+  setting :clicmd:`bgp always-compare-med` on all speakers. This is the simplest
+  and most performant way to avoid MED oscillation issues, where an AS is happy
+  not to allow neighbours to inject this problematic metric.
+
+As MED is evaluated after the AS_PATH length check, another possible use for
+MED is for intra-AS steering of routes with equal AS_PATH length, as an
+extension of the last case above. As MED is evaluated before IGP metric, this
+can allow cold-potato routing to be implemented to send traffic to preferred
+hand-offs with neighbours, rather than the closest hand-off according to the
+IGP metric.
+
+Note that even if action is taken to address the MED non-transitivity issues,
+other oscillations may still be possible. E.g., on IGP cost if iBGP and IGP
+topologies are at cross-purposes with each other - see the Flavel and Roughan
+paper above for an example. Hence the guideline that the iBGP topology should
+follow the IGP topology.
+
+.. index:: bgp deterministic-med
+.. clicmd:: bgp deterministic-med
+
+   Carry out route-selection in way that produces deterministic answers
+   locally, even in the face of MED and the lack of a well-defined order of
+   preference it can induce on routes. Without this option the preferred route
+   with MED may be determined largely by the order that routes were received
+   in.
+
+   Setting this option will have a performance cost that may be noticeable when
+   there are many routes for each destination. Currently in FRR it is
+   implemented in a way that scales poorly as the number of routes per
+   destination increases.
+
+   The default is that this option is not set.
+
+Note that there are other sources of indeterminism in the route selection
+process, specifically, the preference for older and already selected routes
+from eBGP peers, :ref:`bgp-decision-process`.
+
+.. index:: bgp always-compare-med
+.. clicmd:: bgp always-compare-med
+
+   Always compare the MED on routes, even when they were received from
+   different neighbouring ASes. Setting this option makes the order of
+   preference of routes more defined, and should eliminate MED induced
+   oscillations.
+
+   If using this option, it may also be desirable to use
+   :clicmd:`set metric METRIC` to set MED to 0 on routes received from external
+   neighbours.
+
+   This option can be used, together with :clicmd:`set metric METRIC` to use
+   MED as an intra-AS metric to steer equal-length AS_PATH routes to, e.g.,
+   desired exit points.
+
+.. _bgp-network:
+
+BGP network
+===========
+
+
+.. _bgp-route:
+
+BGP route
+---------
+
+.. index:: network A.B.C.D/M
+.. clicmd:: network A.B.C.D/M
+
+   This command adds the announcement network.::
+
+     router bgp 1
+      address-family ipv4 unicast
+       network 10.0.0.0/8
+      exit-address-family
+
+   This configuration example says that network 10.0.0.0/8 will be
+   announced to all neighbors. Some vendors' routers don't advertise
+   routes if they aren't present in their IGP routing tables; `bgpd`
+   doesn't care about IGP routes when announcing its routes.
+
+.. index:: no network A.B.C.D/M
+.. clicmd:: no network A.B.C.D/M
+
+
+.. _route-aggregation:
+
+Route Aggregation
+-----------------
+
+.. index:: aggregate-address A.B.C.D/M
+.. clicmd:: aggregate-address A.B.C.D/M
+
+   This command specifies an aggregate address.
+
+.. index:: aggregate-address A.B.C.D/M as-set
+.. clicmd:: aggregate-address A.B.C.D/M as-set
+
+   This command specifies an aggregate address. Resulting routes include
+   AS set.
+
+.. index:: aggregate-address A.B.C.D/M summary-only
+.. clicmd:: aggregate-address A.B.C.D/M summary-only
+
+   This command specifies an aggregate address. Aggreated routes will
+   not be announce.
+
+.. index:: no aggregate-address A.B.C.D/M
+.. clicmd:: no aggregate-address A.B.C.D/M
+
+
+
+.. _redistribute-to-bgp:
+
+Redistribute to BGP
+-------------------
+
+.. index:: redistribute kernel
+.. clicmd:: redistribute kernel
+
+   Redistribute kernel route to BGP process.
+
+.. index:: redistribute static
+.. clicmd:: redistribute static
+
+   Redistribute static route to BGP process.
+
+.. index:: redistribute connected
+.. clicmd:: redistribute connected
+
+   Redistribute connected route to BGP process.
+
+.. index:: redistribute rip
+.. clicmd:: redistribute rip
+
+   Redistribute RIP route to BGP process.
+
+.. index:: redistribute ospf
+.. clicmd:: redistribute ospf
+
+   Redistribute OSPF route to BGP process.
+
+.. index:: redistribute vpn
+.. clicmd:: redistribute vpn
+
+   Redistribute VNC routes to BGP process.
+
+.. index:: update-delay MAX-DELAY
+.. clicmd:: update-delay MAX-DELAY
+
+.. index:: update-delay MAX-DELAY ESTABLISH-WAIT
+.. clicmd:: update-delay MAX-DELAY ESTABLISH-WAIT
+
+   This feature is used to enable read-only mode on BGP process restart or when
+   BGP process is cleared using 'clear ip bgp \*'. When applicable, read-only
+   mode would begin as soon as the first peer reaches Established status and a
+   timer for max-delay seconds is started.
+
+   During this mode BGP doesn't run any best-path or generate any updates to its
+   peers. This mode continues until:
+
+   1. All the configured peers, except the shutdown peers, have sent explicit EOR
+      (End-Of-RIB) or an implicit-EOR. The first keep-alive after BGP has reached
+      Established is considered an implicit-EOR.
+      If the establish-wait optional value is given, then BGP will wait for
+      peers to reach established from the begining of the update-delay till the
+      establish-wait period is over, i.e. the minimum set of established peers for
+      which EOR is expected would be peers established during the establish-wait
+      window, not necessarily all the configured neighbors.
+   2. max-delay period is over.
+
+   On hitting any of the above two conditions, BGP resumes the decision process
+   and generates updates to its peers.
+
+   Default max-delay is 0, i.e. the feature is off by default.
+
+.. index:: table-map ROUTE-MAP-NAME
+.. clicmd:: table-map ROUTE-MAP-NAME
+
+   This feature is used to apply a route-map on route updates from BGP to
+   Zebra.  All the applicable match operations are allowed, such as match on
+   prefix, next-hop, communities, etc. Set operations for this attach-point are
+   limited to metric and next-hop only. Any operation of this feature does not
+   affect BGPs internal RIB.
+
+   Supported for ipv4 and ipv6 address families. It works on multi-paths as
+   well, however, metric setting is based on the best-path only.
+
+.. _bgp-peer:
+
+BGP Peer
+========
+
+.. _defining-peer:
+
+Defining Peer
+-------------
+
+.. index:: neighbor PEER remote-as ASN
+.. clicmd:: neighbor PEER remote-as ASN
+
+
+   Creates a new neighbor whose remote-as is ASN. PEER can be an IPv4 address
+   or an IPv6 address.::
+
+      router bgp 1
+       neighbor 10.0.0.1 remote-as 2
+
+   In this case my router, in AS-1, is trying to peer with AS-2 at 10.0.0.1.
+
+   This command must be the first command used when configuring a neighbor.  If
+   the remote-as is not specified, *bgpd* will complain like this:::
+
+      can't find neighbor 10.0.0.1
+
+
+.. _bgp-peer-commands:
+
+BGP Peer commands
+-----------------
+
+In a `router bgp` clause there are neighbor specific configurations
+required.
+
+.. index:: neighbor PEER shutdown
+.. clicmd:: neighbor PEER shutdown
+
+.. index:: no neighbor PEER shutdown
+.. clicmd:: no neighbor PEER shutdown
+
+   Shutdown the peer. We can delete the neighbor's configuration by
+   ``no neighbor PEER remote-as ASN`` but all configuration of the neighbor
+   will be deleted. When you want to preserve the configuration, but want to
+   drop the BGP peer, use this syntax.
+
+.. index:: neighbor PEER ebgp-multihop
+.. clicmd:: neighbor PEER ebgp-multihop
+
+.. index:: no neighbor PEER ebgp-multihop
+.. clicmd:: no neighbor PEER ebgp-multihop
+
+
+.. index:: neighbor PEER description ...
+.. clicmd:: neighbor PEER description ...
+
+
+.. index:: no neighbor PEER description ...
+.. clicmd:: no neighbor PEER description ...
+
+   Set description of the peer.
+
+.. index:: neighbor PEER version VERSION
+.. clicmd:: neighbor PEER version VERSION
+
+   Set up the neighbor's BGP version. `version` can be `4`,
+   `4+` or `4-`. BGP version `4` is the default value used for
+   BGP peering. BGP version `4+` means that the neighbor supports
+   Multiprotocol Extensions for BGP-4. BGP version `4-` is similar but
+   the neighbor speaks the old Internet-Draft revision 00's Multiprotocol
+   Extensions for BGP-4. Some routing software is still using this
+   version.
+
+.. index:: neighbor PEER interface IFNAME
+.. clicmd:: neighbor PEER interface IFNAME
+
+
+.. index:: no neighbor PEER interface IFNAME
+.. clicmd:: no neighbor PEER interface IFNAME
+
+   When you connect to a BGP peer over an IPv6 link-local address, you have to
+   specify the IFNAME of the interface used for the connection. To specify
+   IPv4 session addresses, see the ``neighbor PEER update-source`` command
+   below.
+
+   This command is deprecated and may be removed in a future release. Its use
+   should be avoided.
+
+.. index:: neighbor PEER next-hop-self [all]
+.. clicmd:: neighbor PEER next-hop-self [all]
+
+
+.. index:: no neighbor PEER next-hop-self [all]
+.. clicmd:: no neighbor PEER next-hop-self [all]
+
+   This command specifies an announced route's nexthop as being equivalent to
+   the address of the bgp router if it is learned via eBGP.  If the optional
+   keyword `all` is specified the modifiation is done also for routes learned
+   via iBGP.
+
+.. index:: neighbor PEER update-source <IFNAME|ADDRESS>
+.. clicmd:: neighbor PEER update-source <IFNAME|ADDRESS>
+
+
+.. index:: no neighbor PEER update-source
+.. clicmd:: no neighbor PEER update-source
+
+   Specify the IPv4 source address to use for the :abbr:`BGP` session to this
+   neighbour, may be specified as either an IPv4 address directly or as an
+   interface name (in which case the *zebra* daemon MUST be running in order
+   for *bgpd* to be able to retrieve interface state).::
+
+      router bgp 64555
+       neighbor foo update-source 192.168.0.1
+       neighbor bar update-source lo0
+
+
+.. index:: neighbor PEER default-originate
+.. clicmd:: neighbor PEER default-originate
+
+.. index:: no neighbor PEER default-originate
+.. clicmd:: no neighbor PEER default-originate
+
+   *bgpd*'s default is to not announce the default route (0.0.0.0/0) even it
+   is in routing table. When you want to announce default routes to the
+   peer, use this command.
+
+.. index:: neighbor PEER port PORT
+.. clicmd:: neighbor PEER port PORT
+
+.. index:: neighbor PEER send-community
+.. clicmd:: neighbor PEER send-community
+
+.. index:: neighbor PEER weight WEIGHT
+.. clicmd:: neighbor PEER weight WEIGHT
+
+
+.. index:: no neighbor PEER weight WEIGHT
+.. clicmd:: no neighbor PEER weight WEIGHT
+
+   This command specifies a default `weight` value for the neighbor's routes.
+
+.. index:: neighbor PEER maximum-prefix NUMBER
+.. clicmd:: neighbor PEER maximum-prefix NUMBER
+
+
+.. index:: no neighbor PEER maximum-prefix NUMBER
+.. clicmd:: no neighbor PEER maximum-prefix NUMBER
+
+
+.. index:: neighbor PEER local-as AS-NUMBER
+.. clicmd:: neighbor PEER local-as AS-NUMBER
+
+
+.. index:: neighbor PEER local-as AS-NUMBER no-prepend
+.. clicmd:: neighbor PEER local-as AS-NUMBER no-prepend
+
+
+.. index:: neighbor PEER local-as AS-NUMBER no-prepend replace-as
+.. clicmd:: neighbor PEER local-as AS-NUMBER no-prepend replace-as
+
+
+.. index:: no neighbor PEER local-as
+.. clicmd:: no neighbor PEER local-as
+
+   Specify an alternate AS for this BGP process when interacting with the
+   specified peer. With no modifiers, the specified local-as is prepended to
+   the received AS_PATH when receiving routing updates from the peer, and
+   prepended to the outgoing AS_PATH (after the process local AS) when
+   transmitting local routes to the peer.
+
+   If the no-prepend attribute is specified, then the supplied local-as is not
+   prepended to the received AS_PATH.
+
+   If the replace-as attribute is specified, then only the supplied local-as is
+   prepended to the AS_PATH when transmitting local-route updates to this peer.
+
+   Note that replace-as can only be specified if no-prepend is.
+
+   This command is only allowed for eBGP peers.
+
+.. index:: neighbor PEER ttl-security hops NUMBER
+.. clicmd:: neighbor PEER ttl-security hops NUMBER
+
+
+.. index:: no neighbor PEER ttl-security hops NUMBER
+.. clicmd:: no neighbor PEER ttl-security hops NUMBER
+
+   This command enforces Generalized TTL Security Mechanism (GTSM), as
+   specified in RFC 5082. With this command, only neighbors that are the
+   specified number of hops away will be allowed to become neighbors. This
+   command is mututally exclusive with *ebgp-multihop*.
+
+.. _peer-filtering:
+
+Peer filtering
+--------------
+
+.. index:: neighbor PEER distribute-list NAME [in|out]
+.. clicmd:: neighbor PEER distribute-list NAME [in|out]
+
+   This command specifies a distribute-list for the peer. `direct` is
+   ``in`` or ``out``.
+
+.. index:: neighbor PEER prefix-list NAME [in|out]
+.. clicmd:: neighbor PEER prefix-list NAME [in|out]
+
+.. index:: neighbor PEER filter-list NAME [in|out]
+.. clicmd:: neighbor PEER filter-list NAME [in|out]
+
+.. index:: neighbor PEER route-map NAME [in|out]
+.. clicmd:: neighbor PEER route-map NAME [in|out]
+
+   Apply a route-map on the neighbor. `direct` must be `in` or `out`.
+
+.. index:: bgp route-reflector allow-outbound-policy
+.. clicmd:: bgp route-reflector allow-outbound-policy
+
+   By default, attribute modification via route-map policy out is not reflected
+   on reflected routes. This option allows the modifications to be reflected as
+   well. Once enabled, it affects all reflected routes.
+
+.. _bgp-peer-group:
+
+BGP Peer Group
+==============
+
+.. index:: neighbor WORD peer-group
+.. clicmd:: neighbor WORD peer-group
+
+   This command defines a new peer group.
+
+.. index:: neighbor PEER peer-group WORD
+.. clicmd:: neighbor PEER peer-group WORD
+
+   This command bind specific peer to peer group WORD.
+
+.. _bgp-address-family:
+
+BGP Address Family
+==================
+
+Multiprotocol BGP enables BGP to carry routing information for multiple Network
+Layer protocols. BGP supports multiple Address Family Identifier (AFI), namely
+IPv4 and IPv6. Support is also provided for multiple sets of per-AFI
+information via Subsequent Address Family Identifiers (SAFI). In addition to
+unicast information, VPN information :rfc:`4364` and :rfc:`4659`, and
+Encapsulation attribute :rfc:`5512` is supported.
+
+.. index:: show ip bgp ipv4 vpn
+.. clicmd:: show ip bgp ipv4 vpn
+
+.. index:: show ipv6 bgp ipv6 vpn
+.. clicmd:: show ipv6 bgp ipv6 vpn
+
+   Print active IPV4 or IPV6 routes advertised via the VPN SAFI.
+
+.. index:: show bgp ipv4 vpn summary
+.. clicmd:: show bgp ipv4 vpn summary
+
+.. index:: show bgp ipv6 vpn summary
+.. clicmd:: show bgp ipv6 vpn summary
+
+   Print a summary of neighbor connections for the specified AFI/SAFI combination.
+
+.. _autonomous-system:
+
+Autonomous System
+=================
+
+The :abbr:`AS (Autonomous System)` number is one of the essential element of
+BGP. BGP is a distance vector routing protocol, and the AS-Path framework
+provides distance vector metric and loop detection to BGP. :rfc:`1930` provides
+some background on the concepts of an AS.
+
+The AS number is a two octet value, ranging in value from 1 to 65535. The AS
+numbers 64512 through 65535 are defined as private AS numbers. Private AS
+numbers must not to be advertised in the global Internet.
+
+.. _display-bgp-routes-by-as-path:
+
+Display BGP Routes by AS Path
+-----------------------------
+
+To show BGP routes which has specific AS path information `show ip bgp` command
+can be used.
+
+.. index:: show bgp ipv4|ipv6 regexp LINE
+.. clicmd:: show bgp ipv4|ipv6 regexp LINE
+
+   This commands displays BGP routes that matches a regular
+   expression `line` (:ref:`bgp-regular-expressions`).
+
+.. _as-path-access-list:
+
+AS Path Access List
+-------------------
+
+AS path access list is user defined AS path.
+
+.. index:: ip as-path access-list WORD permit|deny LINE
+.. clicmd:: ip as-path access-list WORD permit|deny LINE
+
+   This command defines a new AS path access list.
+
+.. index:: no ip as-path access-list WORD
+.. clicmd:: no ip as-path access-list WORD
+
+.. index:: no ip as-path access-list WORD permit|deny LINE
+.. clicmd:: no ip as-path access-list WORD permit|deny LINE
+
+.. _using-as-path-in-route-map:
+
+Using AS Path in Route Map
+--------------------------
+
+.. index:: match as-path WORD
+.. clicmd:: match as-path WORD
+
+
+.. index:: set as-path prepend AS-PATH
+.. clicmd:: set as-path prepend AS-PATH
+
+   Prepend the given string of AS numbers to the AS_PATH.
+
+.. index:: set as-path prepend last-as NUM
+.. clicmd:: set as-path prepend last-as NUM
+
+   Prepend the existing last AS number (the leftmost ASN) to the AS_PATH.
+
+.. _private-as-numbers:
+
+Private AS Numbers
+------------------
+
+.. _bgp-communities-attribute:
+
+BGP Communities Attribute
+=========================
+
+BGP communities attribute is widely used for implementing policy routing.
+Network operators can manipulate BGP communities attribute based on their
+network policy. BGP communities attribute is defined in :rfc:`1997` and
+:rfc:`1998`. It is an optional transitive attribute, therefore local policy can
+travel through different autonomous system.
+
+Communities attribute is a set of communities values. Each communities value is
+4 octet long. The following format is used to define communities value.
+
+
+AS:VAL
+   This format represents 4 octet communities value. ``AS`` is high order 2
+   octet in digit format. ``VAL`` is low order 2 octet in digit format. This
+   format is useful to define AS oriented policy value. For example,
+   ``7675:80`` can be used when AS 7675 wants to pass local policy value 80 to
+   neighboring peer.
+
+internet
+   `internet` represents well-known communities value 0.
+
+no-export
+   ``no-export`` represents well-known communities value ``NO_EXPORT``
+   ``0xFFFFFF01``. All routes carry this value must not be advertised to
+   outside a BGP confederation boundary. If neighboring BGP peer is part of BGP
+   confederation, the peer is considered as inside a BGP confederation
+   boundary, so the route will be announced to the peer.
+
+no-advertise
+   ``no-advertise`` represents well-known communities value ``NO_ADVERTISE``
+   ``0xFFFFFF02``. All routes carry this value must not be advertise to other
+   BGP peers.
+
+local-AS
+   ``local-AS`` represents well-known communities value ``NO_EXPORT_SUBCONFED``
+   ``0xFFFFFF03``. All routes carry this value must not be advertised to
+   external BGP peers. Even if the neighboring router is part of confederation,
+   it is considered as external BGP peer, so the route will not be announced to
+   the peer.
+
+When BGP communities attribute is received, duplicated communities value in the
+communities attribute is ignored and each communities values are sorted in
+numerical order.
+
+.. _bgp-community-lists:
+
+BGP Community Lists
+-------------------
+
+BGP community list is a user defined BGP communites attribute list. BGP
+community list can be used for matching or manipulating BGP communities
+attribute in updates.
+
+There are two types of community list. One is standard community list and
+another is expanded community list. Standard community list defines communities
+attribute. Expanded community list defines communities attribute string with
+regular expression. Standard community list is compiled into binary format when
+user define it. Standard community list will be directly compared to BGP
+communities attribute in BGP updates. Therefore the comparison is faster than
+expanded community list.
+
+.. index:: ip community-list standard NAME permit|deny COMMUNITY
+.. clicmd:: ip community-list standard NAME permit|deny COMMUNITY
+
+   This command defines a new standard community list. COMUNITY is
+   communities value. The COMUNITY is compiled into community structure. We
+   can define multiple community list under same name. In that case match will
+   happen user defined order. Once the community list matches to communities
+   attribute in BGP updates it return permit or deny by the community list
+   definition. When there is no matched entry, deny will be returned. When
+   COMUNITY is empty it matches to any routes.
+
+.. index:: ip community-list expanded NAME permit|deny LINE
+.. clicmd:: ip community-list expanded NAME permit|deny LINE
+
+   This command defines a new expanded community list. COMUNITY is a
+   string expression of communities attribute. COMUNITY can be a
+   regular expression (:ref:`bgp-regular-expressions`) to match
+   the communities attribute in BGP updates.
+
+.. index:: no ip community-list NAME
+.. clicmd:: no ip community-list NAME
+
+.. index:: no ip community-list standard NAME
+.. clicmd:: no ip community-list standard NAME
+
+.. index:: no ip community-list expanded NAME
+.. clicmd:: no ip community-list expanded NAME
+
+   These commands delete community lists specified by NAME. All of
+   community lists shares a single name space. So community lists can be
+   removed simpley specifying community lists name.
+
+.. index:: show ip community-list
+.. clicmd:: show ip community-list
+
+.. index:: show ip community-list NAME
+.. clicmd:: show ip community-list NAME
+
+   This command displays current community list information. When NAME is
+   specified the specified community list's information is shown.
+
+   ::
+
+       # show ip community-list
+       Named Community standard list CLIST
+       permit 7675:80 7675:100 no-export
+       deny internet
+         Named Community expanded list EXPAND
+       permit :
+
+         # show ip community-list CLIST
+         Named Community standard list CLIST
+       permit 7675:80 7675:100 no-export
+       deny internet
+
+
+.. _numbered-bgp-community-lists:
+
+Numbered BGP Community Lists
+----------------------------
+
+When number is used for BGP community list name, the number has
+special meanings. Community list number in the range from 1 and 99 is
+standard community list. Community list number in the range from 100
+to 199 is expanded community list. These community lists are called
+as numbered community lists. On the other hand normal community lists
+is called as named community lists.
+
+.. index:: ip community-list (1-99) permit|deny COMMUNITY
+.. clicmd:: ip community-list (1-99) permit|deny COMMUNITY
+
+   This command defines a new community list. (1-99) is standard
+   community list number. Community list name within this range defines
+   standard community list. When `community` is empty it matches to
+   any routes.
+
+.. index:: ip community-list (100-199) permit|deny COMMUNITY
+.. clicmd:: ip community-list (100-199) permit|deny COMMUNITY
+
+   This command defines a new community list. (100-199) is expanded
+   community list number. Community list name within this range defines
+   expanded community list.
+
+.. index:: ip community-list NAME permit|deny COMMUNITY
+.. clicmd:: ip community-list NAME permit|deny COMMUNITY
+
+   When community list type is not specifed, the community list type is
+   automatically detected. If COMMUNITY can be compiled into communities
+   attribute, the community list is defined as a standard community list.
+   Otherwise it is defined as an expanded community list. This feature is left
+   for backward compability. Use of this feature is not recommended.
+
+.. _bgp-community-in-route-map:
+
+BGP Community in Route Map
+--------------------------
+
+In Route Map (:ref:`route-map`), we can match or set BGP
+communities attribute. Using this feature network operator can
+implement their network policy based on BGP communities attribute.
+
+Following commands can be used in Route Map.
+
+.. index:: match community WORD
+.. clicmd:: match community WORD
+
+.. index:: match community WORD exact-match
+.. clicmd:: match community WORD exact-match
+
+   This command perform match to BGP updates using community list WORD. When
+   the one of BGP communities value match to the one of communities value in
+   community list, it is match. When `exact-match` keyword is spcified, match
+   happen only when BGP updates have completely same communities value
+   specified in the community list.
+
+.. index:: set community none
+.. clicmd:: set community none
+
+.. index:: set community COMMUNITY
+.. clicmd:: set community COMMUNITY
+
+.. index:: set community COMMUNITY additive
+.. clicmd:: set community COMMUNITY additive
+
+   This command manipulate communities value in BGP updates. When
+   `none` is specified as communities value, it removes entire
+   communities attribute from BGP updates. When `community` is not
+   `none`, specified communities value is set to BGP updates. If
+   BGP updates already has BGP communities value, the existing BGP
+   communities value is replaced with specified `community` value.
+   When `additive` keyword is specified, `community` is appended
+   to the existing communities value.
+
+.. index:: set comm-list WORD delete
+.. clicmd:: set comm-list WORD delete
+
+   This command remove communities value from BGP communities attribute.
+   The `word` is community list name. When BGP route's communities
+   value matches to the community list `word`, the communities value
+   is removed. When all of communities value is removed eventually, the
+   BGP update's communities attribute is completely removed.
+
+.. _display-bgp-routes-by-community:
+
+Display BGP Routes by Community
+-------------------------------
+
+To show BGP routes which has specific BGP communities attribute,
+`show bgp {ipv4|ipv6}` command can be used. The
+`community` and `community-list` subcommand can be used.
+
+.. index:: show bgp ipv4|ipv6 community
+.. clicmd:: show bgp ipv4|ipv6 community
+
+.. index:: show bgp ipv4|ipv6 community COMMUNITY
+.. clicmd:: show bgp ipv4|ipv6 community COMMUNITY
+
+.. index:: show bgp ipv4|ipv6 community COMMUNITY exact-match
+.. clicmd:: show bgp ipv4|ipv6 community COMMUNITY exact-match
+
+   `show bgp {ipv4|ipv6} community` displays BGP routes which has communities
+   attribute. Where the address family can be IPv4 or IPv6 among others. When
+   `community` is specified, BGP routes that matches `community` value is
+   displayed. For this command, `internet` keyword can't be used for
+   `community` value. When `exact-match` is specified, it display only
+   routes that have an exact match.
+
+.. index:: show bgp ipv4|ipv6 community-list WORD
+.. clicmd:: show bgp ipv4|ipv6 community-list WORD
+
+.. index:: show bgp ipv4|ipv6 community-list WORD exact-match
+.. clicmd:: show bgp ipv4|ipv6 community-list WORD exact-match
+
+   This commands display BGP routes for the address family specified that matches
+   community list `word`. When `exact-match` is specified, display only
+   routes that have an exact match.
+
+.. _using-bgp-communities-attribute:
+
+Using BGP Communities Attribute
+-------------------------------
+
+Following configuration is the most typical usage of BGP communities
+attribute. AS 7675 provides upstream Internet connection to AS 100.
+When following configuration exists in AS 7675, AS 100 networks
+operator can set local preference in AS 7675 network by setting BGP
+communities attribute to the updates.::
+
+   router bgp 7675
+    neighbor 192.168.0.1 remote-as 100
+    address-family ipv4 unicast
+     neighbor 192.168.0.1 route-map RMAP in
+    exit-address-family
+   !
+   ip community-list 70 permit 7675:70
+   ip community-list 70 deny
+   ip community-list 80 permit 7675:80
+   ip community-list 80 deny
+   ip community-list 90 permit 7675:90
+   ip community-list 90 deny
+   !
+   route-map RMAP permit 10
+    match community 70
+    set local-preference 70
+   !
+   route-map RMAP permit 20
+    match community 80
+    set local-preference 80
+   !
+   route-map RMAP permit 30
+    match community 90
+    set local-preference 90
+
+
+Following configuration announce 10.0.0.0/8 from AS 100 to AS 7675.
+The route has communities value 7675:80 so when above configuration
+exists in AS 7675, announced route's local preference will be set to
+value 80.::
+
+   router bgp 100
+    network 10.0.0.0/8
+    neighbor 192.168.0.2 remote-as 7675
+    address-family ipv4 unicast
+     neighbor 192.168.0.2 route-map RMAP out
+    exit-address-family
+   !
+   ip prefix-list PLIST permit 10.0.0.0/8
+   !
+   route-map RMAP permit 10
+    match ip address prefix-list PLIST
+    set community 7675:80
+
+
+Following configuration is an example of BGP route filtering using
+communities attribute. This configuration only permit BGP routes
+which has BGP communities value 0:80 or 0:90. Network operator can
+put special internal communities value at BGP border router, then
+limit the BGP routes announcement into the internal network.::
+
+   router bgp 7675
+    neighbor 192.168.0.1 remote-as 100
+    address-family ipv4 unicast
+     neighbor 192.168.0.1 route-map RMAP in
+    exit-address-family
+   !
+   ip community-list 1 permit 0:80 0:90
+   !
+   route-map RMAP permit in
+    match community 1
+
+
+Following exmaple filter BGP routes which has communities value 1:1.
+When there is no match community-list returns deny. To avoid
+filtering all of routes, we need to define permit any at last.::
+
+   router bgp 7675
+    neighbor 192.168.0.1 remote-as 100
+    address-family ipv4 unicast
+     neighbor 192.168.0.1 route-map RMAP in
+    exit-address-family
+   !
+   ip community-list standard FILTER deny 1:1
+   ip community-list standard FILTER permit
+   !
+   route-map RMAP permit 10
+    match community FILTER
+
+
+Communities value keyword `internet` has special meanings in
+standard community lists. In below example `internet` act as
+match any. It matches all of BGP routes even if the route does not
+have communities attribute at all. So community list ``INTERNET``
+is same as above example's ``FILTER``.::
+
+   ip community-list standard INTERNET deny 1:1
+   ip community-list standard INTERNET permit internet
+
+
+Following configuration is an example of communities value deletion.
+With this configuration communities value 100:1 and 100:2 is removed
+from BGP updates. For communities value deletion, only `permit`
+community-list is used. `deny` community-list is ignored.::
+
+   router bgp 7675
+    neighbor 192.168.0.1 remote-as 100
+    address-family ipv4 unicast
+     neighbor 192.168.0.1 route-map RMAP in
+    exit-address-family
+   !
+   ip community-list standard DEL permit 100:1 100:2
+   !
+   route-map RMAP permit 10
+    set comm-list DEL delete
+
+
+.. _bgp-extended-communities-attribute:
+
+BGP Extended Communities Attribute
+==================================
+
+BGP extended communities attribute is introduced with MPLS VPN/BGP technology.
+MPLS VPN/BGP expands capability of network infrastructure to provide VPN
+functionality. At the same time it requires a new framework for policy routing.
+With BGP Extended Communities Attribute we can use Route Target or Site of
+Origin for implementing network policy for MPLS VPN/BGP.
+
+BGP Extended Communities Attribute is similar to BGP Communities Attribute. It
+is an optional transitive attribute. BGP Extended Communities Attribute can
+carry multiple Extended Community value.  Each Extended Community value is
+eight octet length.
+
+BGP Extended Communities Attribute provides an extended range compared with BGP
+Communities Attribute. Adding to that there is a type field in each value to
+provides community space structure.
+
+There are two format to define Extended Community value. One is AS based format
+the other is IP address based format.
+
+*AS:VAL*
+   This is a format to define AS based Extended Community value.
+   `AS` part is 2 octets Global Administrator subfield in Extended
+   Community value. `VAL` part is 4 octets Local Administrator
+   subfield. `7675:100` represents AS 7675 policy value 100.
+
+*IP-Address:VAL*
+   This is a format to define IP address based Extended Community value.
+   `IP-Address` part is 4 octets Global Administrator subfield.
+   `VAL` part is 2 octets Local Administrator subfield.
+   `10.0.0.1:100` represents
+
+.. _bgp-extended-community-lists:
+
+BGP Extended Community Lists
+----------------------------
+
+Expanded Community Lists is a user defined BGP Expanded Community
+Lists.
+
+.. index:: ip extcommunity-list standard NAME permit|deny EXTCOMMUNITY
+.. clicmd:: ip extcommunity-list standard NAME permit|deny EXTCOMMUNITY
+
+   This command defines a new standard extcommunity-list.
+   `extcommunity` is extended communities value. The
+   `extcommunity` is compiled into extended community structure. We
+   can define multiple extcommunity-list under same name. In that case
+   match will happen user defined order. Once the extcommunity-list
+   matches to extended communities attribute in BGP updates it return
+   permit or deny based upon the extcommunity-list definition. When
+   there is no matched entry, deny will be returned. When
+   `extcommunity` is empty it matches to any routes.
+
+.. index:: ip extcommunity-list expanded NAME permit|deny LINE
+.. clicmd:: ip extcommunity-list expanded NAME permit|deny LINE
+
+   This command defines a new expanded extcommunity-list. `line` is
+   a string expression of extended communities attribute. `line` can
+   be a regular expression (:ref:`bgp-regular-expressions`) to match an
+   extended communities attribute in BGP updates.
+
+.. index:: no ip extcommunity-list NAME
+.. clicmd:: no ip extcommunity-list NAME
+
+.. index:: no ip extcommunity-list standard NAME
+.. clicmd:: no ip extcommunity-list standard NAME
+
+.. index:: no ip extcommunity-list expanded NAME
+.. clicmd:: no ip extcommunity-list expanded NAME
+
+   These commands delete extended community lists specified by
+   `name`. All of extended community lists shares a single name
+   space. So extended community lists can be removed simpley specifying
+   the name.
+
+.. index:: show ip extcommunity-list
+.. clicmd:: show ip extcommunity-list
+
+.. index:: show ip extcommunity-list NAME
+.. clicmd:: show ip extcommunity-list NAME
+
+   This command displays current extcommunity-list information. When
+   `name` is specified the community list's information is shown.
+
+::
+
+    # show ip extcommunity-list
+
+
+.. _bgp-extended-communities-in-route-map:
+
+BGP Extended Communities in Route Map
+-------------------------------------
+
+.. index:: match extcommunity WORD
+.. clicmd:: match extcommunity WORD
+
+
+.. index:: set extcommunity rt EXTCOMMUNITY
+.. clicmd:: set extcommunity rt EXTCOMMUNITY
+
+   This command set Route Target value.
+
+.. index:: set extcommunity soo EXTCOMMUNITY
+.. clicmd:: set extcommunity soo EXTCOMMUNITY
+
+   This command set Site of Origin value.
+
+.. _bgp-large-communities-attribute:
+
+BGP Large Communities Attribute
+===============================
+
+The BGP Large Communities attribute was introduced in Feb 2017 with
+:rfc:`8092`.
+
+The BGP Large Communities Attribute is similar to the BGP Communities
+Attribute except that it has 3 components instead of two and each of
+which are 4 octets in length. Large Communities bring additional
+functionality and convenience over traditional communities, specifically
+the fact that the `GLOBAL` part below is now 4 octets wide allowing
+AS4 operators seamless use.
+
+
+*GLOBAL:LOCAL1:LOCAL2*
+   This is the format to define Large Community values. Referencing
+   :t:`RFC8195, Use of BGP Large Communities` the values are commonly
+   referred to as follows.
+   The `GLOBAL` part is a 4 octet Global Administrator field, common
+   use of this field is the operators AS number.
+   The `LOCAL1` part is a 4 octet Local Data Part 1 subfield referred
+   to as a function.
+   The `LOCAL2` part is a 4 octet Local Data Part 2 field and referred
+   to as the parameter subfield. `65551:1:10` represents AS 65551
+   function 1 and parameter 10.
+   The referenced RFC above gives some guidelines on recommended usage.
+
+.. _bgp-large-community-lists:
+
+BGP Large Community Lists
+-------------------------
+
+Two types of large community lists are supported, namely `standard` and
+`expanded`.
+
+.. index:: ip large-community-list standard NAME permit|deny LARGE-COMMUNITY
+.. clicmd:: ip large-community-list standard NAME permit|deny LARGE-COMMUNITY
+
+   This command defines a new standard large-community-list.
+   `large-community` is the Large Community value. We
+   can add multiple large communities under same name. In that case
+   the match will happen in the user defined order. Once the large-community-list
+   matches the Large Communities attribute in BGP updates it will return
+   permit or deny based upon the large-community-list definition. When
+   there is no matched entry, a deny will be returned. When `large-community`
+   is empty it matches any routes.
+
+.. index:: ip large-community-list expanded NAME permit|deny LINE
+.. clicmd:: ip large-community-list expanded NAME permit|deny LINE
+
+   This command defines a new expanded large-community-list. Where `line` is
+   a string matching expression, it will be compared to the entire Large Communities
+   attribute as a string, with each large-community in order from lowest to highest.
+   `line` can also be a regular expression which matches this Large
+   Community attribute.
+
+.. index:: no ip large-community-list NAME
+.. clicmd:: no ip large-community-list NAME
+
+.. index:: no ip large-community-list standard NAME
+.. clicmd:: no ip large-community-list standard NAME
+
+.. index:: no ip large-community-list expanded NAME
+.. clicmd:: no ip large-community-list expanded NAME
+
+   These commands delete Large Community lists specified by
+   `name`. All Large Community lists share a single namespace.
+   This means Large Community lists can be removed by simply specifying the name.
+
+.. index:: show ip large-community-list
+.. clicmd:: show ip large-community-list
+
+.. index:: show ip large-community-list NAME
+.. clicmd:: show ip large-community-list NAME
+
+   This command display current large-community-list information. When
+   `name` is specified the community list information is shown.
+
+.. index:: show ip bgp large-community-info
+.. clicmd:: show ip bgp large-community-info
+
+   This command displays the current large communities in use.
+
+.. _bgp-large-communities-in-route-map:
+
+BGP Large Communities in Route Map
+----------------------------------
+
+.. index:: match large-community LINE
+.. clicmd:: match large-community LINE
+
+   Where `line` can be a simple string to match, or a regular expression.
+   It is very important to note that this match occurs on the entire
+   large-community string as a whole, where each large-community is ordered
+   from lowest to highest.
+
+.. index:: set large-community LARGE-COMMUNITY
+.. clicmd:: set large-community LARGE-COMMUNITY
+
+.. index:: set large-community LARGE-COMMUNITY LARGE-COMMUNITY
+.. clicmd:: set large-community LARGE-COMMUNITY LARGE-COMMUNITY
+
+.. index:: set large-community LARGE-COMMUNITY additive
+.. clicmd:: set large-community LARGE-COMMUNITY additive
+
+   These commands are used for setting large-community values. The first
+   command will overwrite any large-communities currently present.
+   The second specifies two large-communities, which overwrites the current
+   large-community list. The third will add a large-community value without
+   overwriting other values. Multiple large-community values can be specified.
+
+
+.. _bgp-vrfs:
+
+BGP VRFs
+========
+
+Bgpd supports multiple VRF instances via the  *router bgp* command:
+
+.. index:: router bgp ASN vrf VRFNAME
+.. clicmd:: router bgp ASN vrf VRFNAME
+
+VRFNAME is matched against VRFs configured in the kernel. When no
+*vrf VRFNAME* is specified, the BGP protocol process belongs to
+the default VRF.
+
+BGP routes may be leaked (i.e., copied) between a unicast VRF RIB
+and the VPN safi RIB of the default VRF (leaking is also permitted
+between the unicast RIB of the default VRF and VPN).  A common
+application of this feature is to connect a customer's private
+routing domain to a provider's VPN service. Leaking is configured
+from the point of view of an individual VRF: ``import`` refers to
+routes leaked from VPN to a unicast VRF, whereas ``export`` refers
+to routes leaked from a unicast VRF to VPN.
+
+Required Parameters
+-------------------
+
+Routes exported from a unicast VRF to the VPN RIB must be augmented
+by two parameters:
+a route-distinguisher (RD) and a route-target list (RTLIST).
+Configuration for these exported routes must, at a minimum, specify
+these two parameters.
+
+Routes imported from the VPN RIB to a unicast VRF are selected
+according to their RTLISTs.
+Routes whose RTLIST contains at least one route-target in common with
+the configured import RTLIST are leaked.
+Configuration for these imported routes must specify an RTLIST to be matched.
+
+The RD, which carries no semantic value, is intended to make the
+route unique in the VPN RIB among all routes of its prefix that
+originate from all the customers and sites that are attached
+to the provider's VPN service. Accordingly, each site of each customer
+is typically assigned an RD that is unique across the entire provider
+network.
+
+The RTLIST is a set of route-target extended community values whose
+purpose is to specify route-leaking policy. Typically, a customer
+is assigned a single route-target value for import and export to be
+used at all customer sites. This configuration specifies a simple
+topology wherein a customer has a single routing domain which is
+shared across all its sites. More complex routing topologies are possible
+through use of additional route-targets to augment the leaking of
+sets of routes in various ways.
+
+Configuration
+-------------
+
+Configuration of route leaking between a unicast VRF RIB and the
+VPN safi RIB of the default VRF is accomplished via commands in the
+context of a VRF address-family:
+
+.. index:: rd vpn export AS:NN|IP:nn
+.. clicmd:: rd vpn export AS:NN|IP:nn
+
+   Specifies the route distinguisher to be added to a route exported
+   from the current unicast VRF to VPN.
+
+.. index:: no rd vpn export [AS:NN|IP:nn]
+.. clicmd:: no rd vpn export [AS:NN|IP:nn]
+
+   Deletes any previously-configured export route distinguisher.
+
+.. index:: rt vpn import|export|both RTLIST...
+.. clicmd:: rt vpn import|export|both RTLIST...
+
+   Specifies the route-target list to be attached to a route (export)
+   or the route-target list to match against (import) when
+   exporting/importing between the current unicast VRF and VPN.
+
+   The RTLIST is a space-separated list of route-targets, which are
+   BGP extended community values as described in
+   :ref:`bgp-extended-communities-attribute`.
+
+.. index:: no rt vpn import|export|both [RTLIST...]
+.. clicmd:: no rt vpn import|export|both [RTLIST...]
+
+   Deletes any previously-configured import or export route-target list.
+
+.. index:: label vpn export (0..1048575)
+.. clicmd:: label vpn export (0..1048575)
+
+   Specifies an optional MPLS label to be attached to a route exported
+   from the current unicast VRF to VPN.
+
+.. index:: no label vpn export [(0..1048575)]
+.. clicmd:: no label vpn export [(0..1048575)]
+
+   Deletes any previously-configured export label.
+
+.. index:: nexthop vpn export A.B.C.D|X:X::X:X
+.. clicmd:: nexthop vpn export A.B.C.D|X:X::X:X
+
+   Specifies an optional nexthop value to be assigned to a route exported
+   from the current unicast VRF to VPN. If left unspecified, the nexthop
+   will be set to 0.0.0.0 or 0:0::0:0 (self).
+
+.. index:: no nexthop vpn export [A.B.C.D|X:X::X:X]
+.. clicmd:: no nexthop vpn export [A.B.C.D|X:X::X:X]
+
+   Deletes any previously-configured export nexthop.
+
+.. index:: route-map vpn import|export MAP
+.. clicmd:: route-map vpn import|export MAP
+
+   Specifies an optional route-map to be applied to routes imported
+   or exported betwen the current unicast VRF and VPN.
+
+.. index:: no route-map vpn import|export [MAP]
+.. clicmd:: no route-map vpn import|export [MAP]
+
+   Deletes any previously-configured import or export route-map.
+
+.. index:: import|export vpn
+.. clicmd:: import|export vpn
+
+   Enables import or export of routes betwen the current unicast VRF and VPN.
+
+.. index:: no import|export vpn
+.. clicmd:: no import|export vpn
+
+   Disables import or export of routes betwen the current unicast VRF and VPN.
+
+
+.. _displaying-bgp-information:
+
+Displaying BGP information
+==========================
+
+
+.. _showing-bgp-information:
+
+Showing BGP information
+-----------------------
+
+.. index:: show ip bgp
+.. clicmd:: show ip bgp
+
+.. index:: show ip bgp A.B.C.D
+.. clicmd:: show ip bgp A.B.C.D
+
+.. index:: show ip bgp X:X::X:X
+.. clicmd:: show ip bgp X:X::X:X
+
+   This command displays BGP routes. When no route is specified it
+   display all of IPv4 BGP routes.
+
+   ::
+
+      BGP table version is 0, local router ID is 10.1.1.1
+         Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
+         Origin codes: i - IGP, e - EGP, ? - incomplete
+
+      Network    Next Hop      Metric LocPrf Weight Path
+         \*> 1.1.1.1/32       0.0.0.0      0   32768 i
+
+         Total number of prefixes 1
+
+
+.. index:: show ip bgp regexp LINE
+.. clicmd:: show ip bgp regexp LINE
+
+   This command displays BGP routes using AS path regular expression
+   (:ref:`bgp-regular-expressions`).
+
+.. index:: show ip bgp community COMMUNITY
+.. clicmd:: show ip bgp community COMMUNITY
+
+.. index:: show ip bgp community COMMUNITY exact-match
+.. clicmd:: show ip bgp community COMMUNITY exact-match
+
+   This command displays BGP routes using `community` (:ref:`display-bgp-routes-by-community`).
+
+.. index:: show ip bgp community-list WORD
+.. clicmd:: show ip bgp community-list WORD
+
+.. index:: show ip bgp community-list WORD exact-match
+.. clicmd:: show ip bgp community-list WORD exact-match
+
+   This command displays BGP routes using community list (:ref:`display-bgp-routes-by-community`).
+
+.. index:: show bgp ipv4|ipv6 summary
+.. clicmd:: show bgp ipv4|ipv6 summary
+
+   Show a bgp peer summary for the specified address family.
+
+.. index:: show bgp ipv4|ipv6 neighbor [PEER]
+.. clicmd:: show bgp ipv4|ipv6 neighbor [PEER]
+
+   This command shows information on a specific BGP `peer`.
+
+.. index:: show bgp ipv4|ipv6 dampening dampened-paths
+.. clicmd:: show bgp ipv4|ipv6 dampening dampened-paths
+
+   Display paths suppressed due to dampening.
+
+.. index:: show bgp ipv4|ipv6 dampening flap-statistics
+.. clicmd:: show bgp ipv4|ipv6 dampening flap-statistics
+
+   Display flap statistics of routes.
+
+.. _other-bgp-commands:
+
+Other BGP commands
+------------------
+
+.. index:: clear bgp ipv4|ipv6 \*
+.. clicmd:: clear bgp ipv4|ipv6 \*
+
+   Clear all address family peers.
+
+.. index:: clear bgp ipv4|ipv6 PEER
+.. clicmd:: clear bgp ipv4|ipv6 PEER
+
+   Clear peers which have addresses of X.X.X.X
+
+.. index:: clear bgp ipv4|ipv6 PEER soft in
+.. clicmd:: clear bgp ipv4|ipv6 PEER soft in
+
+   Clear peer using soft reconfiguration.
+
+.. index:: show debug
+.. clicmd:: show debug
+
+.. index:: debug event
+.. clicmd:: debug event
+
+.. index:: debug update
+.. clicmd:: debug update
+
+.. index:: debug keepalive
+.. clicmd:: debug keepalive
+
+.. index:: no debug event
+.. clicmd:: no debug event
+
+.. index:: no debug update
+.. clicmd:: no debug update
+
+.. index:: no debug keepalive
+.. clicmd:: no debug keepalive
+
+
+.. _capability-negotiation:
+
+Capability Negotiation
+======================
+
+When adding IPv6 routing information exchange feature to BGP. There were some
+proposals. :abbr:`IETF (Internet Engineering Task Force)` :abbr:`IDR ( Inter
+Domain Routing)` :abbr:`IDR ( Inter Domain Routing)` adopted a proposal called
+Multiprotocol Extension for BGP. The specification is described in :rfc:`2283`.
+The protocol does not define new protocols. It defines new attributes to
+existing BGP. When it is used exchanging IPv6 routing information it is called
+BGP-4+. When it is used for exchanging multicast routing information it is
+called MBGP.
+
+*bgpd* supports Multiprotocol Extension for BGP. So if remote peer supports the
+protocol, *bgpd* can exchange IPv6 and/or multicast routing information.
+
+Traditional BGP did not have the feature to detect remote peer's capabilities,
+e.g. whether it can handle prefix types other than IPv4 unicast routes. This
+was a big problem using Multiprotocol Extension for BGP to operational network.
+:rfc:`2842` adopted a feature called Capability Negotiation. *bgpd* use this
+Capability Negotiation to detect the remote peer's capabilities. If the peer is
+only configured as IPv4 unicast neighbor, *bgpd* does not send these Capability
+Negotiation packets (at least not unless other optional BGP features require
+capability negotation).
+
+By default, FRR will bring up peering with minimal common capability for the
+both sides. For example, local router has unicast and multicast capabilitie and
+remote router has unicast capability. In this case, the local router will
+establish the connection with unicast only capability. When there are no common
+capabilities, FRR sends Unsupported Capability error and then resets the
+connection.
+
+If you want to completely match capabilities with remote peer. Please use
+*strict-capability-match* command.
+
+.. index:: neighbor PEER strict-capability-match
+.. clicmd:: neighbor PEER strict-capability-match
+
+.. index:: no neighbor PEER strict-capability-match
+.. clicmd:: no neighbor PEER strict-capability-match
+
+   Strictly compares remote capabilities and local capabilities. If capabilities
+   are different, send Unsupported Capability error then reset connection.
+
+   You may want to disable sending Capability Negotiation OPEN message
+   optional parameter to the peer when remote peer does not implement
+   Capability Negotiation. Please use *dont-capability-negotiate*
+   command to disable the feature.
+
+.. index:: neighbor PEER dont-capability-negotiate
+.. clicmd:: neighbor PEER dont-capability-negotiate
+
+.. index:: no neighbor PEER dont-capability-negotiate
+.. clicmd:: no neighbor PEER dont-capability-negotiate
+
+   Suppress sending Capability Negotiation as OPEN message optional
+   parameter to the peer. This command only affects the peer is configured
+   other than IPv4 unicast configuration.
+
+   When remote peer does not have capability negotiation feature, remote
+   peer will not send any capabilities at all. In that case, bgp
+   configures the peer with configured capabilities.
+
+   You may prefer locally configured capabilities more than the negotiated
+   capabilities even though remote peer sends capabilities. If the peer
+   is configured by *override-capability*, *bgpd* ignores
+   received capabilities then override negotiated capabilities with
+   configured values.
+
+.. index:: neighbor PEER override-capability
+.. clicmd:: neighbor PEER override-capability
+
+.. index:: no neighbor PEER override-capability
+.. clicmd:: no neighbor PEER override-capability
+
+   Override the result of Capability Negotiation with local configuration.
+   Ignore remote peer's capability value.
+
+.. _route-reflector:
+
+Route Reflector
+===============
+
+.. index:: bgp cluster-id A.B.C.D
+.. clicmd:: bgp cluster-id A.B.C.D
+
+.. index:: neighbor PEER route-reflector-client
+.. clicmd:: neighbor PEER route-reflector-client
+
+.. index:: no neighbor PEER route-reflector-client
+.. clicmd:: no neighbor PEER route-reflector-client
+
+
+.. _route-server:
+
+Route Server
+============
+
+At an Internet Exchange point, many ISPs are connected to each other by the
+"full mesh method". As with internal BGP full mesh formation,
+
+this method has a scaling problem.
+
+This scaling problem is well known. Route Server is a method to resolve the
+problem. Each ISP's BGP router only peers to Route Server. Route Server serves
+as BGP information exchange to other BGP routers. By applying this method,
+numbers of BGP connections is reduced from O(n*(n-1)/2) to O(n).
+
+Unlike normal BGP router, Route Server must have several routing tables for
+managing different routing policies for each BGP speaker. We call the routing
+tables as different "views". *bgpd* can work as normal BGP router or Route
+Server or both at the same time.
+
+.. _multiple-instance:
+
+Multiple instance
+-----------------
+
+To enable multiple view function of *bgpd*, you must turn on multiple instance
+feature beforehand.
+
+.. index:: bgp multiple-instance
+.. clicmd:: bgp multiple-instance
+
+   Enable BGP multiple instance feature. After this feature is enabled,
+   you can make multiple BGP instances or multiple BGP views.
+
+.. index:: no bgp multiple-instance
+.. clicmd:: no bgp multiple-instance
+
+   Disable BGP multiple instance feature. You can not disable this feature
+   when BGP multiple instances or views exist.
+
+When you want to make configuration more Cisco like one,
+
+.. index:: bgp config-type cisco
+.. clicmd:: bgp config-type cisco
+
+   Cisco compatible BGP configuration output.
+
+When bgp config-type cisco is specified,
+
+'no synchronization' is displayed.
+'no auto-summary' is displayed.
+
+'network' and 'aggregate-address' argument is displayed as
+'A.B.C.D M.M.M.M'
+
+FRR: network 10.0.0.0/8
+Cisco: network 10.0.0.0
+
+FRR: aggregate-address 192.168.0.0/24
+Cisco: aggregate-address 192.168.0.0 255.255.255.0
+
+Community attribute handling is also different. If there is no
+configuration is specified community attribute and extended community
+attribute are sent to neighbor. When user manually disable the
+feature community attribute is not sent to the neighbor. In case of
+*bgp config-type cisco* is specified, community attribute is not
+sent to the neighbor by default. To send community attribute user has
+to specify *neighbor A.B.C.D send-community* command.::
+
+   !
+   router bgp 1
+    neighbor 10.0.0.1 remote-as 1
+    address-family ipv4 unicast
+     no neighbor 10.0.0.1 send-community
+    exit-address-family
+   !
+   router bgp 1
+    neighbor 10.0.0.1 remote-as 1
+    address-family ipv4 unicast
+     neighbor 10.0.0.1 send-community
+    exit-address-family
+   !
+
+
+.. index:: bgp config-type zebra
+.. clicmd:: bgp config-type zebra
+
+   FRR style BGP configuration. This is default.
+
+.. _bgp-instance-and-view:
+
+BGP instance and view
+---------------------
+
+BGP instance is a normal BGP process. The result of route selection
+goes to the kernel routing table. You can setup different AS at the
+same time when BGP multiple instance feature is enabled.
+
+.. index:: router bgp AS-NUMBER
+.. clicmd:: router bgp AS-NUMBER
+
+   Make a new BGP instance. You can use arbitrary word for the `name`.
+
+  ::
+
+     bgp multiple-instance
+     !
+     router bgp 1
+      neighbor 10.0.0.1 remote-as 2
+      neighbor 10.0.0.2 remote-as 3
+     !
+     router bgp 2
+      neighbor 10.0.0.3 remote-as 4
+      neighbor 10.0.0.4 remote-as 5
+
+
+BGP view is almost same as normal BGP process. The result of
+route selection does not go to the kernel routing table. BGP view is
+only for exchanging BGP routing information.
+
+.. index:: router bgp AS-NUMBER view NAME
+.. clicmd:: router bgp AS-NUMBER view NAME
+
+   Make a new BGP view. You can use arbitrary word for the `name`. This view's
+   route selection result does not go to the kernel routing table.
+
+   With this command, you can setup Route Server like below.
+
+   ::
+
+      bgp multiple-instance
+      !
+      router bgp 1 view 1
+       neighbor 10.0.0.1 remote-as 2
+       neighbor 10.0.0.2 remote-as 3
+      !
+      router bgp 2 view 2
+       neighbor 10.0.0.3 remote-as 4
+       neighbor 10.0.0.4 remote-as 5
+
+
+.. _routing-policy:
+
+Routing policy
+--------------
+
+You can set different routing policy for a peer. For example, you can
+set different filter for a peer.::
+
+   bgp multiple-instance
+   !
+   router bgp 1 view 1
+    neighbor 10.0.0.1 remote-as 2
+    address-family ipv4 unicast
+     neighbor 10.0.0.1 distribute-list 1 in
+    exit-address-family
+   !
+   router bgp 1 view 2
+    neighbor 10.0.0.1 remote-as 2
+    address-family ipv4 unicast
+     neighbor 10.0.0.1 distribute-list 2 in
+    exit-address-family
+
+
+This means BGP update from a peer 10.0.0.1 goes to both BGP view 1 and view
+2. When the update is inserted into view 1, distribute-list 1 is
+applied. On the other hand, when the update is inserted into view 2,
+distribute-list 2 is applied.
+
+.. _viewing-the-view:
+
+Viewing the view
+----------------
+
+To display routing table of BGP view, you must specify view name.
+
+.. index:: show ip bgp view NAME
+.. clicmd:: show ip bgp view NAME
+
+   Display routing table of BGP view ``NAME``.
+
+.. _bgp-regular-expressions:
+
+BGP Regular Expressions
+=======================
+
+BGP regular expressions are based on `POSIX 1003.2` regular
+expressions. The following description is just a quick subset of the
+`POSIX` regular expressions. Adding to that, the special character
+'_' is added.
+
+
+.*
+   Matches any single character.
+
+*
+   Matches 0 or more occurrences of pattern.
+
++
+   Matches 1 or more occurrences of pattern.
+
+?
+   Match 0 or 1 occurrences of pattern.
+
+^
+   Matches the beginning of the line.
+
+$
+   Matches the end of the line.
+
+_
+   Character `_` has special meanings in BGP regular expressions.  It matches
+   to space and comma , and AS set delimiter { and } and AS confederation
+   delimiter `(` and `)`. And it also matches to the beginning of the line and
+   the end of the line. So `_` can be used for AS value boundaries match. This
+   character technically evaluates to `(^|[,{}() ]|$)`.
+
+.. _how-to-set-up-a-6-bone-connection:
+
+How to set up a 6-Bone connection
+=================================
+
+::
+
+   zebra configuration
+   ===================
+   !
+   ! Actually there is no need to configure zebra
+   !
+
+   bgpd configuration
+   ==================
+   !
+   ! This means that routes go through zebra and into the kernel.
+   !
+   router zebra
+   !
+   ! MP-BGP configuration
+   !
+   router bgp 7675
+    bgp router-id 10.0.0.1
+    neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 remote-as `as-number`
+   !
+    address-family ipv6
+    network 3ffe:506::/32
+    neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 activate
+    neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 route-map set-nexthop out
+    neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 remote-as `as-number`
+    neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 route-map set-nexthop out
+    exit-address-family
+   !
+   ipv6 access-list all permit any
+   !
+   ! Set output nexthop address.
+   !
+   route-map set-nexthop permit 10
+    match ipv6 address all
+    set ipv6 nexthop global 3ffe:1cfa:0:2:2c0:4fff:fe68:a225
+    set ipv6 nexthop local fe80::2c0:4fff:fe68:a225
+   !
+   ! logfile FILENAME is obsolete. Please use log file FILENAME
+
+   log file bgpd.log
+   !
+
+
+.. _dump-bgp-packets-and-table:
+
+Dump BGP packets and table
+==========================
+
+.. index:: dump bgp all PATH [INTERVAL]
+.. clicmd:: dump bgp all PATH [INTERVAL]
+
+.. index:: dump bgp all-et PATH [INTERVAL]
+.. clicmd:: dump bgp all-et PATH [INTERVAL]
+
+.. index:: no dump bgp all [PATH] [INTERVAL]
+.. clicmd:: no dump bgp all [PATH] [INTERVAL]
+
+   Dump all BGP packet and events to `path` file.
+   If `interval` is set, a new file will be created for echo `interval` of seconds.
+   The path `path` can be set with date and time formatting (strftime).
+   The type ‘all-et’ enables support for Extended Timestamp Header (:ref:`packet-binary-dump-format`).
+   (:ref:`packet-binary-dump-format`)
+
+.. index:: dump bgp updates PATH [INTERVAL]
+.. clicmd:: dump bgp updates PATH [INTERVAL]
+
+.. index:: dump bgp updates-et PATH [INTERVAL]
+.. clicmd:: dump bgp updates-et PATH [INTERVAL]
+
+.. index:: no dump bgp updates [PATH] [INTERVAL]
+.. clicmd:: no dump bgp updates [PATH] [INTERVAL]
+
+   Dump only BGP updates messages to `path` file.
+   If `interval` is set, a new file will be created for echo `interval` of seconds.
+   The path `path` can be set with date and time formatting (strftime).
+   The type ‘updates-et’ enables support for Extended Timestamp Header (:ref:`packet-binary-dump-format`).
+
+.. index:: dump bgp routes-mrt PATH
+.. clicmd:: dump bgp routes-mrt PATH
+
+.. index:: dump bgp routes-mrt PATH INTERVAL
+.. clicmd:: dump bgp routes-mrt PATH INTERVAL
+
+.. index:: no dump bgp route-mrt [PATH] [INTERVAL]
+.. clicmd:: no dump bgp route-mrt [PATH] [INTERVAL]
+
+   Dump whole BGP routing table to `path`. This is heavy process.
+   The path `path` can be set with date and time formatting (strftime).
+   If `interval` is set, a new file will be created for echo `interval` of seconds.
+
+   Note: the interval variable can also be set using hours and minutes: 04h20m00.
+
+.. _bgp-configuration-examples:
+
+BGP Configuration Examples
+==========================
+
+Example of a session to an upstream, advertising only one prefix to it.::
+
+   router bgp 64512
+    bgp router-id 10.236.87.1
+    neighbor upstream peer-group
+    neighbor upstream remote-as 64515
+    neighbor upstream capability dynamic
+    neighbor 10.1.1.1 peer-group upstream
+    neighbor 10.1.1.1 description ACME ISP
+
+    address-family ipv4 unicast
+     network 10.236.87.0/24
+     neighbor upstream prefix-list pl-allowed-adv out
+    exit-address-family
+   !
+   ip prefix-list pl-allowed-adv seq 5 permit 82.195.133.0/25
+   ip prefix-list pl-allowed-adv seq 10 deny any
+
+A more complex example. With upstream, peer and customer sessions.
+Advertising global prefixes and NO_EXPORT prefixes and providing
+actions for customer routes based on community values. Extensive use of
+route-maps and the 'call' feature to support selective advertising of
+prefixes. This example is intended as guidance only, it has NOT been
+tested and almost certainly containts silly mistakes, if not serious
+flaws.
+
+::
+
+   router bgp 64512
+    bgp router-id 10.236.87.1
+    neighbor upstream capability dynamic
+    neighbor cust capability dynamic
+    neighbor peer capability dynamic
+    neighbor 10.1.1.1 remote-as 64515
+    neighbor 10.1.1.1 peer-group upstream
+    neighbor 10.2.1.1 remote-as 64516
+    neighbor 10.2.1.1 peer-group upstream
+    neighbor 10.3.1.1 remote-as 64517
+    neighbor 10.3.1.1 peer-group cust-default
+    neighbor 10.3.1.1 description customer1
+    neighbor 10.4.1.1 remote-as 64518
+    neighbor 10.4.1.1 peer-group cust
+    neighbor 10.4.1.1 description customer2
+    neighbor 10.5.1.1 remote-as 64519
+    neighbor 10.5.1.1 peer-group peer
+    neighbor 10.5.1.1 description peer AS 1
+    neighbor 10.6.1.1 remote-as 64520
+    neighbor 10.6.1.1 peer-group peer
+    neighbor 10.6.1.1 description peer AS 2
+
+    address-family ipv4 unicast
+     network 10.123.456.0/24
+     network 10.123.456.128/25 route-map rm-no-export
+     neighbor upstream route-map rm-upstream-out out
+     neighbor cust route-map rm-cust-in in
+     neighbor cust route-map rm-cust-out out
+     neighbor cust send-community both
+     neighbor peer route-map rm-peer-in in
+     neighbor peer route-map rm-peer-out out
+     neighbor peer send-community both
+     neighbor 10.3.1.1 prefix-list pl-cust1-network in
+     neighbor 10.4.1.1 prefix-list pl-cust2-network in
+     neighbor 10.5.1.1 prefix-list pl-peer1-network in
+     neighbor 10.6.1.1 prefix-list pl-peer2-network in
+    exit-address-family
+   !
+   ip prefix-list pl-default permit 0.0.0.0/0
+   !
+   ip prefix-list pl-upstream-peers permit 10.1.1.1/32
+   ip prefix-list pl-upstream-peers permit 10.2.1.1/32
+   !
+   ip prefix-list pl-cust1-network permit 10.3.1.0/24
+   ip prefix-list pl-cust1-network permit 10.3.2.0/24
+   !
+   ip prefix-list pl-cust2-network permit 10.4.1.0/24
+   !
+   ip prefix-list pl-peer1-network permit 10.5.1.0/24
+   ip prefix-list pl-peer1-network permit 10.5.2.0/24
+   ip prefix-list pl-peer1-network permit 192.168.0.0/24
+   !
+   ip prefix-list pl-peer2-network permit 10.6.1.0/24
+   ip prefix-list pl-peer2-network permit 10.6.2.0/24
+   ip prefix-list pl-peer2-network permit 192.168.1.0/24
+   ip prefix-list pl-peer2-network permit 192.168.2.0/24
+   ip prefix-list pl-peer2-network permit 172.16.1/24
+   !
+   ip as-path access-list asp-own-as permit ^$
+   ip as-path access-list asp-own-as permit _64512_
+   !
+   ! #################################################################
+   ! Match communities we provide actions for, on routes receives from
+   ! customers. Communities values of <our-ASN>:X, with X, have actions:
+   !
+   ! 100 - blackhole the prefix
+   ! 200 - set no_export
+   ! 300 - advertise only to other customers
+   ! 400 - advertise only to upstreams
+   ! 500 - set no_export when advertising to upstreams
+   ! 2X00 - set local_preference to X00
+   !
+   ! blackhole the prefix of the route
+   ip community-list standard cm-blackhole permit 64512:100
+   !
+   ! set no-export community before advertising
+   ip community-list standard cm-set-no-export permit 64512:200
+   !
+   ! advertise only to other customers
+   ip community-list standard cm-cust-only permit 64512:300
+   !
+   ! advertise only to upstreams
+   ip community-list standard cm-upstream-only permit 64512:400
+   !
+   ! advertise to upstreams with no-export
+   ip community-list standard cm-upstream-noexport permit 64512:500
+   !
+   ! set local-pref to least significant 3 digits of the community
+   ip community-list standard cm-prefmod-100 permit 64512:2100
+   ip community-list standard cm-prefmod-200 permit 64512:2200
+   ip community-list standard cm-prefmod-300 permit 64512:2300
+   ip community-list standard cm-prefmod-400 permit 64512:2400
+   ip community-list expanded cme-prefmod-range permit 64512:2...
+   !
+   ! Informational communities
+   !
+   ! 3000 - learned from upstream
+   ! 3100 - learned from customer
+   ! 3200 - learned from peer
+   !
+   ip community-list standard cm-learnt-upstream permit 64512:3000
+   ip community-list standard cm-learnt-cust permit 64512:3100
+   ip community-list standard cm-learnt-peer permit 64512:3200
+   !
+   ! ###################################################################
+   ! Utility route-maps
+   !
+   ! These utility route-maps generally should not used to permit/deny
+   ! routes, i.e. they do not have meaning as filters, and hence probably
+   ! should be used with 'on-match next'. These all finish with an empty
+   ! permit entry so as not interfere with processing in the caller.
+   !
+   route-map rm-no-export permit 10
+    set community additive no-export
+   route-map rm-no-export permit 20
+   !
+   route-map rm-blackhole permit 10
+    description blackhole, up-pref and ensure it cant escape this AS
+    set ip next-hop 127.0.0.1
+    set local-preference 10
+    set community additive no-export
+   route-map rm-blackhole permit 20
+   !
+   ! Set local-pref as requested
+   route-map rm-prefmod permit 10
+    match community cm-prefmod-100
+    set local-preference 100
+   route-map rm-prefmod permit 20
+    match community cm-prefmod-200
+    set local-preference 200
+   route-map rm-prefmod permit 30
+    match community cm-prefmod-300
+    set local-preference 300
+   route-map rm-prefmod permit 40
+    match community cm-prefmod-400
+    set local-preference 400
+   route-map rm-prefmod permit 50
+   !
+   ! Community actions to take on receipt of route.
+   route-map rm-community-in permit 10
+    description check for blackholing, no point continuing if it matches.
+    match community cm-blackhole
+    call rm-blackhole
+   route-map rm-community-in permit 20
+    match community cm-set-no-export
+    call rm-no-export
+    on-match next
+   route-map rm-community-in permit 30
+    match community cme-prefmod-range
+    call rm-prefmod
+   route-map rm-community-in permit 40
+   !
+   ! #####################################################################
+   ! Community actions to take when advertising a route.
+   ! These are filtering route-maps,
+   !
+   ! Deny customer routes to upstream with cust-only set.
+   route-map rm-community-filt-to-upstream deny 10
+    match community cm-learnt-cust
+    match community cm-cust-only
+   route-map rm-community-filt-to-upstream permit 20
+   !
+   ! Deny customer routes to other customers with upstream-only set.
+   route-map rm-community-filt-to-cust deny 10
+    match community cm-learnt-cust
+    match community cm-upstream-only
+   route-map rm-community-filt-to-cust permit 20
+   !
+   ! ###################################################################
+   ! The top-level route-maps applied to sessions. Further entries could
+   ! be added obviously..
+   !
+   ! Customers
+   route-map rm-cust-in permit 10
+    call rm-community-in
+    on-match next
+   route-map rm-cust-in permit 20
+    set community additive 64512:3100
+   route-map rm-cust-in permit 30
+   !
+   route-map rm-cust-out permit 10
+    call rm-community-filt-to-cust
+    on-match next
+   route-map rm-cust-out permit 20
+   !
+   ! Upstream transit ASes
+   route-map rm-upstream-out permit 10
+    description filter customer prefixes which are marked cust-only
+    call rm-community-filt-to-upstream
+    on-match next
+   route-map rm-upstream-out permit 20
+    description only customer routes are provided to upstreams/peers
+    match community cm-learnt-cust
+   !
+   ! Peer ASes
+   ! outbound policy is same as for upstream
+   route-map rm-peer-out permit 10
+    call rm-upstream-out
+   !
+   route-map rm-peer-in permit 10
+    set community additive 64512:3200
+
+.. include:: routeserver.rst
+
+.. include:: rpki.rst
+
+
+.. [#med-transitivity-rant] For some set of objects to have an order, there *must* be some binary ordering relation that is defined for *every* combination of those objects, and that relation *must* be transitive. I.e.:, if the relation operator is <, and if a < b and b < c then that relation must carry over and it *must* be that a < c for the objects to have an order. The ordering relation may allow for equality, i.e. a < b and b < a may both be true amd imply that a and b are equal in the order and not distinguished by it, in which case the set has a partial order. Otherwise, if there is an order, all the objects have a distinct place in the order and the set has a total order)
+.. [bgp-route-osci-cond] McPherson, D. and Gill, V. and Walton, D., "Border Gateway Protocol (BGP) Persistent Route Oscillation Condition", IETF RFC3345
+.. [stable-flexible-ibgp] Flavel, A. and M. Roughan, "Stable and flexible iBGP", ACM SIGCOMM 2009
+.. [ibgp-correctness] Griffin, T. and G. Wilfong, "On the correctness of IBGP configuration", ACM SIGCOMM 2002
diff --git a/doc/user/conf.py b/doc/user/conf.py
new file mode 100644 (file)
index 0000000..efe1023
--- /dev/null
@@ -0,0 +1,341 @@
+# -*- coding: utf-8 -*-
+#
+# FRR documentation build configuration file, created by
+# sphinx-quickstart on Tue Jan 31 16:00:52 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import re
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+needs_sphinx = '1.0'
+
+# prolog for various variable substitutions
+rst_prolog = ''
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = ['sphinx.ext.todo']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+# source_suffix = ['.rst']
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'FRR'
+copyright = u'2017, FRR'
+author = u'FRR'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+
+# The short X.Y version.
+version = u'?.?'
+# The full version, including alpha/beta/rc tags.
+release = u'?.?-?'
+
+
+# -----------------------------------------------------------------------------
+# Extract values from codebase for substitution into docs.
+# -----------------------------------------------------------------------------
+
+# Various installation prefixes. Reasonable defaults are set where possible.
+# Values are overridden by logic below.
+replace_vars = {
+    'AUTHORS': 'Kunihiro Ishiguro, et al.',
+    'COPYRIGHT_YEAR': '1999-2005',
+    'COPYRIGHT_STR': None,
+    'PACKAGE_NAME': project.lower(),
+    'PACKAGE_TARNAME': project.lower(),
+    'PACKAGE_STRING': None,
+    'PACKAGE_URL': 'https://frrouting.org/',
+    'PACKAGE_VERSION': None,
+    'INSTALL_PREFIX_ETC': None,
+    'INSTALL_PREFIX_SBIN': None,
+    'INSTALL_PREFIX_STATE': None,
+    'INSTALL_PREFIX_MODULES': None,
+    'INSTALL_USER': None,
+    'INSTALL_GROUP': None,
+    'INSTALL_VTY_GROUP': None,
+}
+
+# extract version information, installation location, other stuff we need to
+# use when building final documents
+val = re.compile('^S\["([^"]+)"\]="(.*)"$')
+with open('../../config.status', 'r') as cfgstatus:
+    for ln in cfgstatus.readlines():
+        m = val.match(ln)
+        if not m or m.group(1) not in replace_vars.keys(): continue
+        replace_vars[m.group(1)] = m.group(2)
+
+# manually fill out some of these we can't get from config.status
+replace_vars['COPYRIGHT_STR'] = "Copyright (c)"
+replace_vars['COPYRIGHT_STR'] += ' {0}'.format(replace_vars['COPYRIGHT_YEAR'])
+replace_vars['COPYRIGHT_STR'] += ' {0}'.format(replace_vars['AUTHORS'])
+release = replace_vars['PACKAGE_VERSION']
+version = release.split('-')[0]
+
+# add substitutions to prolog
+for key, value in replace_vars.items():
+    rst_prolog += '.. |{0}| replace:: {1}\n'.format(key, value)
+
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build', 'rpki.rst', 'routeserver.rst', 'ospf_fundamentals.rst']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = True
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+html_theme_options = {
+    'sidebarbgcolor': '#374249'
+}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+html_logo = '../figures/frr-icon.svg'
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+html_favicon = '../figures/frr-logo-icon.png'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+# html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
+#html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# Now only 'ja' uses this config value
+#html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'FRRdoc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+
+# Latex figure (float) alignment
+#'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (master_doc, 'FRR.tex', u'FRR User Manual',
+     u'FRR', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+latex_logo = '../figures/frr-logo-medium.png'
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    (master_doc, 'frr', u'FRR User Manual',
+     [author], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    (master_doc, 'frr', u'FRR User Manual',
+     author, 'FRR', 'One line description of project.',
+     'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+# custom extensions here
+def setup(app):
+    # object type for FRR CLI commands, can be extended to document parent CLI
+    # node later on
+    app.add_object_type('clicmd', 'clicmd')
diff --git a/doc/user/eigrpd.rst b/doc/user/eigrpd.rst
new file mode 100644 (file)
index 0000000..309ee27
--- /dev/null
@@ -0,0 +1,243 @@
+.. _eigrp:
+
+*****
+EIGRP
+*****
+
+.. glossary::
+
+   DUAL
+      The *Diffusing Update ALgorithm*, a :term:`Bellman-Ford` based routing
+      algorithm used by EIGRP.
+
+EIGRP -- Routing Information Protocol is widely deployed interior gateway
+routing protocol. EIGRP was developed in the 1990's. EIGRP is a
+:term:`distance-vector` protocol and is based on the :term:`DUAL` algorithms.
+As a distance-vector protocol, the EIGRP router send updates to its
+neighbors as networks change, thus allowing the convergence to a
+known topology.
+
+*eigrpd* supports EIGRP as described in RFC7868
+
+.. _starting-and-stopping-eigrpd:
+
+Starting and Stopping eigrpd
+============================
+
+The default configuration file name of *eigrpd*'s is :file:`eigrpd.conf`. When
+invocation *eigrpd* searches directory |INSTALL_PREFIX_ETC|. If
+:file:`eigrpd.conf` is not there next search current directory. If an
+integrated config is specified configuration is written into :file:`frr.conf`.
+
+The EIGRP protocol requires interface information maintained by *zebra* daemon.
+So running *zebra* is mandatory to run *eigrpd*. Thus minimum sequence for
+running EIGRP is:
+
+::
+
+  # zebra -d
+  # eigrpd -d
+
+
+Please note that *zebra* must be invoked before *eigrpd*.
+
+To stop *eigrpd*, please use ::
+   kill `cat /var/run/eigrpd.pid`
+
+Certain signals have special meanings to *eigrpd*.
+
++------------------+-----------------------------------------------------------+
+| Signal           | Meaning                                                   |
++==================+===========================================================+
+| SIGHUP & SIGUSR1 | Rotate the log file                                       |
++------------------+-----------------------------------------------------------+
+| SIGINT & SIGTERM | Sweep all installed EIGRP routes and gracefully terminate |
++------------------+-----------------------------------------------------------+
+
+
+*eigrpd* invocation options. Common options that can be specified
+(:ref:`common-invocation-options`).
+
+.. program:: eigrpd
+
+.. option:: -r
+.. option:: --retain
+
+   When the program terminates, retain routes added by *eigrpd*.
+
+.. _eigrp-configuration:
+
+EIGRP Configuration
+===================
+
+.. index:: router eigrp (1-65535)
+.. clicmd:: router eigrp (1-65535)
+
+   The `router eigrp` command is necessary to enable EIGRP. To disable EIGRP,
+   use the `no router eigrp (1-65535)` command. EIGRP must be enabled before
+   carrying out any of the EIGRP commands.
+
+.. index:: no router eigrp (1-65535)
+.. clicmd:: no router eigrp (1-65535)
+
+   Disable EIGRP.
+
+.. index:: network NETWORK
+.. clicmd:: network NETWORK
+
+.. index:: no network NETWORK
+.. clicmd:: no network NETWORK
+
+   Set the EIGRP enable interface by `network`. The interfaces which
+   have addresses matching with `network` are enabled.
+
+   This group of commands either enables or disables EIGRP interfaces between
+   certain numbers of a specified network address. For example, if the
+   network for 10.0.0.0/24 is EIGRP enabled, this would result in all the
+   addresses from 10.0.0.0 to 10.0.0.255 being enabled for EIGRP. The `no
+   network` command will disable EIGRP for the specified network.
+
+   Below is very simple EIGRP configuration. Interface `eth0` and
+   interface which address match to `10.0.0.0/8` are EIGRP enabled.
+
+   ::
+
+      !
+      router eigrp 1
+       network 10.0.0.0/8
+      !
+
+
+.. index:: passive-interface (IFNAME|default)
+.. clicmd:: passive-interface (IFNAME|default)
+
+.. index:: no passive-interface IFNAME
+.. clicmd:: no passive-interface IFNAME
+
+   This command sets the specified interface to passive mode. On passive mode
+   interface, all receiving packets are ignored and eigrpd does not send either
+   multicast or unicast EIGRP packets except to EIGRP neighbors specified with
+   `neighbor` command. The interface may be specified as `default` to make
+   eigrpd default to passive on all interfaces.
+
+   The default is to be passive on all interfaces.
+
+.. _how-to-announce-eigrp-route:
+
+How to Announce EIGRP route
+===========================
+
+.. index:: redistribute kernel
+.. clicmd:: redistribute kernel
+
+.. index:: redistribute kernel metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+.. clicmd:: redistribute kernel metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+
+.. index:: no redistribute kernel
+.. clicmd:: no redistribute kernel
+
+   `redistribute kernel` redistributes routing information from kernel route
+   entries into the EIGRP tables. `no redistribute kernel` disables the routes.
+
+.. index:: redistribute static
+.. clicmd:: redistribute static
+
+.. index:: redistribute static metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+.. clicmd:: redistribute static metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+
+.. index:: no redistribute static
+.. clicmd:: no redistribute static
+
+   `redistribute static` redistributes routing information from static route
+   entries into the EIGRP tables. `no redistribute static` disables the routes.
+
+.. index:: redistribute connected
+.. clicmd:: redistribute connected
+
+.. index:: redistribute connected metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+.. clicmd:: redistribute connected metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+
+.. index:: no redistribute connected
+.. clicmd:: no redistribute connected
+
+   Redistribute connected routes into the EIGRP tables. `no redistribute
+   connected` disables the connected routes in the EIGRP tables. This command
+   redistribute connected of the interface which EIGRP disabled. The connected
+   route on EIGRP enabled interface is announced by default.
+
+.. index:: redistribute ospf
+.. clicmd:: redistribute ospf
+
+.. index:: redistribute ospf metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+.. clicmd:: redistribute ospf metric (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+
+.. index:: no redistribute ospf
+.. clicmd:: no redistribute ospf
+
+   `redistribute ospf` redistributes routing information from ospf route
+   entries into the EIGRP tables. `no redistribute ospf` disables the routes.
+
+.. index:: redistribute bgp
+.. clicmd:: redistribute bgp
+
+.. index:: redistribute bgp metric  (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+.. clicmd:: redistribute bgp metric  (1-4294967295) (0-4294967295) (0-255) (1-255) (1-65535)
+
+.. index:: no redistribute bgp
+.. clicmd:: no redistribute bgp
+
+   `redistribute bgp` redistributes routing information from bgp route entries
+   into the EIGRP tables. `no redistribute bgp` disables the routes.
+
+.. _show-eigrp-information:
+
+Show EIGRP Information
+======================
+
+.. index:: show ip eigrp topology
+.. clicmd:: show ip eigrp topology
+
+   Display current EIGRP status.
+
+   ::
+
+      eigrpd> **show ip eigrp topology**
+      # show ip eigrp topo
+
+      EIGRP Topology Table for AS(4)/ID(0.0.0.0)
+
+      Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply
+             r - reply Status, s - sia Status
+
+      P  10.0.2.0/24, 1 successors, FD is 256256, serno: 0
+             via Connected, enp0s3
+
+
+EIGRP Debug Commands
+====================
+
+Debug for EIGRP protocol.
+
+.. index:: debug eigrp packets
+.. clicmd:: debug eigrp packets
+
+   Debug eigrp packets
+
+   ``debug eigrp`` will show EIGRP packets that are sent and recevied.
+
+.. index:: debug eigrp transmit
+.. clicmd:: debug eigrp transmit
+
+   Debug eigrp transmit events
+
+   ``debug eigrp transmit`` will display detailed information about the EIGRP
+   transmit events.
+
+.. index:: show debugging eigrp
+.. clicmd:: show debugging eigrp
+
+   Display *eigrpd*'s debugging option.
+
+   ``show debugging eigrp`` will show all information currently set for eigrpd
+   debug.
+
diff --git a/doc/user/filter.rst b/doc/user/filter.rst
new file mode 100644 (file)
index 0000000..57f9fbe
--- /dev/null
@@ -0,0 +1,178 @@
+*********
+Filtering
+*********
+
+FRR provides many very flexible filtering features. Filtering is used
+for both input and output of the routing information. Once filtering is
+defined, it can be applied in any direction.
+
+IP Access List
+==============
+
+.. index:: access-list NAME permit IPV4-NETWORK
+.. clicmd:: access-list NAME permit IPV4-NETWORK
+
+.. index:: access-list NAME deny IPV4-NETWORK
+.. clicmd:: access-list NAME deny IPV4-NETWORK
+
+   Basic filtering is done by `access-list` as shown in the
+   following example.
+
+   ::
+
+      access-list filter deny 10.0.0.0/9
+      access-list filter permit 10.0.0.0/8
+
+
+IP Prefix List
+==============
+
+*ip prefix-list* provides the most powerful prefix based
+filtering mechanism. In addition to *access-list* functionality,
+*ip prefix-list* has prefix length range specification and
+sequential number specification. You can add or delete prefix based
+filters to arbitrary points of prefix-list using sequential number specification.
+
+If no ip prefix-list is specified, it acts as permit. If *ip prefix-list*
+is defined, and no match is found, default deny is applied.
+
+.. index:: ip prefix-list NAME (permit|deny) PREFIX [le LEN] [ge LEN]
+.. clicmd:: ip prefix-list NAME (permit|deny) PREFIX [le LEN] [ge LEN]
+
+.. index:: ip prefix-list NAME seq NUMBER (permit|deny) PREFIX [le LEN] [ge LEN]
+.. clicmd:: ip prefix-list NAME seq NUMBER (permit|deny) PREFIX [le LEN] [ge LEN]
+
+   You can create *ip prefix-list* using above commands.
+
+   seq
+      seq `number` can be set either automatically or manually. In the
+      case that sequential numbers are set manually, the user may pick any
+      number less than 4294967295. In the case that sequential number are set
+      automatically, the sequential number will increase by a unit of five (5)
+      per list. If a list with no specified sequential number is created
+      after a list with a specified sequential number, the list will
+      automatically pick the next multiple of five (5) as the list number.
+      For example, if a list with number 2 already exists and a new list with
+      no specified number is created, the next list will be numbered 5. If
+      lists 2 and 7 already exist and a new list with no specified number is
+      created, the new list will be numbered 10.
+
+   le
+      Specifies prefix length. The prefix list will be applied if the prefix
+      length is less than or equal to the le prefix length.
+
+   ge
+      Specifies prefix length. The prefix list will be applied if the prefix
+      length is greater than or equal to the ge prefix length.
+
+
+   Less than or equal to prefix numbers and greater than or equal to
+   prefix numbers can be used together. The order of the le and ge
+   commands does not matter.
+
+   If a prefix list with a different sequential number but with the exact
+   same rules as a previous list is created, an error will result.
+   However, in the case that the sequential number and the rules are
+   exactly similar, no error will result.
+
+   If a list with the same sequential number as a previous list is created,
+   the new list will overwrite the old list.
+
+   Matching of IP Prefix is performed from the smaller sequential number to the
+   larger. The matching will stop once any rule has been applied.
+
+   In the case of no le or ge command, the prefix length must match exactly the
+   length specified in the prefix list.
+
+.. index:: no ip prefix-list NAME
+.. clicmd:: no ip prefix-list NAME
+
+.. _ip-prefix-list-description:
+
+ip prefix-list description
+--------------------------
+
+.. index:: ip prefix-list NAME description DESC
+.. clicmd:: ip prefix-list NAME description DESC
+
+   Descriptions may be added to prefix lists. This command adds a
+   description to the prefix list.
+
+.. index:: no ip prefix-list NAME description [DESC]
+.. clicmd:: no ip prefix-list NAME description [DESC]
+
+   Deletes the description from a prefix list. It is possible to use the
+   command without the full description.
+
+.. _ip-prefix-list-sequential-number-control:
+
+ip prefix-list sequential number control
+----------------------------------------
+
+.. index:: ip prefix-list sequence-number
+.. clicmd:: ip prefix-list sequence-number
+
+   With this command, the IP prefix list sequential number is displayed.
+   This is the default behavior.
+
+.. index:: no ip prefix-list sequence-number
+.. clicmd:: no ip prefix-list sequence-number
+
+   With this command, the IP prefix list sequential number is not
+   displayed.
+
+.. _showing-ip-prefix-list:
+
+Showing ip prefix-list
+----------------------
+
+.. index:: show ip prefix-list
+.. clicmd:: show ip prefix-list
+
+   Display all IP prefix lists.
+
+.. index:: show ip prefix-list NAME
+.. clicmd:: show ip prefix-list NAME
+
+   Show IP prefix list can be used with a prefix list name.
+
+.. index:: show ip prefix-list NAME seq NUM
+.. clicmd:: show ip prefix-list NAME seq NUM
+
+   Show IP prefix list can be used with a prefix list name and sequential
+   number.
+
+.. index:: show ip prefix-list NAME A.B.C.D/M
+.. clicmd:: show ip prefix-list NAME A.B.C.D/M
+
+   If the command longer is used, all prefix lists with prefix lengths equal to
+   or longer than the specified length will be displayed. If the command first
+   match is used, the first prefix length match will be displayed.
+
+.. index:: show ip prefix-list NAME A.B.C.D/M longer
+.. clicmd:: show ip prefix-list NAME A.B.C.D/M longer
+.. index:: show ip prefix-list NAME A.B.C.D/M first-match
+.. clicmd:: show ip prefix-list NAME A.B.C.D/M first-match
+.. index:: show ip prefix-list summary
+.. clicmd:: show ip prefix-list summary
+.. index:: show ip prefix-list summary NAME
+.. clicmd:: show ip prefix-list summary NAME
+.. index:: show ip prefix-list detail
+.. clicmd:: show ip prefix-list detail
+.. index:: show ip prefix-list detail NAME
+.. clicmd:: show ip prefix-list detail NAME
+
+Clear counter of ip prefix-list
+-------------------------------
+
+.. index:: clear ip prefix-list
+.. clicmd:: clear ip prefix-list
+
+   Clears the counters of all IP prefix lists. Clear IP Prefix List can be used
+   with a specified name and prefix.
+
+.. index:: clear ip prefix-list NAME
+.. clicmd:: clear ip prefix-list NAME
+
+.. index:: clear ip prefix-list NAME A.B.C.D/M
+.. clicmd:: clear ip prefix-list NAME A.B.C.D/M
diff --git a/doc/user/glossary.rst b/doc/user/glossary.rst
new file mode 100644 (file)
index 0000000..6b49336
--- /dev/null
@@ -0,0 +1,41 @@
+********
+Glossary
+********
+
+.. glossary::
+
+   distance-vector
+      A distance-vector routing protocol in data networks determines the best
+      route for data packets based on distance. Distance-vector routing
+      protocols measure the distance by the number of routers a packet has to
+      pass. Some distance-vector protocols also take into account network
+      latency and other factors that influence traffic on a given route. To
+      determine the best route across a network, routers on which a
+      distance-vector protocol is implemented exchange information with one
+      another, usually routing tables plus hop counts for destination networks
+      and possibly other traffic information. Distance-vector routing protocols
+      also require that a router informs its neighbours of network topology
+      changes periodically. [distance-vector-rp]_
+
+   link-state
+      Link-state algorithms (also known as shortest path first algorithms)
+      flood routing information to all nodes in the internetwork. Each router,
+      however, sends only the portion of the routing table that describes the
+      state of its own links. In link-state algorithms, each router builds a
+      picture of the entire network in its routing tables. Distance vector
+      algorithms (also known as Bellman-Ford algorithms) call for each router
+      to send all or some portion of its routing table, but only to its
+      neighbors. In essence, link-state algorithms send small updates
+      everywhere, while distance vector algorithms send larger updates only to
+      neighboring routers. Distance vector algorithms know only about their
+      neighbors. [link-state-rp]_
+
+   Bellman-Ford
+      The Bellman–Ford algorithm is an algorithm that computes shortest paths
+      from a single source vertex to all of the other vertices in a weighted
+      digraph. [bellman-ford]_
+
+
+.. [distance-vector-rp] https://en.wikipedia.org/wiki/Distance-vector_routing_protocol
+.. [link-state-rp] https://en.wikipedia.org/wiki/Link-state_routing_protocol
+.. [bellman-ford] https://en.wikipedia.org/wiki/Bellman-Ford_algorithm
diff --git a/doc/user/index.rst b/doc/user/index.rst
new file mode 100644 (file)
index 0000000..54ee8b1
--- /dev/null
@@ -0,0 +1,31 @@
+Welcome to FRR's documentation!
+===============================
+
+.. toctree::
+   :maxdepth: 2
+
+   overview
+   installation
+   basic
+   vtysh
+   filter
+   routemap
+   ipv6
+   kernel
+   snmp
+   zebra
+   protocol
+   bgp
+   babeld
+   eigrpd
+   isisd
+   nhrpd
+   ospfd
+   ospf6d
+   pim
+   ripd
+   ripngd
+   vnc
+   glossary
+   appendix
+
diff --git a/doc/user/installation.rst b/doc/user/installation.rst
new file mode 100644 (file)
index 0000000..6c68815
--- /dev/null
@@ -0,0 +1,348 @@
+.. _installation:
+
+************
+Installation
+************
+
+.. index:: How to install FRR
+.. index:: Installation
+.. index:: Installing FRR
+.. index:: Building the system
+.. index:: Making FRR
+
+Several distributions provide packages for FRR. Check your distribution's
+respositories to find out if a suitable version is available.
+
+FRR depends on various libraries depending on your operating system.
+
+After installing these dependencies, change to the frr source directory and
+issue the following commands:
+
+::
+
+  $ ./bootstrap.sh
+  $ ./configure
+  $ make
+  $ make install
+
+
+.. _configure-the-software:
+
+Configure the Software
+======================
+
+
+.. _the-configure-script:
+
+The Configure Script
+--------------------
+
+.. index:: Configuration options
+
+.. index:: Options for configuring
+
+.. index:: Build options
+
+.. index:: Distribution configuration
+
+.. index:: Options to `./configure`
+
+FRR has an excellent configure script which automatically detects most
+host configurations.  There are several additional configure options to
+customize the build to include or exclude specific features and dependencies.
+
+.. program:: configure
+
+.. option:: --disable-zebra
+
+   Do not build zebra daemon.
+
+.. option:: --disable-ripd
+
+   Do not build ripd.
+
+.. option:: --disable-ripngd
+
+   Do not build ripngd.
+
+.. option:: --disable-ospfd
+
+   Do not build ospfd.
+
+.. option:: --disable-ospf6d
+
+   Do not build ospf6d.
+
+.. option:: --disable-bgpd
+
+   Do not build bgpd.
+
+.. option:: --disable-bgp-announce
+
+   Make *bgpd* which does not make bgp announcements at all.  This
+   feature is good for using *bgpd* as a BGP announcement listener.
+
+.. option:: --enable-datacenter
+
+   Enable system defaults to work as if in a Data Center. See defaults.h
+   for what is changed by this configure option.
+
+.. option:: --enable-snmp
+
+   Enable SNMP support.  By default, SNMP support is disabled.
+
+.. option:: --disable-ospfapi
+
+   Disable support for OSPF-API, an API to interface directly with ospfd.
+   OSPF-API is enabled if --enable-opaque-lsa is set.
+
+.. option:: --disable-ospfclient
+
+   Disable building of the example OSPF-API client.
+
+.. option:: --disable-ospf-ri
+
+   Disable support for OSPF Router Information (RFC4970 & RFC5088) this
+   requires support for Opaque LSAs and Traffic Engineering.
+
+.. option:: --disable-isisd
+
+   Do not build isisd.
+
+.. option:: --enable-isis-topology
+
+   Enable IS-IS topology generator.
+
+.. option:: --enable-isis-te
+
+   Enable Traffic Engineering Extension for ISIS (RFC5305)
+
+.. option:: --enable-multipath <ARG>
+
+   Enable support for Equal Cost Multipath. `ARG` is the maximum number
+   of ECMP paths to allow, set to 0 to allow unlimited number of paths.
+
+.. option:: --enable-realms
+
+   Enable the support of Linux Realms. Convert tag values from 1-255 into a
+   realm value when inserting into the Linux kernel. Then routing policy can be
+   assigned to the realm. See the tc man page.
+
+.. option:: --disable-rtadv
+
+   Disable support IPV6 router advertisement in zebra.
+
+.. option:: --enable-gcc-rdynamic
+
+   Pass the ``-rdynamic`` option to the linker driver.  This is in most cases
+   neccessary for getting usable backtraces.  This option defaults to on if the
+   compiler is detected as gcc, but giving an explicit enable/disable is
+   suggested.
+
+.. option:: --disable-backtrace
+
+   Controls backtrace support for the crash handlers. This is autodetected by
+   default. Using the switch will enforce the requested behaviour, failing with
+   an error if support is requested but not available.  On BSD systems, this
+   needs libexecinfo, while on glibc support for this is part of libc itself.
+
+.. option:: --enable-dev-build
+
+   Turn on some options for compiling FRR within a development environment in
+   mind.  Specifically turn on -g3 -O0 for compiling options and add inclusion
+   of grammar sandbox.
+
+.. option:: --enable-fuzzing
+
+   Turn on some compile options to allow you to run fuzzing tools against the
+   system. This flag is intended as a developer only tool and should not be
+   used for normal operations.
+
+.. option:: --disable-snmp
+
+   Build without SNMP support.
+
+.. option:: --disable-vtysh
+
+   Build without VTYSH.
+
+.. option:: --enable-fpm
+
+   Build with FPM module support.
+
+.. option:: --enable-numeric-version
+
+   Alpine Linux does not allow non-numeric characters in the version string.
+   With this option, we provide a way to strip out these characters for apk dev
+   package builds.
+
+You may specify any combination of the above options to the configure
+script. By default, the executables are placed in :file:`/usr/local/sbin`
+and the configuration files in :file:`/usr/local/etc`. The :file:`/usr/local/`
+installation prefix and other directories may be changed using the following
+options to the configuration script.
+
+.. option:: --prefix <prefix>
+
+   Install architecture-independent files in `prefix` [/usr/local].
+
+.. option:: --sysconfdir <dir>
+
+   Look for configuration files in `dir` [`prefix`/etc]. Note that sample
+   configuration files will be installed here.
+
+.. option:: --localstatedir <dir>
+
+   Configure zebra to use `dir` for local state files, such as pid files and
+   unix sockets.
+
+.. _least-privilege-support:
+
+Least-Privilege Support
+-----------------------
+
+.. index:: FRR Least-Privileges
+
+.. index:: FRR Privileges
+
+Additionally, you may configure zebra to drop its elevated privileges
+shortly after startup and switch to another user. The configure script will
+automatically try to configure this support. There are three configure
+options to control the behaviour of FRR daemons.
+
+.. option:: --enable-user <user>
+
+   Switch to user `user shortly after startup, and run as user `user` in normal
+   operation.
+
+.. option:: --enable-group <user>
+
+   Switch real and effective group to `group` shortly after startup.
+
+.. option:: --enable-vty-group <group>
+
+   Create Unix Vty sockets (for use with vtysh) with group owndership set to
+   `group`. This allows one to create a seperate group which is restricted to
+   accessing only the vty sockets, hence allowing one to delegate this group to
+   individual users, or to run vtysh setgid to this group.
+
+The default user and group which will be configured is 'frr' if no user or
+group is specified. Note that this user or group requires write access to the
+local state directory (see :option:`--localstatedir`) and requires at least
+read access, and write access if you wish to allow daemons to write out their
+configuration, to the configuration directory (see :option:`--sysconfdir`).
+
+On systems which have the 'libcap' capabilities manipulation library (currently
+only Linux), FRR will retain only minimal capabilities required and will only
+raise these capabilities for brief periods. On systems without libcap, FRR will
+run as the user specified and only raise its UID to 0 for brief periods.
+
+.. _linux-notes:
+
+Linux Notes
+-----------
+
+.. index:: Configuring FRR
+
+.. index:: Building on Linux boxes
+
+.. index:: Linux configurations
+
+There are several options available only to GNU/Linux systems [#]_.
+If you use GNU/Linux, make sure that the current kernel configuration is what
+you want.  FRR will run with any kernel configuration but some recommendations
+do exist.
+
+
+- :makevar:`CONFIG_NETLINK`
+  Kernel/User netlink socket. This is a brand new feature which enables an
+  advanced interface between the Linux kernel and zebra (:ref:`kernel-interface`).
+- :makevar:`CONFIG_RTNETLINK`
+  Routing messages.
+  This makes it possible to receive netlink routing messages.  If you
+  specify this option, *zebra* can detect routing information
+  updates directly from the kernel (:ref:`kernel-interface`).
+- :makevar:`CONFIG_IP_MULTICAST`
+  IP: multicasting.
+  This option should be specified when you use *ripd* (:ref:`rip`) or
+  *ospfd* (:ref:`ospfv2`) because these protocols use multicast.
+
+IPv6 support has been added in GNU/Linux kernel version 2.2.  If you
+try to use the FRR IPv6 feature on a GNU/Linux kernel, please
+make sure the following libraries have been installed.  Please note that
+these libraries will not be needed when you uses GNU C library 2.1
+or upper.
+
+- inet6-apps
+
+  The `inet6-apps` package includes basic IPv6 related libraries such
+  as `inet_ntop` and `inet_pton`.  Some basic IPv6 programs such
+  as *ping*, *ftp*, and *inetd* are also
+  included. The `inet-apps` can be found at
+  `ftp://ftp.inner.net/pub/ipv6/ <ftp://ftp.inner.net/pub/ipv6/>`_.
+
+- net-tools
+
+  The `net-tools` package provides an IPv6 enabled interface and routing
+  utility.  It contains *ifconfig*, *route*, *netstat*, and other tools.
+  `net-tools` may be found at http://www.tazenda.demon.co.uk/phil/net-tools/.
+
+.. _build-the-software:
+
+Build the Software
+==================
+
+After configuring the software, you will need to compile it for your system.
+Simply issue the command *make* in the root of the source directory and the
+software will be compiled. Cliff Notes versions of different compilation
+examples can be found in the Developer's Manual Appendix.  If you have *any*
+problems at this stage, please send a bug report :ref:`bug-reports`.
+
+::
+
+  $ ./bootstrap.sh
+  $ ./configure <appropriate to your system>
+  $ make
+
+
+Install the Software
+====================
+
+Installing the software to your system consists of copying the compiled
+programs and supporting files to a standard location. After the
+installation process has completed, these files have been copied
+from your work directory to :file:`/usr/local/bin`, and :file:`/usr/local/etc`.
+
+To install the FRR suite, issue the following command at your shell
+prompt:::
+
+  $ make install
+
+FRR daemons have their own terminal interface or VTY.  After
+installation, you have to setup each beast's port number to connect to
+them. Please add the following entries to :file:`/etc/services`.
+
+::
+
+  zebrasrv      2600/tcp                 # zebra service
+  zebra         2601/tcp                 # zebra vty
+  ripd          2602/tcp                 # RIPd vty
+  ripngd        2603/tcp                 # RIPngd vty
+  ospfd         2604/tcp                 # OSPFd vty
+  bgpd          2605/tcp                 # BGPd vty
+  ospf6d        2606/tcp                 # OSPF6d vty
+  ospfapi       2607/tcp                 # ospfapi
+  isisd         2608/tcp                 # ISISd vty
+  nhrpd         2610/tcp                 # nhrpd vty
+  pimd          2611/tcp                 # PIMd vty
+
+
+If you use a FreeBSD newer than 2.2.8, the above entries are already
+added to :file:`/etc/services` so there is no need to add it. If you
+specify a port number when starting the daemon, these entries may not be
+needed.
+
+You may need to make changes to the config files in
+|INSTALL_PREFIX_ETC|. :ref:`config-commands`.
+
+.. [#] GNU/Linux has very flexible kernel configuration features.
diff --git a/doc/user/ipv6.rst b/doc/user/ipv6.rst
new file mode 100644 (file)
index 0000000..9d07902
--- /dev/null
@@ -0,0 +1,193 @@
+.. _ipv6-support:
+
+************
+IPv6 Support
+************
+
+FRR fully supports IPv6 routing.  As described so far, Frr supports RIPng,
+OSPFv3, and BGP-4+.  You can give IPv6 addresses to an interface and configure
+static IPv6 routing information.  FRR IPv6 also provides automatic address
+configuration via a feature called ``address auto configuration``.  To do it,
+the router must send router advertisement messages to the all nodes that exist
+on the network.
+
+Previous versions of FRR could be built without IPv6 support.  This is
+no longer possible.
+
+Router Advertisement
+====================
+
+.. index:: no ipv6 nd suppress-ra
+.. clicmd:: no ipv6 nd suppress-ra
+
+   Send router advertisment messages.
+
+.. index:: ipv6 nd suppress-ra
+.. clicmd:: ipv6 nd suppress-ra
+
+   Don't send router advertisment messages.
+
+.. index:: ipv6 nd prefix ipv6prefix [valid-lifetime] [preferred-lifetime] [off-link] [no-autoconfig] [router-address]
+.. clicmd:: ipv6 nd prefix ipv6prefix [valid-lifetime] [preferred-lifetime] [off-link] [no-autoconfig] [router-address]
+
+   Configuring the IPv6 prefix to include in router advertisements. Several prefix
+   specific optional parameters and flags may follow:
+
+   - ``valid-lifetime``: the length of time in seconds during what the prefix is
+     valid for the purpose of on-link determination. Value ``infinite`` represents
+     infinity (i.e. a value of all one bits (``0xffffffff``)).
+     Range: ``(0-4294967295)``  Default: ``2592000``
+
+   - ``preferred-lifetime``: the length of time in seconds during what addresses
+     generated from the prefix remain preferred. Value ``infinite`` represents
+     infinity.
+     Range: ``(0-4294967295)``  Default: ``604800``
+
+   - ``off-link``: indicates that advertisement makes no statement about on-link or
+     off-link properties of the prefix.
+     Default: not set, i.e. this prefix can be used for on-link determination.
+
+   - ``no-autoconfig``: indicates to hosts on the local link that the specified prefix
+     cannot be used for IPv6 autoconfiguration.
+
+     Default: not set, i.e. prefix can be used for autoconfiguration.
+
+   - ``router-address``: indicates to hosts on the local link that the specified
+     prefix contains a complete IP address by setting R flag.
+
+     Default: not set, i.e. hosts do not assume a complete IP address is placed.
+
+.. index::
+   single: no ipv6 nd ra-interval [(1-1800)]
+   single: no ipv6 nd ra-interval [(1-1800)]
+.. clicmd:: [no] ipv6 nd ra-interval [(1-1800)]
+
+   The maximum time allowed between sending unsolicited multicast router
+   advertisements from the interface, in seconds.
+   Default: ``600``
+
+.. index:: ipv6 nd ra-interval msec (70-1800000)
+.. index::
+   single: no ipv6 nd ra-interval [msec (70-1800000)]
+   single: ipv6 nd ra-interval msec (70-1800000)
+.. clicmd:: [no] ipv6 nd ra-interval [msec (70-1800000)]
+
+   The maximum time allowed between sending unsolicited multicast router
+   advertisements from the interface, in milliseconds.
+   Default: ``600000``
+
+.. index::
+   single: ipv6 nd ra-lifetime (0-9000)
+   single: no ipv6 nd ra-lifetime [(0-9000)]
+.. clicmd:: [no] ipv6 nd ra-lifetime [(0-9000)]
+
+   The value to be placed in the Router Lifetime field of router advertisements
+   sent from the interface, in seconds. Indicates the usefulness of the router
+   as a default router on this interface. Setting the value to zero indicates
+   that the router should not be considered a default router on this interface.
+   Must be either zero or between value specified with ``ipv6 nd ra-interval``
+   (or default) and 9000 seconds.
+   Default: ``1800``
+
+.. index::
+   single: no ipv6 nd reachable-time [(1-3600000)]
+   single: ipv6 nd reachable-time (1-3600000)
+.. clicmd:: [no] ipv6 nd reachable-time [(1-3600000)]
+
+   The value to be placed in the Reachable Time field in the Router
+   Advertisement messages sent by the router, in milliseconds. The configured
+   time enables the router to detect unavailable neighbors. The value zero
+   means unspecified (by this router).
+   Default: ``0``
+
+.. index::
+   single: ipv6 nd managed-config-flag
+   single: no ipv6 nd managed-config-flag
+.. clicmd:: [no] ipv6 nd managed-config-flag
+
+   Set/unset flag in IPv6 router advertisements which indicates to hosts that
+   they should use managed (stateful) protocol for addresses autoconfiguration
+   in addition to any addresses autoconfigured using stateless address
+   autoconfiguration.
+   Default: not set
+
+.. index::
+   single: ipv6 nd other-config-flag
+   single: no ipv6 nd other-config-flag
+.. clicmd:: [no] ipv6 nd other-config-flag
+
+   Set/unset flag in IPv6 router advertisements which indicates to hosts that
+   they should use administered (stateful) protocol to obtain autoconfiguration
+   information other than addresses.
+   Default: not set
+
+.. index::
+   single: ipv6 nd home-agent-config-flag
+   single: no ipv6 nd home-agent-config-flag
+.. clicmd:: [no] ipv6 nd home-agent-config-flag
+
+   Set/unset flag in IPv6 router advertisements which indicates to hosts that
+   the router acts as a Home Agent and includes a Home Agent Option.
+   Default: not set
+
+.. index:: ipv6 nd home-agent-preference (0-65535)
+
+.. index::
+   single: no ipv6 nd home-agent-preference [(0-65535)]
+   single: ipv6 nd home-agent-preference (0-65535)
+.. clicmd:: [no] ipv6 nd home-agent-preference [(0-65535)]
+
+   The value to be placed in Home Agent Option, when Home Agent config flag is
+   set, which indicates to hosts Home Agent preference. The default value of 0
+   stands for the lowest preference possible.
+   Default: ``0``
+
+.. index::
+   single: ipv6 nd home-agent-lifetime (0-65520)
+   single: no ipv6 nd home-agent-lifetime (0-65520)
+.. clicmd:: [no] ipv6 nd home-agent-lifetime [(0-65520)]
+
+   The value to be placed in Home Agent Option, when Home Agent config flag is set,
+   which indicates to hosts Home Agent Lifetime. The default value of 0 means to
+   place the current Router Lifetime value.
+
+   Default: ``0``
+
+.. index::
+   single: ipv6 nd adv-interval-option
+   single: no ipv6 nd adv-interval-option
+.. clicmd:: [no] ipv6 nd adv-interval-option
+
+   Include an Advertisement Interval option which indicates to hosts the maximum time,
+   in milliseconds, between successive unsolicited Router Advertisements.
+   Default: not set
+
+.. index::
+   single: ipv6 nd router-preference (high|medium|low)
+   single: no ipv6 nd router-preference (high|medium|low)
+.. clicmd:: [no] ipv6 nd router-preference [(high|medium|low)]
+
+   Set default router preference in IPv6 router advertisements per RFC4191.
+   Default: medium
+
+.. index::
+   single: ipv6 nd mtu (1-65535)
+   single: no ipv6 nd mtu [(1-65535)]
+.. clicmd:: [no] ipv6 nd mtu [(1-65535)]
+
+   Include an MTU (type 5) option in each RA packet to assist the attached
+   hosts in proper interface configuration. The announced value is not verified
+   to be consistent with router interface MTU.
+
+   Default: don't advertise any MTU option.::
+           interface eth0
+            no ipv6 nd suppress-ra
+            ipv6 nd prefix 2001:0DB8:5009::/64
+
+
+.. seealso::
+
+   - :rfc:`2462` (IPv6 Stateless Address Autoconfiguration)
+   - :rfc:`4861` (Neighbor Discovery for IP Version 6 (IPv6))
+   - :rfc:`6275` (Mobility Support in IPv6)
+   - :rfc:`4191` (Default Router Preferences and More-Specific Routes)
diff --git a/doc/user/isisd.rst b/doc/user/isisd.rst
new file mode 100644 (file)
index 0000000..b698980
--- /dev/null
@@ -0,0 +1,636 @@
+.. _isis:
+
+****
+ISIS
+****
+
+:abbr:`ISIS (Intermediate System to Intermediate System)` is a routing protocol
+which is described in :t:`ISO10589`, :rfc:`1195`, :rfc:`5308`. ISIS is an
+:abbr:`IGP (Interior Gateway Protocol)`. Compared with :abbr:`RIP`,
+:abbr:`ISIS` can provide scalable network support and faster convergence times
+like :abbr:`OSPF`. ISIS is widely used in large networks such as :abbr:`ISP
+(Internet Service Provider)` and carrier backbone networks.
+
+.. _configuring-isisd:
+
+Configuring isisd
+=================
+
+There are no *isisd* specific options. Common options can be specified
+(:ref:`common-invocation-options`) to *isisd*. *isisd* needs to acquire
+interface information from *zebra* in order to function. Therefore *zebra* must
+be running before invoking *isisd*. Also, if *zebra* is restarted then *isisd*
+must be too.
+
+Like other daemons, *isisd* configuration is done in :abbr:`ISIS` specific
+configuration file :file:`isisd.conf`.
+
+.. _isis-router:
+
+ISIS router
+===========
+
+To start ISIS process you have to specify the ISIS router. As of this
+writing, *isisd* does not support multiple ISIS processes.
+
+.. index:: router isis WORD
+.. clicmd:: router isis WORD
+
+.. index:: no router isis WORD
+.. clicmd:: no router isis WORD
+
+   Enable or disable the ISIS process by specifying the ISIS domain with
+   'WORD'.  *isisd* does not yet support multiple ISIS processes but you must
+   specify the name of ISIS process. The ISIS process name 'WORD' is then used
+   for interface (see command :clicmd:`ip router isis WORD`).
+
+.. index:: net XX.XXXX. ... .XXX.XX
+.. clicmd:: net XX.XXXX. ... .XXX.XX
+
+.. index:: no net XX.XXXX. ... .XXX.XX
+.. clicmd:: no net XX.XXXX. ... .XXX.XX
+
+   Set/Unset network entity title (NET) provided in ISO format.
+
+.. index:: hostname dynamic
+.. clicmd:: hostname dynamic
+
+.. index:: no hostname dynamic
+.. clicmd:: no hostname dynamic
+
+   Enable support for dynamic hostname.
+
+.. index:: area-password [clear | md5] <password>
+.. clicmd:: area-password [clear | md5] <password>
+
+.. index:: domain-password [clear | md5] <password>
+.. clicmd:: domain-password [clear | md5] <password>
+
+.. index:: no area-password
+.. clicmd:: no area-password
+
+.. index:: no domain-password
+.. clicmd:: no domain-password
+
+   Configure the authentication password for an area, respectively a domain, as
+   clear text or md5 one.
+
+.. index:: log-adjacency-changes
+.. clicmd:: log-adjacency-changes
+
+.. index:: no log-adjacency-changes
+.. clicmd:: no log-adjacency-changes
+
+   Log changes in adjacency state.
+
+.. index:: metric-style [narrow | transition | wide]
+.. clicmd:: metric-style [narrow | transition | wide]
+
+.. index:: no metric-style
+.. clicmd:: no metric-style
+
+   Set old-style (ISO 10589) or new-style packet formats:
+
+   - narrow
+     Use old style of TLVs with narrow metric
+   - transition
+     Send and accept both styles of TLVs during transition
+   - wide
+     Use new style of TLVs to carry wider metric
+
+.. index:: set-overload-bit
+.. clicmd:: set-overload-bit
+
+.. index:: no set-overload-bit
+.. clicmd:: no set-overload-bit
+
+   Set overload bit to avoid any transit traffic.
+
+.. _isis-timer:
+
+ISIS Timer
+==========
+
+.. index:: lsp-gen-interval (1-120)
+.. clicmd:: lsp-gen-interval (1-120)
+
+.. index:: lsp-gen-interval [level-1 | level-2] (1-120)
+.. clicmd:: lsp-gen-interval [level-1 | level-2] (1-120)
+
+.. index:: no lsp-gen-interval
+.. clicmd:: no lsp-gen-interval
+
+.. index:: no lsp-gen-interval [level-1 | level-2]
+.. clicmd:: no lsp-gen-interval [level-1 | level-2]
+
+   Set minimum interval in seconds between regenerating same LSP,
+   globally, for an area (level-1) or a domain (level-2).
+
+.. index:: lsp-refresh-interval [level-1 | level-2] (1-65235)
+.. clicmd:: lsp-refresh-interval [level-1 | level-2] (1-65235)
+
+.. index:: no lsp-refresh-interval [level-1 | level-2]
+.. clicmd:: no lsp-refresh-interval [level-1 | level-2]
+
+   Set LSP refresh interval in seconds, globally, for an area (level-1) or a
+   domain (level-2).
+
+.. index:: max-lsp-lifetime (360-65535)
+.. clicmd:: max-lsp-lifetime (360-65535)
+
+.. index:: max-lsp-lifetime [level-1 | level-2] (360-65535)
+.. clicmd:: max-lsp-lifetime [level-1 | level-2] (360-65535)
+
+.. index:: no max-lsp-lifetime
+.. clicmd:: no max-lsp-lifetime
+
+.. index:: no max-lsp-lifetime [level-1 | level-2]
+.. clicmd:: no max-lsp-lifetime [level-1 | level-2]
+
+   Set LSP maximum LSP lifetime in seconds, globally, for an area (level-1) or
+   a domain (level-2).
+
+.. index:: spf-interval (1-120)
+.. clicmd:: spf-interval (1-120)
+
+.. index:: spf-interval [level-1 | level-2] (1-120)
+.. clicmd:: spf-interval [level-1 | level-2] (1-120)
+
+.. index:: no spf-interval
+.. clicmd:: no spf-interval
+
+.. index:: no spf-interval [level-1 | level-2]
+.. clicmd:: no spf-interval [level-1 | level-2]
+
+   Set minimum interval between consecutive SPF calculations in seconds.
+
+.. _isis-region:
+
+ISIS region
+===========
+
+.. index:: is-type [level-1 | level-1-2 | level-2-only]
+.. clicmd:: is-type [level-1 | level-1-2 | level-2-only]
+
+.. index:: no is-type
+.. clicmd:: no is-type
+
+   Define the ISIS router behavior:
+
+   - level-1
+     Act as a station router only
+   - level-1-2
+     Act as both a station router and an area router
+   - level-2-only
+     Act as an area router only
+
+.. _isis-interface:
+
+ISIS interface
+==============
+
+.. index:: ip router isis WORD
+.. clicmd:: ip router isis WORD
+
+.. index:: no ip router isis WORD
+.. clicmd:: no ip router isis WORD
+
+.. _ip-router-isis-word:
+
+   Activate ISIS adjacency on this interface. Note that the name
+   of ISIS instance must be the same as the one used to configure the ISIS process
+   (see command :clicmd:`router isis WORD`).
+
+.. index:: isis circuit-type [level-1 | level-1-2 | level-2]
+.. clicmd:: isis circuit-type [level-1 | level-1-2 | level-2]
+
+.. index:: no isis circuit-type
+.. clicmd:: no isis circuit-type
+
+   Configure circuit type for interface:
+
+   - level-1
+     Level-1 only adjacencies are formed
+   - level-1-2
+     Level-1-2 adjacencies are formed
+   - level-2-only
+     Level-2 only adjacencies are formed
+
+.. index:: isis csnp-interval (1-600)
+.. clicmd:: isis csnp-interval (1-600)
+
+.. index:: isis csnp-interval (1-600) [level-1 | level-2]
+.. clicmd:: isis csnp-interval (1-600) [level-1 | level-2]
+
+.. index:: no isis csnp-interval
+.. clicmd:: no isis csnp-interval
+
+.. index:: no isis csnp-interval [level-1 | level-2]
+.. clicmd:: no isis csnp-interval [level-1 | level-2]
+
+   Set CSNP interval in seconds globally, for an area (level-1) or a domain
+   (level-2).
+
+.. index:: isis hello padding
+.. clicmd:: isis hello padding
+
+   Add padding to IS-IS hello packets.
+
+.. index:: isis hello-interval (1-600)
+.. clicmd:: isis hello-interval (1-600)
+
+.. index:: isis hello-interval (1-600) [level-1 | level-2]
+.. clicmd:: isis hello-interval (1-600) [level-1 | level-2]
+
+.. index:: no isis hello-interval
+.. clicmd:: no isis hello-interval
+
+.. index:: no isis hello-interval [level-1 | level-2]
+.. clicmd:: no isis hello-interval [level-1 | level-2]
+
+   Set Hello interval in seconds globally, for an area (level-1) or a domain
+   (level-2).
+
+.. index:: isis hello-multiplier (2-100)
+.. clicmd:: isis hello-multiplier (2-100)
+
+.. index:: isis hello-multiplier (2-100) [level-1 | level-2]
+.. clicmd:: isis hello-multiplier (2-100) [level-1 | level-2]
+
+.. index:: no isis hello-multiplier
+.. clicmd:: no isis hello-multiplier
+
+.. index:: no isis hello-multiplier [level-1 | level-2]
+.. clicmd:: no isis hello-multiplier [level-1 | level-2]
+
+   Set multiplier for Hello holding time globally, for an area (level-1) or a
+   domain (level-2).
+
+.. index:: isis metric [(0-255) | (0-16777215)]
+.. clicmd:: isis metric [(0-255) | (0-16777215)]
+
+.. index:: isis metric [(0-255) | (0-16777215)] [level-1 | level-2]
+.. clicmd:: isis metric [(0-255) | (0-16777215)] [level-1 | level-2]
+
+.. index:: no isis metric
+.. clicmd:: no isis metric
+
+.. index:: no isis metric [level-1 | level-2]
+.. clicmd:: no isis metric [level-1 | level-2]
+
+   Set default metric value globally, for an area (level-1) or a domain
+   (level-2).  Max value depend if metric support narrow or wide value (see
+   command :clicmd:`metric-style [narrow | transition | wide]`).
+
+.. index:: isis network point-to-point
+.. clicmd:: isis network point-to-point
+
+.. index:: no isis network point-to-point
+.. clicmd:: no isis network point-to-point
+
+   Set network type to 'Point-to-Point' (broadcast by default).
+
+.. index:: isis passive
+.. clicmd:: isis passive
+
+.. index:: no isis passive
+.. clicmd:: no isis passive
+
+   Configure the passive mode for this interface.
+
+.. index:: isis password [clear | md5] <password>
+.. clicmd:: isis password [clear | md5] <password>
+
+.. index:: no isis password
+.. clicmd:: no isis password
+
+   Configure the authentication password (clear or encoded text) for the
+   interface.
+
+.. index:: isis priority (0-127)
+.. clicmd:: isis priority (0-127)
+
+.. index:: isis priority (0-127) [level-1 | level-2]
+.. clicmd:: isis priority (0-127) [level-1 | level-2]
+
+.. index:: no isis priority
+.. clicmd:: no isis priority
+
+.. index:: no isis priority [level-1 | level-2]
+.. clicmd:: no isis priority [level-1 | level-2]
+
+   Set priority for Designated Router election, globally, for the area
+   (level-1) or the domain (level-2).
+
+.. index:: isis psnp-interval (1-120)
+.. clicmd:: isis psnp-interval (1-120)
+
+.. index:: isis psnp-interval (1-120) [level-1 | level-2]
+.. clicmd:: isis psnp-interval (1-120) [level-1 | level-2]
+
+.. index:: no isis psnp-interval
+.. clicmd:: no isis psnp-interval
+
+.. index:: no isis psnp-interval [level-1 | level-2]
+.. clicmd:: no isis psnp-interval [level-1 | level-2]
+
+   Set PSNP interval in seconds globally, for an area (level-1) or a domain
+   (level-2).
+
+.. index:: isis three-way-handshake
+.. clicmd:: isis three-way-handshake
+
+.. index:: no isis three-way-handshake
+.. clicmd:: no isis three-way-handshake
+
+   Enable or disable :rfc:`5303` Three-Way Handshake for P2P adjacencies.
+   Three-Way Handshake is enabled by default.
+
+.. _showing-isis-information:
+
+Showing ISIS information
+========================
+
+.. index:: show isis summary
+.. clicmd:: show isis summary
+
+   Show summary information about ISIS.
+
+.. index:: show isis hostname
+.. clicmd:: show isis hostname
+
+   Show information about ISIS node.
+
+.. index:: show isis interface
+.. clicmd:: show isis interface
+
+.. index:: show isis interface detail
+.. clicmd:: show isis interface detail
+
+.. index:: show isis interface <interface name>
+.. clicmd:: show isis interface <interface name>
+
+   Show state and configuration of ISIS specified interface, or all interfaces
+   if no interface is given with or without details.
+
+.. index:: show isis neighbor
+.. clicmd:: show isis neighbor
+
+.. index:: show isis neighbor <System Id>
+.. clicmd:: show isis neighbor <System Id>
+
+.. index:: show isis neighbor detail
+.. clicmd:: show isis neighbor detail
+
+   Show state and information of ISIS specified neighbor, or all neighbors if
+   no system id is given with or without details.
+
+.. index:: show isis database
+.. clicmd:: show isis database
+
+.. index:: show isis database [detail]
+.. clicmd:: show isis database [detail]
+
+.. index:: show isis database <LSP id> [detail]
+.. clicmd:: show isis database <LSP id> [detail]
+
+.. index:: show isis database detail <LSP id>
+.. clicmd:: show isis database detail <LSP id>
+
+   Show the ISIS database globally, for a specific LSP id without or with
+   details.
+
+.. index:: show isis topology
+.. clicmd:: show isis topology
+
+.. index:: show isis topology [level-1|level-2]
+.. clicmd:: show isis topology [level-1|level-2]
+
+   Show topology IS-IS paths to Intermediate Systems, globally, in area
+   (level-1) or domain (level-2).
+
+.. index:: show ip route isis
+.. clicmd:: show ip route isis
+
+   Show the ISIS routing table, as determined by the most recent SPF
+   calculation.
+
+.. _isis-traffic-engineering:
+
+Traffic Engineering
+===================
+
+.. index:: mpls-te on
+.. clicmd:: mpls-te on
+
+.. index:: no mpls-te
+.. clicmd:: no mpls-te
+
+   Enable Traffic Engineering LSP flooding.
+
+.. index:: mpls-te router-address <A.B.C.D>
+.. clicmd:: mpls-te router-address <A.B.C.D>
+
+.. index:: no mpls-te router-address
+.. clicmd:: no mpls-te router-address
+
+   Configure stable IP address for MPLS-TE.
+
+.. index:: show isis mpls-te interface
+.. clicmd:: show isis mpls-te interface
+
+.. index:: show isis mpls-te interface INTERFACE
+.. clicmd:: show isis mpls-te interface INTERFACE
+
+   Show MPLS Traffic Engineering parameters for all or specified interface.
+
+.. index:: show isis mpls-te router
+.. clicmd:: show isis mpls-te router
+
+   Show Traffic Engineering router parameters.
+
+.. seealso::
+
+   :ref:`ospf-traffic-engineering`
+
+.. _debugging-isis:
+
+Debugging ISIS
+==============
+
+.. index:: debug isis adj-packets
+.. clicmd:: debug isis adj-packets
+
+.. index:: no debug isis adj-packets
+.. clicmd:: no debug isis adj-packets
+
+   IS-IS Adjacency related packets.
+
+.. index:: debug isis checksum-errors
+.. clicmd:: debug isis checksum-errors
+
+.. index:: no debug isis checksum-errors
+.. clicmd:: no debug isis checksum-errors
+
+   IS-IS LSP checksum errors.
+
+.. index:: debug isis events
+.. clicmd:: debug isis events
+
+.. index:: no debug isis events
+.. clicmd:: no debug isis events
+
+   IS-IS Events.
+
+.. index:: debug isis local-updates
+.. clicmd:: debug isis local-updates
+
+.. index:: no debug isis local-updates
+.. clicmd:: no debug isis local-updates
+
+   IS-IS local update packets.
+
+.. index:: debug isis packet-dump
+.. clicmd:: debug isis packet-dump
+
+.. index:: no debug isis packet-dump
+.. clicmd:: no debug isis packet-dump
+
+   IS-IS packet dump.
+
+.. index:: debug isis protocol-errors
+.. clicmd:: debug isis protocol-errors
+
+.. index:: no debug isis protocol-errors
+.. clicmd:: no debug isis protocol-errors
+
+   IS-IS LSP protocol errors.
+
+.. index:: debug isis route-events
+.. clicmd:: debug isis route-events
+
+.. index:: no debug isis route-events
+.. clicmd:: no debug isis route-events
+
+   IS-IS Route related events.
+
+.. index:: debug isis snp-packets
+.. clicmd:: debug isis snp-packets
+
+.. index:: no debug isis snp-packets
+.. clicmd:: no debug isis snp-packets
+
+   IS-IS CSNP/PSNP packets.
+
+.. index:: debug isis spf-events
+.. clicmd:: debug isis spf-events
+
+.. index:: debug isis spf-statistics
+.. clicmd:: debug isis spf-statistics
+
+.. index:: debug isis spf-triggers
+.. clicmd:: debug isis spf-triggers
+
+.. index:: no debug isis spf-events
+.. clicmd:: no debug isis spf-events
+
+.. index:: no debug isis spf-statistics
+.. clicmd:: no debug isis spf-statistics
+
+.. index:: no debug isis spf-triggers
+.. clicmd:: no debug isis spf-triggers
+
+   IS-IS Shortest Path First Events, Timing and Statistic Data and triggering
+   events.
+
+.. index:: debug isis update-packets
+.. clicmd:: debug isis update-packets
+
+.. index:: no debug isis update-packets
+.. clicmd:: no debug isis update-packets
+
+   Update related packets.
+
+.. index:: show debugging isis
+.. clicmd:: show debugging isis
+
+   Print which ISIS debug level is activate.
+
+ISIS Configuration Examples
+===========================
+
+A simple example, with MD5 authentication enabled:::
+
+   !
+   interface eth0
+    ip router isis FOO
+    isis network point-to-point
+    isis circuit-type level-2-only
+   !
+   router isis FOO
+   net 47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00
+    metric-style wide
+    is-type level-2-only
+
+
+A Traffic Engineering configuration, with Inter-ASv2 support.
+
+First, the 'zebra.conf' part:::
+
+   hostname HOSTNAME
+   password PASSWORD
+   log file /var/log/zebra.log
+   !
+   interface eth0
+    ip address 10.2.2.2/24
+    link-params
+     max-bw 1.25e+07
+     max-rsv-bw 1.25e+06
+     unrsv-bw 0 1.25e+06
+     unrsv-bw 1 1.25e+06
+     unrsv-bw 2 1.25e+06
+     unrsv-bw 3 1.25e+06
+     unrsv-bw 4 1.25e+06
+     unrsv-bw 5 1.25e+06
+     unrsv-bw 6 1.25e+06
+     unrsv-bw 7 1.25e+06
+     admin-grp 0xab
+   !
+   interface eth1
+    ip address 10.1.1.1/24
+    link-params
+     enable
+     metric 100
+     max-bw 1.25e+07
+     max-rsv-bw 1.25e+06
+     unrsv-bw 0 1.25e+06
+     unrsv-bw 1 1.25e+06
+     unrsv-bw 2 1.25e+06
+     unrsv-bw 3 1.25e+06
+     unrsv-bw 4 1.25e+06
+     unrsv-bw 5 1.25e+06
+     unrsv-bw 6 1.25e+06
+     unrsv-bw 7 1.25e+06
+     neighbor 10.1.1.2 as 65000
+
+
+Then the 'isisd.conf' itself:::
+
+   hostname HOSTNAME
+   password PASSWORD
+   log file /var/log/isisd.log
+   !
+   !
+   interface eth0
+    ip router isis FOO
+   !
+   interface eth1
+    ip router isis FOO
+   !
+   !
+   router isis FOO
+    isis net 47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00
+     mpls-te on
+     mpls-te router-address 10.1.1.1
+   !
+   line vty
diff --git a/doc/user/kernel.rst b/doc/user/kernel.rst
new file mode 100644 (file)
index 0000000..8c65901
--- /dev/null
@@ -0,0 +1,42 @@
+.. _kernel-interface:
+
+****************
+Kernel Interface
+****************
+
+There are several different methods for reading kernel routing table
+information, updating kernel routing tables, and for looking up interfaces.
+
+- ioctl
+     This method is a very traditional way for reading or writing kernel
+     information. `ioctl` can be used for looking up interfaces and for
+     modifying interface addresses, flags, mtu settings and other types of
+     information. Also, `ioctl` can insert and delete kernel routing table
+     entries. It will soon be available on almost any platform which zebra
+     supports, but it is a little bit ugly thus far, so if a better method is
+     supported by the kernel, zebra will use that.
+
+- sysctl
+     This is a program that can lookup kernel information using MIB (Management
+     Information Base) syntax. Normally, it only provides a way of getting
+     information from the kernel. So one would usually want to change kernel
+     information using another method such as `ioctl`.
+
+- proc filesystem
+     This is a special filesystem mount that provides an easy way of getting
+     kernel information.
+
+- routing socket / netlink
+     On recent Linux kernels (2.0.x and 2.2.x), there is a kernel/user
+     communication support called `netlink`. It makes asynchronous communication
+     between kernel and FRR possible, similar to a routing socket on BSD systems.
+
+     Before you use this feature, be sure to select (in kernel configuration) the
+     kernel/netlink support option 'Kernel/User network link driver' and 'Routing
+     messages'.
+
+     Today, the :file:`/dev/route` special device file is obsolete.  Netlink
+     communication is done by reading/writing over netlink socket.
+
+     After the kernel configuration, please reconfigure and rebuild FRR.  You can
+     use netlink as a dynamic routing update channel between FRR and the kernel.
diff --git a/doc/user/nhrpd.rst b/doc/user/nhrpd.rst
new file mode 100644 (file)
index 0000000..28e78f6
--- /dev/null
@@ -0,0 +1,136 @@
+.. _nhrp:
+
+****
+NHRP
+****
+
+*nhrpd* is an implementation of the :abbr:NHRP `(Next Hop Routing Protocol)`.
+NHRP is described in :rfc`2332`.
+
+NHRP is used to improve the efficiency of routing computer network traffic over
+:abbr:`NBMA (Non-Broadcast, Multiple Access)` networks. NHRP provides an
+ARP-like solution that allows a system to dynamically learn the NBMA address of
+the other systems that are part of that network, allowing these systems to
+directly communicate without requiring traffic to use an intermediate hop.
+
+Cisco Dynamic Multipoint VPN (DMVPN) is based on NHRP, and |PACKAGE_NAME| nhrpd
+implements this scenario.
+
+.. _routing-design:
+
+Routing Design
+==============
+
+nhrpd never handles routing of prefixes itself. You need to run some
+real routing protocol (e.g. BGP) to advertise routes over the tunnels.
+What nhrpd does it establishes 'shortcut routes' that optimizes the
+routing protocol to avoid going through extra nodes in NBMA GRE mesh.
+
+nhrpd does route NHRP domain addresses individually using per-host prefixes.
+This is similar to Cisco FlexVPN; but in contrast to opennhrp which uses
+a generic subnet route.
+
+To create NBMA GRE tunnel you might use the following (Linux terminal
+commands):::
+
+   ip tunnel add gre1 mode gre key 42 ttl 64
+   ip addr add 10.255.255.2/32 dev gre1
+   ip link set gre1 up
+
+
+Note that the IP-address is assigned as host prefix to gre1. nhrpd will
+automatically create additional host routes pointing to gre1 when
+a connection with these hosts is established.
+
+The gre1 subnet prefix should be announced by routing protocol from the
+hub nodes (e.g. BGP 'network' announce). This allows the routing protocol
+to decide which is the closest hub and determine the relay hub on prefix
+basis when direct tunnel is not established.
+
+nhrpd will redistribute directly connected neighbors to zebra. Within
+hub nodes, these routes should be internally redistributed using some
+routing protocol (e.g. iBGP) to allow hubs to be able to relay all traffic.
+
+This can be achieved in hubs with the following bgp configuration (network
+command defines the GRE subnet):::
+
+  router bgp 65555
+   address-family ipv4 unicast
+     network 172.16.0.0/16
+     redistribute nhrp
+   exit-address-family
+
+
+.. _configuring-nhrp:
+
+Configuring NHRP
+================
+
+FIXME
+
+.. _hub-functionality:
+
+Hub Functionality
+=================
+
+In addition to routing nhrp redistributed host prefixes, the hub nodes
+are also responsible to send NHRP Traffic Indication messages that
+trigger creation of the shortcut tunnels.
+
+nhrpd sends Traffic Indication messages based on network traffic captured
+using NFLOG. Typically you want to send Traffic Indications for network
+traffic that is routed from gre1 back to gre1 in rate limited manner.
+This can be achieved with the following iptables rule.
+
+::
+
+  iptables -A FORWARD -i gre1 -o gre1 \\
+       -m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 \\
+       --hashlimit-mode srcip,dstip --hashlimit-srcmask 24 --hashlimit-dstmask 24 \\
+       --hashlimit-name loglimit-0 -j NFLOG --nflog-group 1 --nflog-range 128
+
+
+You can fine tune the src/dstmask according to the prefix lengths you
+announce internal, add additional IP range matches, or rate limitation
+if needed. However, the above should be good in most cases.
+
+This kernel NFLOG target's nflog-group is configured in global nhrp config
+with:::
+
+  nhrp nflog-group 1
+
+To start sending these traffic notices out from hubs, use the nhrp
+per-interface directive:::
+
+  interface gre1
+   ip nhrp redirect
+
+.. _integration-with-ike:
+
+Integration with IKE
+====================
+
+nhrpd needs tight integration with IKE daemon for various reasons.
+Currently only strongSwan is supported as IKE daemon.
+
+nhrpd connects to strongSwan using VICI protocol based on UNIX socket
+(hardcoded now as /var/run/charon.vici).
+
+strongSwan currently needs few patches applied. Please check out the
+`http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras-release,release <http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras-release,release>`_
+and
+`http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras,working tree <http://git.alpinelinux.org/cgit/user/tteras/strongswan/log/?h=tteras,working tree>`_
+git repositories for the patches.
+
+.. _nhrp-events:
+
+NHRP Events
+===========
+
+FIXME
+
+Configuration Example
+=====================
+
+FIXME
+
diff --git a/doc/user/ospf6d.rst b/doc/user/ospf6d.rst
new file mode 100644 (file)
index 0000000..b0823f2
--- /dev/null
@@ -0,0 +1,199 @@
+.. _ospfv3:
+
+******
+OSPFv3
+******
+
+*ospf6d* is a daemon support OSPF version 3 for IPv6 network. OSPF for IPv6 is
+described in :rfc:`2740`.
+
+.. _ospf6-router:
+
+OSPF6 router
+============
+
+.. index:: router ospf6
+.. clicmd:: router ospf6
+
+.. index:: router-id A.B.C.D
+.. clicmd:: router-id A.B.C.D
+
+   Set router's Router-ID.
+
+.. index:: interface IFNAME area AREA
+.. clicmd:: interface IFNAME area AREA
+
+   Bind interface to specified area, and start sending OSPF packets. `area` can
+   be specified as 0.
+
+.. index:: timers throttle spf DELAY INITIAL-HOLDTIME MAX-HOLDTIME
+.. clicmd:: timers throttle spf DELAY INITIAL-HOLDTIME MAX-HOLDTIME
+
+.. index:: no timers throttle spf
+.. clicmd:: no timers throttle spf
+
+   This command sets the initial `delay`, the `initial-holdtime`
+   and the `maximum-holdtime` between when SPF is calculated and the
+   event which triggered the calculation. The times are specified in
+   milliseconds and must be in the range of 0 to 600000 milliseconds.
+
+   The `delay` specifies the minimum amount of time to delay SPF
+   calculation (hence it affects how long SPF calculation is delayed after
+   an event which occurs outside of the holdtime of any previous SPF
+   calculation, and also serves as a minimum holdtime).
+
+   Consecutive SPF calculations will always be seperated by at least
+   'hold-time' milliseconds. The hold-time is adaptive and initially is
+   set to the `initial-holdtime` configured with the above command.
+   Events which occur within the holdtime of the previous SPF calculation
+   will cause the holdtime to be increased by `initial-holdtime`, bounded
+   by the `maximum-holdtime` configured with this command. If the adaptive
+   hold-time elapses without any SPF-triggering event occuring then
+   the current holdtime is reset to the `initial-holdtime`.::
+
+      router ospf6
+       timers throttle spf 200 400 10000
+
+
+   In this example, the `delay` is set to 200ms, the initial holdtime is set
+   to 400ms and the `maximum holdtime` to 10s. Hence there will always be at
+   least 200ms between an event which requires SPF calculation and the actual
+   SPF calculation. Further consecutive SPF calculations will always be
+   seperated by between 400ms to 10s, the hold-time increasing by 400ms each
+   time an SPF-triggering event occurs within the hold-time of the previous
+   SPF calculation.
+
+.. index:: auto-cost reference-bandwidth COST
+.. clicmd:: auto-cost reference-bandwidth COST
+
+.. index:: no auto-cost reference-bandwidth
+.. clicmd:: no auto-cost reference-bandwidth
+
+   This 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.
+
+.. _ospf6-area:
+
+OSPF6 area
+==========
+
+Area support for OSPFv3 is not yet implemented.
+
+.. _ospf6-interface:
+
+OSPF6 interface
+===============
+
+.. index:: ipv6 ospf6 cost COST
+.. clicmd:: ipv6 ospf6 cost COST
+
+   Sets interface's output cost. Default value depends on the interface
+   bandwidth and on the auto-cost reference bandwidth.
+
+.. index:: ipv6 ospf6 hello-interval HELLOINTERVAL
+.. clicmd:: ipv6 ospf6 hello-interval HELLOINTERVAL
+
+   Sets interface's Hello Interval. Default 40
+
+.. index:: ipv6 ospf6 dead-interval DEADINTERVAL
+.. clicmd:: ipv6 ospf6 dead-interval DEADINTERVAL
+
+   Sets interface's Router Dead Interval. Default value is 40.
+
+.. index:: ipv6 ospf6 retransmit-interval RETRANSMITINTERVAL
+.. clicmd:: ipv6 ospf6 retransmit-interval RETRANSMITINTERVAL
+
+   Sets interface's Rxmt Interval. Default value is 5.
+
+.. index:: ipv6 ospf6 priority PRIORITY
+.. clicmd:: ipv6 ospf6 priority PRIORITY
+
+   Sets interface's Router Priority. Default value is 1.
+
+.. index:: ipv6 ospf6 transmit-delay TRANSMITDELAY
+.. clicmd:: ipv6 ospf6 transmit-delay TRANSMITDELAY
+
+   Sets interface's Inf-Trans-Delay. Default value is 1.
+
+.. index:: ipv6 ospf6 network (broadcast|point-to-point)
+.. clicmd:: ipv6 ospf6 network (broadcast|point-to-point)
+
+   Set explicitly network type for specifed interface.
+
+.. _redistribute-routes-to-ospf6:
+
+Redistribute routes to OSPF6
+============================
+
+.. index:: redistribute static
+.. clicmd:: redistribute static
+
+.. index:: redistribute connected
+.. clicmd:: redistribute connected
+
+.. index:: redistribute ripng
+.. clicmd:: redistribute ripng
+
+
+.. _showing-ospf6-information:
+
+Showing OSPF6 information
+=========================
+
+.. index:: show ipv6 ospf6 [INSTANCE_ID]
+.. clicmd:: show ipv6 ospf6 [INSTANCE_ID]
+
+   INSTANCE_ID is an optional OSPF instance ID. To see router ID and OSPF
+   instance ID, simply type "show ipv6 ospf6 <cr>".
+
+.. index:: show ipv6 ospf6 database
+.. clicmd:: show ipv6 ospf6 database
+
+   This command shows LSA database summary. You can specify the type of LSA.
+
+.. index:: show ipv6 ospf6 interface
+.. clicmd:: show ipv6 ospf6 interface
+
+   To see OSPF interface configuration like costs.
+
+.. index:: show ipv6 ospf6 neighbor
+.. clicmd:: show ipv6 ospf6 neighbor
+
+   Shows state and chosen (Backup) DR of neighbor.
+
+.. index:: show ipv6 ospf6 request-list A.B.C.D
+.. clicmd:: show ipv6 ospf6 request-list A.B.C.D
+
+   Shows requestlist of neighbor.
+
+.. index:: show ipv6 route ospf6
+.. clicmd:: show ipv6 route ospf6
+
+   This command shows internal routing table.
+
+.. index:: show ipv6 ospf6 zebra
+.. clicmd:: show ipv6 ospf6 zebra
+
+   Shows state about what is being redistributed between zebra and OSPF6
+
+OSPF6 Configuration Examples
+============================
+
+Example of ospf6d configured on one interface and area:
+
+::
+
+   interface eth0
+    ipv6 ospf6 instance-id 0
+   !
+   router ospf6
+    router-id 212.17.55.53
+    area 0.0.0.0 range 2001:770:105:2::/64
+    interface eth0 area 0.0.0.0
+   !
diff --git a/doc/user/ospf_fundamentals.rst b/doc/user/ospf_fundamentals.rst
new file mode 100644 (file)
index 0000000..5a4f709
--- /dev/null
@@ -0,0 +1,546 @@
+.. _ospf-fundamentals:
+
+OSPF Fundamentals
+=================
+
+.. index:: Link-state routing protocol
+.. index:: Distance-vector routing protocol
+
+:abbr:`OSPF` is, mostly, a link-state routing protocol. In contrast to
+:term:`distance-vector` protocols, such as :abbr:`RIP` or :abbr:`BGP`, where
+routers describe available `paths` (i.e. routes) to each other, in
+:term:`link-state` protocols routers instead describe the state of their links
+to their immediate neighbouring routers.
+
+.. index:: Link State Announcement
+.. index:: Link State Advertisement
+.. index:: LSA flooding
+.. index:: Link State Database
+
+Each router describes their link-state information in a message known as an
+:abbr:`LSA (Link State Advertisement)`, which is then propogated through to all
+other routers in a link-state routing domain, by a process called `flooding`.
+Each router thus builds up an :abbr:`LSDB (Link State Database)` of all the
+link-state messages. From this collection of LSAs in the LSDB, each router can
+then calculate the shortest path to any other router, based on some common
+metric, by using an algorithm such as
+`Edgar Djikstra's <http://www.cs.utexas.edu/users/EWD/>`_
+:abbr:`SPF (Shortest Path First)` algorithm.
+
+.. index:: Link-state routing protocol advantages
+
+By describing connectivity of a network in this way, in terms of
+routers and links rather than in terms of the paths through a network,
+a link-state protocol can use less bandwidth and converge more quickly
+than other protocols. A link-state protocol need distribute only one
+link-state message throughout the link-state domain when a link on any
+single given router changes state, in order for all routers to
+reconverge on the best paths through the network. In contrast, distance
+vector protocols can require a progression of different path update
+messages from a series of different routers in order to converge.
+
+.. index:: Link-state routing protocol disadvantages
+
+The disadvantage to a link-state protocol is that the process of
+computing the best paths can be relatively intensive when compared to
+distance-vector protocols, in which near to no computation need be done
+other than (potentially) select between multiple routes. This overhead
+is mostly negligible for modern embedded CPUs, even for networks with
+thousands of nodes. The primary scaling overhead lies more in coping
+with the ever greater frequency of LSA updates as the size of a
+link-state area increases, in managing the :abbr:`LSDB` and required
+flooding.
+
+This section aims to give a distilled, but accurate, description of the
+more important workings of :abbr:`OSPF` which an administrator may need
+to know to be able best configure and trouble-shoot :abbr:`OSPF`.
+
+OSPF Mechanisms
+---------------
+
+:abbr:`OSPF` defines a range of mechanisms, concerned with detecting,
+describing and propogating state through a network. These mechanisms
+will nearly all be covered in greater detail further on. They may be
+broadly classed as:
+
+
+.. index:: OSPF Hello Protocol
+
+The Hello Protocol
+^^^^^^^^^^^^^^^^^^
+
+The OSPF Hello protocol allows OSPF to quickly detect changes in two-way
+reachability between routers on a link. OSPF can additionally avail of other
+sources of reachability information, such as link-state information provided by
+hardware, or through dedicated reachability protocols such as
+:abbr:`BFD (Bidirectional Forwarding Detection)`.
+
+OSPF also uses the Hello protocol to propagate certain state between routers
+sharing a link, for example:
+
+- Hello protocol configured state, such as the dead-interval.
+- Router priority, for DR/BDR election.
+- DR/BDR election results.
+- Any optional capabilities supported by each router.
+
+The Hello protocol is comparatively trivial and will not be explored in greater
+detail than here.
+
+.. index:: OSPF LSA overview
+.. _ospf-lsas:
+
+LSAs
+^^^^
+
+At the heart of :abbr:`OSPF` are :abbr:`LSA (Link State Advertisement)`
+messages. Despite the name, some :abbr:`LSA` s do not, strictly speaking,
+describe link-state information. Common :abbr:`LSA` s describe information
+such as:
+
+- Routers, in terms of their links.
+- Networks, in terms of attached routers.
+- Routes, external to a link-state domain:
+
+  External Routes
+     Routes entirely external to :abbr:`OSPF`. Routers originating such
+     routes are known as :abbr:`ASBR (Autonomous-System Border Router)`
+     routers.
+
+  Summary Routes
+     Routes which summarise routing information relating to OSPF areas
+     external to the OSPF link-state area at hand, originated by
+     :abbr:`ABR (Area Boundary Router)` routers.
+
+.. _ospf-lsa-flooding:
+
+LSA Flooding
+""""""""""""
+
+OSPF defines several related mechanisms, used to manage synchronisation of
+:abbr:`LSDB` s between neighbours as neighbours form adjacencies and the
+propogation, or `flooding` of new or updated :abbr:`LSA` s.
+
+.. index:: OSPF Areas overview
+
+.. _ospf-areas:
+
+Areas
+^^^^^
+
+OSPF provides for the protocol to be broken up into multiple smaller and
+independent link-state areas. Each area must be connected to a common backbone
+area by an :abbr:`ABR (Area Boundary Router)`. These :abbr:`ABR` routers are
+responsible for summarising the link-state routing information of an area into
+`Summary LSAs`, possibly in a condensed (i.e. aggregated) form, and then
+originating these summaries into all other areas the :abbr:`ABR` is connected
+to.
+
+Note that only summaries and external routes are passed between areas.  As
+these describe *paths*, rather than any router link-states, routing between
+areas hence is by :term:`distance-vector`, **not** link-state.
+
+OSPF LSAs
+---------
+
+The core objects in OSPF are :abbr:`LSA` s. Everything else in OSPF revolves
+around detecting what to describe in LSAs, when to update them, how to flood
+them throughout a network and how to calculate routes from them.
+
+There are a variety of different :abbr:`LSA` s, for purposes such as describing
+actual link-state information, describing paths (i.e.  routes), describing
+bandwidth usage of links for :abbr:`TE (Traffic Engineering)` purposes, and
+even arbitrary data by way of *Opaque* :abbr:`LSA` s.
+
+LSA Header
+^^^^^^^^^^
+
+All LSAs share a common header with the following information:
+
+- Type
+
+  Different types of :abbr:`LSA` s describe different things in
+  :abbr:`OSPF`. Types include:
+
+  - Router LSA
+  - Network LSA
+  - Network Summary LSA
+  - Router Summary LSA
+  - AS-External LSA
+
+  The specifics of the different types of LSA are examined below.
+
+- Advertising Router
+
+  The Router ID of the router originating the LSA.
+
+.. seealso::
+
+   :clicmd:`ospf router-id A.B.C.D`.
+
+- LSA ID
+
+  The ID of the LSA, which is typically derived in some way from the
+  information the LSA describes, e.g. a Router LSA uses the Router ID as
+  the LSA ID, a Network LSA will have the IP address of the :abbr:`DR`
+  as its LSA ID.
+
+  The combination of the Type, ID and Advertising Router ID must uniquely
+  identify the :abbr:`LSA`. There can however be multiple instances of
+  an LSA with the same Type, LSA ID and Advertising Router ID, see
+  :ref:`sequence number <ospf-lsa-sequence-number>`.
+
+- Age
+
+  A number to allow stale :abbr:`LSA` s to, eventually, be purged by routers
+  from their :abbr:`LSDB` s.
+
+  The value nominally is one of seconds. An age of 3600, i.e. 1 hour, is
+  called the `MaxAge`. MaxAge LSAs are ignored in routing
+  calculations. LSAs must be periodically refreshed by their Advertising
+  Router before reaching MaxAge if they are to remain valid.
+
+  Routers may deliberately flood LSAs with the age artificially set to
+  3600 to indicate an LSA is no longer valid. This is called
+  `flushing` of an LSA.
+
+  It is not abnormal to see stale LSAs in the LSDB, this can occur where
+  a router has shutdown without flushing its LSA(s), e.g. where it has
+  become disconnected from the network. Such LSAs do little harm.
+
+.. _ospf-lsa-sequence-number:
+
+- Sequence Number
+
+  A number used to distinguish newer instances of an LSA from older instances.
+
+Link-State LSAs
+^^^^^^^^^^^^^^^
+
+Of all the various kinds of :abbr:`LSA` s, just two types comprise the
+actual link-state part of :abbr:`OSPF`, Router :abbr:`LSA` s and
+Network :abbr:`LSA` s. These LSA types are absolutely core to the
+protocol.
+
+Instances of these LSAs are specific to the link-state area in which
+they are originated. Routes calculated from these two LSA types are
+called `intra-area routes`.
+
+- Router LSA
+
+  Each OSPF Router must originate a router :abbr:`LSA` to describe
+  itself. In it, the router lists each of its :abbr:`OSPF` enabled
+  interfaces, for the given link-state area, in terms of:
+
+  Cost
+     The output cost of that interface, scaled inversely to some commonly known
+     reference value, :clicmd:`auto-cost reference-bandwidth (1-4294967`.
+
+  Link Type
+     Transit Network
+
+     A link to a multi-access network, on which the router has at least one
+     Full adjacency with another router.
+
+  :abbr:`PtP (Point-to-Point)`
+     A link to a single remote router, with a Full adjacency. No
+     :abbr:`DR (Designated Router)` is elected on such links; no network
+     LSA is originated for such a link.
+
+     Stub
+        A link with no adjacent neighbours, or a host route.
+
+  - Link ID and Data
+
+    These values depend on the Link Type:
+
+    +----------------+-----------------------------------+------------------------------------------+
+    | Link Type      | Link ID                           | Link Data                                |
+    +================+===================================+==========================================+
+    | Transit        | Link IP address of the :abbr:`DR` | Interface IP address                     |
+    +----------------+-----------------------------------+------------------------------------------+
+    | Point-to-Point | Router ID of the remote router    | Local interface IP address, or the       |
+    |                |                                   | :abbr:`ifindex (MIB-II interface index)` |
+    |                |                                   | for unnumbered links                     |
+    +----------------+-----------------------------------+------------------------------------------+
+    | Stub           | IP address                        | Subnet Mask                              |
+    +----------------+-----------------------------------+------------------------------------------+
+
+    Links on a router may be listed multiple times in the Router LSA, e.g.  a
+    :abbr:`PtP` interface on which OSPF is enabled must *always* be described
+    by a Stub link in the Router :abbr:`LSA`, in addition to being listed as
+    PtP link in the Router :abbr:`LSA` if the adjacency with the remote router
+    is Full.
+
+    Stub links may also be used as a way to describe links on which OSPF is
+    *not* spoken, known as `passive interfaces`, see
+    :clicmd:`passive-interface INTERFACE`.
+
+- Network LSA
+
+  On multi-access links (e.g. ethernets, certain kinds of ATM and X.25
+  configurations), routers elect a :abbr:`DR`. The :abbr:`DR` is
+  responsible for originating a Network :abbr:`LSA`, which helps reduce
+  the information needed to describe multi-access networks with multiple
+  routers attached. The :abbr:`DR` also acts as a hub for the flooding of
+  :abbr:`LSA` s on that link, thus reducing flooding overheads.
+
+  The contents of the Network LSA describes the:
+
+  - Subnet Mask
+
+    As the :abbr:`LSA` ID of a Network LSA must be the IP address of the
+    :abbr:`DR`, the Subnet Mask together with the :abbr:`LSA` ID gives
+    you the network address.
+
+  - Attached Routers
+
+    Each router fully-adjacent with the :abbr:`DR` is listed in the LSA,
+    by their Router-ID. This allows the corresponding Router :abbr:`LSA` s to be
+    easily retrieved from the :abbr:`LSDB`.
+
+Summary of Link State LSAs:
+
++-------------+----------------------------+--------------------------------------------+
+| LSA Type    | LSA ID                     | LSA Data Describes                         |
++=============+============================+============================================+
+| Router LSA  | Router ID                  | The :abbr:`OSPF` enabled links of the      |
+|             |                            | router, within a specific link-state area. |
++-------------+----------------------------+--------------------------------------------+
+| Network LSA | The IP address of the      | The subet mask of the network and the      |
+|             | :abbr:`DR` for the network | Router IDs of all routers on the network   |
++-------------+----------------------------+--------------------------------------------+
+
+With an LSDB composed of just these two types of :abbr:`LSA`, it is
+possible to construct a directed graph of the connectivity between all
+routers and networks in a given OSPF link-state area. So, not
+surprisingly, when OSPF routers build updated routing tables, the first
+stage of :abbr:`SPF` calculation concerns itself only with these two
+LSA types.
+
+.. _ospf-link-state-lsa-examples:
+
+Link-State LSA Examples
+^^^^^^^^^^^^^^^^^^^^^^^
+
+The example below shows two :abbr:`LSA` s, both originated by the same router
+(Router ID 192.168.0.49) and with the same :abbr:`LSA` ID (192.168.0.49), but
+of different LSA types.
+
+The first LSA being the router LSA describing 192.168.0.49's links: 2 links
+to multi-access networks with fully-adjacent neighbours (i.e. Transit
+links) and 1 being a Stub link (no adjacent neighbours).
+
+The second LSA being a Network LSA, for which 192.168.0.49 is the
+:abbr:`DR`, listing the Router IDs of 4 routers on that network which
+are fully adjacent with 192.168.0.49.
+
+::
+
+  # show ip ospf database router 192.168.0.49
+
+         OSPF Router with ID (192.168.0.53)
+
+                  Router Link States (Area 0.0.0.0)
+
+    LS age: 38
+    Options: 0x2  : *|-|-|-|-|-|E|*
+    LS Flags: 0x6
+    Flags: 0x2 : ASBR
+    LS Type: router-LSA
+    Link State ID: 192.168.0.49
+    Advertising Router: 192.168.0.49
+    LS Seq Number: 80000f90
+    Checksum: 0x518b
+    Length: 60
+     Number of Links: 3
+
+      Link connected to: a Transit Network
+       (Link ID) Designated Router address: 192.168.1.3
+       (Link Data) Router Interface address: 192.168.1.3
+        Number of TOS metrics: 0
+         TOS 0 Metric: 10
+
+      Link connected to: a Transit Network
+       (Link ID) Designated Router address: 192.168.0.49
+       (Link Data) Router Interface address: 192.168.0.49
+        Number of TOS metrics: 0
+         TOS 0 Metric: 10
+
+      Link connected to: Stub Network
+       (Link ID) Net: 192.168.3.190
+       (Link Data) Network Mask: 255.255.255.255
+        Number of TOS metrics: 0
+         TOS 0 Metric: 39063
+  # show ip ospf database network 192.168.0.49
+
+         OSPF Router with ID (192.168.0.53)
+
+                  Net Link States (Area 0.0.0.0)
+
+    LS age: 285
+    Options: 0x2  : *|-|-|-|-|-|E|*
+    LS Flags: 0x6
+    LS Type: network-LSA
+    Link State ID: 192.168.0.49 (address of Designated Router)
+    Advertising Router: 192.168.0.49
+    LS Seq Number: 80000074
+    Checksum: 0x0103
+    Length: 40
+    Network Mask: /29
+          Attached Router: 192.168.0.49
+          Attached Router: 192.168.0.52
+          Attached Router: 192.168.0.53
+          Attached Router: 192.168.0.54
+
+
+Note that from one LSA, you can find the other. E.g. Given the
+Network-LSA you have a list of Router IDs on that network, from which
+you can then look up, in the local :abbr:`LSDB`, the matching Router
+LSA. From that Router-LSA you may (potentially) find links to other
+Transit networks and Routers IDs which can be used to lookup the
+corresponding Router or Network LSA. And in that fashion, one can find
+all the Routers and Networks reachable from that starting :abbr:`LSA`.
+
+Given the Router LSA instead, you have the IP address of the
+:abbr:`DR` of any attached transit links. Network LSAs will have that IP
+as their LSA ID, so you can then look up that Network LSA and from that
+find all the attached routers on that link, leading potentially to more
+links and Network and Router LSAs, etc. etc.
+
+From just the above two :abbr:`LSA` s, one can already see the
+following partial topology:
+
+::
+
+  ------------------------ Network: ......
+              |            Designated Router IP: 192.168.1.3
+              |
+        IP: 192.168.1.3
+         (transit link)
+          (cost: 10)
+     Router ID: 192.168.0.49(stub)---------- IP: 192.168.3.190/32
+          (cost: 10)        (cost: 39063)
+         (transit link)
+        IP: 192.168.0.49
+              |
+              |
+  ------------------------------ Network: 192.168.0.48/29
+    |        |           |       Designated Router IP: 192.168.0.49
+    |        |           |
+    |        |     Router ID: 192.168.0.54
+    |        |
+    |   Router ID: 192.168.0.53
+    |
+  Router ID: 192.168.0.52
+
+
+Note the Router IDs, though they look like IP addresses and often are
+IP addresses, are not strictly speaking IP addresses, nor need they be
+reachable addresses (though, OSPF will calculate routes to Router IDs).
+
+External LSAs
+^^^^^^^^^^^^^
+
+External, or "Type 5", :abbr:`LSA` s describe routing information which is
+entirely external to :abbr:`OSPF`, and is "injected" into
+:abbr:`OSPF`. Such routing information may have come from another
+routing protocol, such as RIP or BGP, they may represent static routes
+or they may represent a default route.
+
+An :abbr:`OSPF` router which originates External :abbr:`LSA` s is known as an
+:abbr:`ASBR (AS Boundary Router)`. Unlike the link-state :abbr:`LSA` s, and
+most other :abbr:`LSA` s, which are flooded only within the area in
+which they originate, External :abbr:`LSA` s are flooded through-out
+the :abbr:`OSPF` network to all areas capable of carrying External
+:abbr:`LSA` s (:ref:`ospf-areas`).
+
+Routes internal to OSPF (intra-area or inter-area) are always preferred
+over external routes.
+
+The External :abbr:`LSA` describes the following:
+
+IP Network number
+   The IP Network number of the route is described by the :abbr:`LSA` ID field.
+
+IP Network Mask
+   The body of the External LSA describes the IP Network Mask of the route.
+   This, together with the :abbr:`LSA` ID, describes the prefix of the IP route
+   concerned.
+
+Metric
+   The cost of the External Route. This cost may be an OSPF cost (also known as
+   a "Type 1" metric), i.e. equivalent to the normal OSPF costs, or an
+   externally derived cost ("Type 2" metric) which is not comparable to OSPF
+   costs and always considered larger than any OSPF cost. Where there are both
+   Type 1 and 2 External routes for a route, the Type 1 is always preferred.
+
+Forwarding Address
+   The address of the router to forward packets to for the route. This may be,
+   and usually is, left as 0 to specify that the ASBR originating the External
+   :abbr:`LSA` should be used. There must be an internal OSPF route to the
+   forwarding address, for the forwarding address to be useable.
+
+Tag
+   An arbitrary 4-bytes of data, not interpreted by OSPF, which may carry
+   whatever information about the route which OSPF speakers desire.
+
+AS External LSA Example
+^^^^^^^^^^^^^^^^^^^^^^^
+
+To illustrate, below is an example of an External :abbr:`LSA` in the
+:abbr:`LSDB` of an OSPF router. It describes a route to the IP prefix of
+192.168.165.0/24, originated by the ASBR with Router-ID 192.168.0.49. The
+metric of 20 is external to OSPF. The forwarding address is 0, so the route
+should forward to the originating ASBR if selected.
+
+::
+
+  # show ip ospf database external 192.168.165.0
+    LS age: 995
+    Options: 0x2  : *|-|-|-|-|-|E|*
+    LS Flags: 0x9
+    LS Type: AS-external-LSA
+    Link State ID: 192.168.165.0 (External Network Number)
+    Advertising Router: 192.168.0.49
+    LS Seq Number: 800001d8
+    Checksum: 0xea27
+    Length: 36
+    Network Mask: /24
+          Metric Type: 2 (Larger than any link state path)
+          TOS: 0
+          Metric: 20
+          Forward Address: 0.0.0.0
+          External Route Tag: 0
+
+
+We can add this to our partial topology from above, which now looks
+like:::
+
+   --------------------- Network: ......
+            |            Designated Router IP: 192.168.1.3
+            |
+      IP: 192.168.1.3      /---- External route: 192.168.165.0/24
+       (transit link)     /                Cost: 20 (External metric)
+        (cost: 10)       /
+   Router ID: 192.168.0.49(stub)---------- IP: 192.168.3.190/32
+        (cost: 10)        (cost: 39063)
+       (transit link)
+      IP: 192.168.0.49
+            |
+            |
+   ------------------------------ Network: 192.168.0.48/29
+     |        |           |       Designated Router IP: 192.168.0.49
+     |        |           |
+     |        |     Router ID: 192.168.0.54
+     |        |
+     |   Router ID: 192.168.0.53
+     |
+   Router ID: 192.168.0.52
+
+
+Summary LSAs
+^^^^^^^^^^^^
+
+Summary LSAs are created by :abbr:`ABR` s to summarise the destinations
+available within one area to other areas. These LSAs may describe IP networks,
+potentially in aggregated form, or :abbr:`ASBR` routers.
diff --git a/doc/user/ospfd.rst b/doc/user/ospfd.rst
new file mode 100644 (file)
index 0000000..59917f5
--- /dev/null
@@ -0,0 +1,1308 @@
+.. _ospfv2:
+
+******
+OSPFv2
+******
+
+:abbr:`OSPF (Open Shortest Path First)` version 2 is a routing protocol which
+is described in :rfc:`2328`. OSPF is an :abbr:`IGP (Interior Gateway
+Protocol)`. Compared with :abbr:`RIP`, :abbr:`OSPF` can provide scalable
+network support and faster convergence times. OSPF is widely used in large
+networks such as :abbr:`ISP (Internet Service Provider)` backbone and
+enterprise networks.
+
+.. include:: ospf_fundamentals.rst
+
+.. _configuring-ospfd:
+
+Configuring ospfd
+=================
+
+There are no *ospfd* specific options. Common options can be specified
+(:ref:`common-invocation-options`) to *ospfd*.  *ospfd* needs to acquire
+interface information from *zebra* in order to function. Therefore *zebra* must
+be running before invoking *ospfd*. Also, if *zebra* is restarted then *ospfd*
+must be too.
+
+Like other daemons, *ospfd* configuration is done in :abbr:`OSPF` specific
+configuration file :file:`ospfd.conf`.
+
+.. _ospf-router:
+
+OSPF router
+===========
+
+To start OSPF process you have to specify the OSPF router. As of this
+writing, *ospfd* does not support multiple OSPF processes.
+
+.. index:: router ospf
+.. clicmd:: router ospf
+
+.. index:: no router ospf
+.. clicmd:: no router ospf
+
+   Enable or disable the OSPF process. *ospfd* does not yet
+   support multiple OSPF processes. So you can not specify an OSPF process
+   number.
+
+.. index:: ospf router-id A.B.C.D
+.. clicmd:: ospf router-id A.B.C.D
+
+.. index:: no ospf router-id
+.. clicmd:: no ospf router-id
+
+   This sets the router-ID of the OSPF process. The
+   router-ID may be an IP address of the router, but need not be - it can
+   be any arbitrary 32bit number. However it MUST be unique within the
+   entire OSPF domain to the OSPF speaker - bad things will happen if
+   multiple OSPF speakers are configured with the same router-ID! If one
+   is not specified then *ospfd* will obtain a router-ID
+   automatically from *zebra*.
+
+.. index:: ospf abr-type TYPE
+.. clicmd:: ospf abr-type TYPE
+
+.. index:: no ospf abr-type TYPE
+.. clicmd:: no ospf abr-type TYPE
+
+   `type` can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types
+   are equivalent.
+
+   The OSPF standard for ABR behaviour does not allow an ABR to consider
+   routes through non-backbone areas when its links to the backbone are
+   down, even when there are other ABRs in attached non-backbone areas
+   which still can reach the backbone - this restriction exists primarily
+   to ensure routing-loops are avoided.
+
+   With the "Cisco" or "IBM" ABR type, the default in this release of
+   FRR, this restriction is lifted, allowing an ABR to consider
+   summaries learnt from other ABRs through non-backbone areas, and hence
+   route via non-backbone areas as a last resort when, and only when,
+   backbone links are down.
+
+   Note that areas with fully-adjacent virtual-links are considered to be
+   "transit capable" and can always be used to route backbone traffic, and
+   hence are unaffected by this setting (:clicmd:`area A.B.C.D virtual-link A.B.C.D`).
+
+   More information regarding the behaviour controlled by this command can
+   be found in :rfc:`3509`, and :t:`draft-ietf-ospf-shortcut-abr-02.txt`.
+
+   Quote: "Though the definition of the :abbr:`ABR (Area Border Router)`
+   in the OSPF specification does not require a router with multiple
+   attached areas to have a backbone connection, it is actually
+   necessary to provide successful routing to the inter-area and
+   external destinations. If this requirement is not met, all traffic
+   destined for the areas not connected to such an ABR or out of the
+   OSPF domain, is dropped. This document describes alternative ABR
+   behaviors implemented in Cisco and IBM routers."
+
+.. index:: ospf rfc1583compatibility
+.. clicmd:: ospf rfc1583compatibility
+
+.. index:: no ospf rfc1583compatibility
+.. clicmd:: no ospf rfc1583compatibility
+
+   :rfc:`2328`, the sucessor to :rfc:`1583`, suggests according
+   to section G.2 (changes) in section 16.4 a change to the path
+   preference algorithm that prevents possible routing loops that were
+   possible in the old version of OSPFv2. More specifically it demands
+   that inter-area paths and intra-area backbone path are now of equal preference
+   but still both preferred to external paths.
+
+   This command should NOT be set normally.
+
+.. index:: log-adjacency-changes [detail]
+.. clicmd:: log-adjacency-changes [detail]
+
+.. index:: no log-adjacency-changes [detail]
+.. clicmd:: no log-adjacency-changes [detail]
+
+   Configures ospfd to log changes in adjacency. With the optional
+   detail argument, all changes in adjacency status are shown. Without detail,
+   only changes to full or regressions are shown.
+
+.. index:: passive-interface INTERFACE
+.. clicmd:: passive-interface INTERFACE
+
+.. index:: no passive-interface INTERFACE
+.. clicmd:: no passive-interface INTERFACE
+
+   Do not speak OSPF interface on the
+   given interface, but do advertise the interface as a stub link in the
+   router-:abbr:`LSA (Link State Advertisement)` for this router. This
+   allows one to advertise addresses on such connected interfaces without
+   having to originate AS-External/Type-5 LSAs (which have global flooding
+   scope) - as would occur if connected addresses were redistributed into
+   OSPF (:ref:`redistribute-routes-to-ospf`). This is the only way to
+   advertise non-OSPF links into stub areas.
+
+.. index:: timers throttle spf DELAY INITIAL-HOLDTIME MAX-HOLDTIME
+.. clicmd:: timers throttle spf DELAY INITIAL-HOLDTIME MAX-HOLDTIME
+
+.. index:: no timers throttle spf
+.. clicmd:: no timers throttle spf
+
+   This command sets the initial `delay`, the `initial-holdtime`
+   and the `maximum-holdtime` between when SPF is calculated and the
+   event which triggered the calculation. The times are specified in
+   milliseconds and must be in the range of 0 to 600000 milliseconds.
+
+   The `delay` specifies the minimum amount of time to delay SPF
+   calculation (hence it affects how long SPF calculation is delayed after
+   an event which occurs outside of the holdtime of any previous SPF
+   calculation, and also serves as a minimum holdtime).
+
+   Consecutive SPF calculations will always be seperated by at least
+   'hold-time' milliseconds. The hold-time is adaptive and initially is
+   set to the `initial-holdtime` configured with the above command.
+   Events which occur within the holdtime of the previous SPF calculation
+   will cause the holdtime to be increased by `initial-holdtime`, bounded
+   by the `maximum-holdtime` configured with this command. If the adaptive
+   hold-time elapses without any SPF-triggering event occuring then
+   the current holdtime is reset to the `initial-holdtime`. The current
+   holdtime can be viewed with :clicmd:`show ip ospf`, where it is expressed as
+   a multiplier of the `initial-holdtime`.
+
+   ::
+
+      router ospf
+      timers throttle spf 200 400 10000
+
+
+   In this example, the `delay` is set to 200ms, the initial holdtime is set to
+   400ms and the `maximum holdtime` to 10s. Hence there will always be at least
+   200ms between an event which requires SPF calculation and the actual SPF
+   calculation. Further consecutive SPF calculations will always be seperated
+   by between 400ms to 10s, the hold-time increasing by 400ms each time an
+   SPF-triggering event occurs within the hold-time of the previous SPF
+   calculation.
+
+   This command supercedes the *timers spf* command in previous FRR
+   releases.
+
+.. index:: max-metric router-lsa [on-startup|on-shutdown] (5-86400)
+.. clicmd:: max-metric router-lsa [on-startup|on-shutdown] (5-86400)
+
+.. index:: max-metric router-lsa administrative
+.. clicmd:: max-metric router-lsa administrative
+
+.. index:: no max-metric router-lsa [on-startup|on-shutdown|administrative]
+.. clicmd:: no max-metric router-lsa [on-startup|on-shutdown|administrative]
+
+   This enables :rfc:`3137` support, where the OSPF process describes its
+   transit links in its router-LSA as having infinite distance so that other
+   routers will avoid calculating transit paths through the router while still
+   being able to reach networks through the router.
+
+   This support may be enabled administratively (and indefinitely) or
+   conditionally. Conditional enabling of max-metric router-lsas can be for a
+   period of seconds after startup and/or for a period of seconds prior to
+   shutdown.
+
+   Enabling this for a period after startup allows OSPF to converge fully first
+   without affecting any existing routes used by other routers, while still
+   allowing any connected stub links and/or redistributed routes to be
+   reachable. Enabling this for a period of time in advance of shutdown allows
+   the router to gracefully excuse itself from the OSPF domain.
+
+   Enabling this feature administratively allows for administrative
+   intervention for whatever reason, for an indefinite period of time.  Note
+   that if the configuration is written to file, this administrative form of
+   the stub-router command will also be written to file. If *ospfd* is
+   restarted later, the command will then take effect until manually
+   deconfigured.
+
+   Configured state of this feature as well as current status, such as the
+   number of second remaining till on-startup or on-shutdown ends, can be
+   viewed with the :clicmd:`show ip ospf` command.
+
+.. index:: auto-cost reference-bandwidth (1-4294967)
+.. clicmd:: auto-cost reference-bandwidth (1-4294967)
+
+.. index:: no auto-cost reference-bandwidth
+.. clicmd:: no auto-cost reference-bandwidth
+
+   This 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.
+
+.. index:: network A.B.C.D/M area A.B.C.D
+.. clicmd:: network A.B.C.D/M area A.B.C.D
+
+.. index:: network A.B.C.D/M area (0-4294967295)
+.. clicmd:: network A.B.C.D/M area (0-4294967295)
+
+.. index:: no network A.B.C.D/M area A.B.C.D
+.. clicmd:: no network A.B.C.D/M area A.B.C.D
+
+.. index:: no network A.B.C.D/M area (0-4294967295)
+.. clicmd:: no network A.B.C.D/M area (0-4294967295)
+
+   This command specifies the OSPF enabled interface(s). If the interface has
+   an address from range 192.168.1.0/24 then the command below enables ospf
+   on this interface so router can provide network information to the other
+   ospf routers via this interface.
+
+::
+
+    router ospf
+   network 192.168.1.0/24 area 0.0.0.0
+
+
+   Prefix length in interface must be equal or bigger (ie. smaller network) than
+   prefix length in network statement. For example statement above doesn't enable
+   ospf on interface with address 192.168.1.1/23, but it does on interface with
+   address 192.168.1.129/25.
+
+   Note that the behavior when there is a peer address
+   defined on an interface changed after release 0.99.7.
+   Currently, if a peer prefix has been configured,
+   then we test whether the prefix in the network command contains
+   the destination prefix. Otherwise, we test whether the network command prefix
+   contains the local address prefix of the interface.
+
+   In some cases it may be more convenient to enable OSPF on a per
+   interface/subnet basis (:clicmd:`ip ospf area AREA [ADDR]`).
+
+
+.. _ospf-area:
+
+OSPF area
+=========
+
+.. index:: area A.B.C.D range A.B.C.D/M
+.. clicmd:: area A.B.C.D range A.B.C.D/M
+
+.. index:: area (0-4294967295) range A.B.C.D/M
+.. clicmd:: area (0-4294967295) range A.B.C.D/M
+
+.. index:: no area A.B.C.D range A.B.C.D/M
+.. clicmd:: no area A.B.C.D range A.B.C.D/M
+
+.. index:: no area (0-4294967295) range A.B.C.D/M
+.. clicmd:: no area (0-4294967295) range A.B.C.D/M
+
+  Summarize intra area paths from specified area into one Type-3 summary-LSA
+  announced to other areas. This command can be used only in ABR and ONLY
+  router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
+  be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
+  Summarizing Type-7 AS-external-LSAs isn't supported yet by FRR.
+
+::
+
+   router ospf
+    network 192.168.1.0/24 area 0.0.0.0
+    network 10.0.0.0/8 area 0.0.0.10
+    area 0.0.0.10 range 10.0.0.0/8
+
+
+  With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
+  announced into backbone area if area 0.0.0.10 contains at least one intra-area
+  network (ie. described with router or network LSA) from this range.
+
+.. index:: area A.B.C.D range IPV4_PREFIX not-advertise
+.. clicmd:: area A.B.C.D range IPV4_PREFIX not-advertise
+
+.. index:: no area A.B.C.D range IPV4_PREFIX not-advertise
+.. clicmd:: no area A.B.C.D range IPV4_PREFIX not-advertise
+
+   Instead of summarizing intra area paths filter them - ie. intra area paths from this
+   range are not advertised into other areas.
+   This command makes sense in ABR only.
+
+.. index:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
+.. clicmd:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
+
+.. index:: no area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
+.. clicmd:: no area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
+
+   Substitute summarized prefix with another prefix.
+
+::
+
+    router ospf
+     network 192.168.1.0/24 area 0.0.0.0
+     network 10.0.0.0/8 area 0.0.0.10
+     area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
+
+
+   One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
+   area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or
+   network-LSA) from range 10.0.0.0/8.
+   This command makes sense in ABR only.
+
+.. index:: area A.B.C.D virtual-link A.B.C.D
+.. clicmd:: area A.B.C.D virtual-link A.B.C.D
+
+.. index:: area (0-4294967295) virtual-link A.B.C.D
+.. clicmd:: area (0-4294967295) virtual-link A.B.C.D
+
+.. index:: no area A.B.C.D virtual-link A.B.C.D
+.. clicmd:: no area A.B.C.D virtual-link A.B.C.D
+
+.. index:: no area (0-4294967295) virtual-link A.B.C.D
+.. clicmd:: no area (0-4294967295) virtual-link A.B.C.D
+
+.. index:: area A.B.C.D shortcut
+.. clicmd:: area A.B.C.D shortcut
+
+.. index:: area (0-4294967295) shortcut
+.. clicmd:: area (0-4294967295) shortcut
+
+.. index:: no area A.B.C.D shortcut
+.. clicmd:: no area A.B.C.D shortcut
+
+.. index:: no area (0-4294967295) shortcut
+.. clicmd:: no area (0-4294967295) shortcut
+
+   Configure the area as Shortcut capable. See :rfc:`3509`. This requires
+   that the 'abr-type' be set to 'shortcut'.
+
+.. index:: area A.B.C.D stub
+.. clicmd:: area A.B.C.D stub
+
+.. index:: area (0-4294967295) stub
+.. clicmd:: area (0-4294967295) stub
+
+.. index:: no area A.B.C.D stub
+.. clicmd:: no area A.B.C.D stub
+
+.. index:: no area (0-4294967295) stub
+.. clicmd:: no area (0-4294967295) stub
+
+   Configure the area to be a stub area. That is, an area where no router
+   originates routes external to OSPF and hence an area where all external
+   routes are via the ABR(s). Hence, ABRs for such an area do not need
+   to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
+   area. They need only pass Network-Summary (type-3) LSAs into such an area,
+   along with a default-route summary.
+
+.. index:: area A.B.C.D stub no-summary
+.. clicmd:: area A.B.C.D stub no-summary
+
+.. index:: area (0-4294967295) stub no-summary
+.. clicmd:: area (0-4294967295) stub no-summary
+
+.. index:: no area A.B.C.D stub no-summary
+.. clicmd:: no area A.B.C.D stub no-summary
+
+.. index:: no area (0-4294967295) stub no-summary
+.. clicmd:: no area (0-4294967295) stub no-summary
+
+    Prevents an *ospfd* ABR from injecting inter-area
+    summaries into the specified stub area.
+
+.. index:: area A.B.C.D default-cost (0-16777215)
+.. clicmd:: area A.B.C.D default-cost (0-16777215)
+
+.. index:: no area A.B.C.D default-cost (0-16777215)
+.. clicmd:: no area A.B.C.D default-cost (0-16777215)
+
+   Set the cost of default-summary LSAs announced to stubby areas.
+
+.. index:: area A.B.C.D export-list NAME
+.. clicmd:: area A.B.C.D export-list NAME
+
+.. index:: area (0-4294967295) export-list NAME
+.. clicmd:: area (0-4294967295) export-list NAME
+
+.. index:: no area A.B.C.D export-list NAME
+.. clicmd:: no area A.B.C.D export-list NAME
+
+.. index:: no area (0-4294967295) export-list NAME
+.. clicmd:: no area (0-4294967295) export-list NAME
+
+   Filter Type-3 summary-LSAs announced to other areas originated from intra-
+   area paths from specified area.
+
+::
+
+     router ospf
+      network 192.168.1.0/24 area 0.0.0.0
+      network 10.0.0.0/8 area 0.0.0.10
+      area 0.0.0.10 export-list foo
+     !
+     access-list foo permit 10.10.0.0/16
+     access-list foo deny any
+
+
+   With example above any intra-area paths from area 0.0.0.10 and from range
+   10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
+   other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
+   or 10.128.30.16/30) aren't.
+
+   This command is only relevant if the router is an ABR for the specified
+   area.
+
+.. index:: area A.B.C.D import-list NAME
+.. clicmd:: area A.B.C.D import-list NAME
+
+.. index:: area (0-4294967295) import-list NAME
+.. clicmd:: area (0-4294967295) import-list NAME
+
+.. index:: no area A.B.C.D import-list NAME
+.. clicmd:: no area A.B.C.D import-list NAME
+
+.. index:: no area (0-4294967295) import-list NAME
+.. clicmd:: no area (0-4294967295) import-list NAME
+
+   Same as export-list, but it applies to paths announced into specified area as
+   Type-3 summary-LSAs.
+
+.. index:: area A.B.C.D filter-list prefix NAME in
+.. clicmd:: area A.B.C.D filter-list prefix NAME in
+
+.. index:: area A.B.C.D filter-list prefix NAME out
+.. clicmd:: area A.B.C.D filter-list prefix NAME out
+
+.. index:: area (0-4294967295) filter-list prefix NAME in
+.. clicmd:: area (0-4294967295) filter-list prefix NAME in
+
+.. index:: area (0-4294967295) filter-list prefix NAME out
+.. clicmd:: area (0-4294967295) filter-list prefix NAME out
+
+.. index:: no area A.B.C.D filter-list prefix NAME in
+.. clicmd:: no area A.B.C.D filter-list prefix NAME in
+
+.. index:: no area A.B.C.D filter-list prefix NAME out
+.. clicmd:: no area A.B.C.D filter-list prefix NAME out
+
+.. index:: no area (0-4294967295) filter-list prefix NAME in
+.. clicmd:: no area (0-4294967295) filter-list prefix NAME in
+
+.. index:: no area (0-4294967295) filter-list prefix NAME out
+.. clicmd:: no area (0-4294967295) filter-list prefix NAME out
+
+     Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
+     makes sense in ABR only.
+
+.. index:: area A.B.C.D authentication
+.. clicmd:: area A.B.C.D authentication
+
+.. index:: area (0-4294967295) authentication
+.. clicmd:: area (0-4294967295) authentication
+
+.. index:: no area A.B.C.D authentication
+.. clicmd:: no area A.B.C.D authentication
+
+.. index:: no area (0-4294967295) authentication
+.. clicmd:: no area (0-4294967295) authentication
+
+    Specify that simple password authentication should be used for the given
+    area.
+
+.. index:: area A.B.C.D authentication message-digest
+.. clicmd:: area A.B.C.D authentication message-digest
+
+.. index:: area (0-4294967295) authentication message-digest
+.. clicmd:: area (0-4294967295) authentication message-digest
+
+   Specify that OSPF packets must be authenticated with MD5 HMACs within the
+   given area. Keying material must also be configured on a per-interface basis
+   (:clicmd:`ip ospf message-digest-key`).
+
+   MD5 authentication may also be configured on a per-interface basis
+   (:clicmd:`ip ospf authentication message-digest`). Such per-interface
+   settings will override any per-area authentication setting.
+
+.. _ospf-interface:
+
+OSPF interface
+==============
+
+.. index:: ip ospf area AREA [ADDR]
+.. clicmd:: ip ospf area AREA [ADDR]
+
+.. index:: no ip ospf area [ADDR]
+.. clicmd:: no ip ospf area [ADDR]
+
+   Enable OSPF on the interface, optionally restricted to just the IP address
+   given by `ADDR`, putting it in the `AREA` area. Per interface area settings
+   take precedence to network commands
+   (:clicmd:`network A.B.C.D/M area A.B.C.D`).
+
+   If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF
+   via this command may result in a slight performance improvement.
+
+.. index:: ip ospf authentication-key AUTH_KEY
+.. clicmd:: ip ospf authentication-key AUTH_KEY
+
+.. index:: no ip ospf authentication-key
+.. clicmd:: no ip ospf authentication-key
+
+   Set OSPF authentication key to a simple password. After setting `AUTH_KEY`,
+   all OSPF packets are authenticated. `AUTH_KEY` has length up to 8 chars.
+
+   Simple text password authentication is insecure and deprecated in favour of
+   MD5 HMAC authentication.
+
+.. index:: ip ospf authentication message-digest
+.. clicmd:: ip ospf authentication message-digest
+
+   Specify that MD5 HMAC authentication must be used on this interface. MD5
+   keying material must also be configured. Overrides any authentication
+   enabled on a per-area basis
+   (:clicmd:`area A.B.C.D authentication message-digest`)
+
+   Note that OSPF MD5 authentication requires that time never go backwards
+   (correct time is NOT important, only that it never goes backwards), even
+   across resets, if ospfd is to be able to promptly reestabish adjacencies
+   with its neighbours after restarts/reboots. The host should have system time
+   be set at boot from an external or non-volatile source (eg battery backed
+   clock, NTP, etc.) or else the system clock should be periodically saved to
+   non-volative storage and restored at boot if MD5 authentication is to be
+   expected to work reliably.
+
+.. index:: ip ospf message-digest-key KEYID md5 KEY
+.. clicmd:: ip ospf message-digest-key KEYID md5 KEY
+
+.. index:: no ip ospf message-digest-key
+.. clicmd:: no ip ospf message-digest-key
+
+   Set OSPF authentication key to a cryptographic password. The cryptographic
+   algorithm is MD5.
+
+   KEYID identifies secret key used to create the message digest. This ID
+   is part of the protocol and must be consistent across routers on a
+   link.
+
+   KEY is the actual message digest key, of up to 16 chars (larger strings
+   will be truncated), and is associated with the given KEYID.
+
+.. index:: ip ospf cost (1-65535)
+.. clicmd:: ip ospf cost (1-65535)
+
+.. index:: no ip ospf cost
+.. clicmd:: no ip ospf cost
+
+   Set link cost for the specified interface. The cost value is set to router-LSA's
+   metric field and used for SPF calculation.
+
+.. index:: ip ospf dead-interval (1-65535)
+.. clicmd:: ip ospf dead-interval (1-65535)
+
+.. index:: ip ospf dead-interval minimal hello-multiplier (2-20)
+.. clicmd:: ip ospf dead-interval minimal hello-multiplier (2-20)
+
+.. index:: no ip ospf dead-interval
+.. clicmd:: no ip ospf dead-interval
+
+   Set number of seconds for RouterDeadInterval timer value used for Wait Timer
+   and Inactivity Timer. This value must be the same for all routers attached
+   to a common network. The default value is 40 seconds.
+
+   If 'minimal' is specified instead, then the dead-interval is set to 1 second
+   and one must specify a hello-multiplier. The hello-multiplier specifies how
+   many Hellos to send per second, from 2 (every 500ms) to 20 (every 50ms).
+   Thus one can have 1s convergence time for OSPF. If this form is specified,
+   then the hello-interval advertised in Hello packets is set to 0 and the
+   hello-interval on received Hello packets is not checked, thus the
+   hello-multiplier need NOT be the same across multiple routers on a common
+   link.
+
+.. index:: ip ospf hello-interval (1-65535)
+.. clicmd:: ip ospf hello-interval (1-65535)
+
+.. index:: no ip ospf hello-interval
+.. clicmd:: no ip ospf hello-interval
+
+   Set number of seconds for HelloInterval timer value. Setting this value,
+   Hello packet will be sent every timer value seconds on the specified interface.
+   This value must be the same for all routers attached to a common network.
+   The default value is 10 seconds.
+
+   This command has no effect if
+   :clicmd:`ip ospf dead-interval minimal hello-multiplier (2-20)` is also
+   specified for the interface.
+
+.. index:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)
+.. clicmd:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)
+
+.. index:: no ip ospf network
+.. clicmd:: no ip ospf network
+
+   Set explicitly network type for specifed interface.
+
+.. index:: ip ospf priority (0-255)
+.. clicmd:: ip ospf priority (0-255)
+
+.. index:: no ip ospf priority
+.. clicmd:: no ip ospf priority
+
+    Set RouterPriority integer value. The router with the highest priority
+    will be more eligible to become Designated Router. Setting the value
+    to 0, makes the router ineligible to become Designated Router. The
+    default value is 1.
+
+.. index:: ip ospf retransmit-interval (1-65535)
+.. clicmd:: ip ospf retransmit-interval (1-65535)
+
+.. index:: no ip ospf retransmit interval
+.. clicmd:: no ip ospf retransmit interval
+
+   Set number of seconds for RxmtInterval timer value. This value is used
+   when retransmitting Database Description and Link State Request packets.
+   The default value is 5 seconds.
+
+.. index:: ip ospf transmit-delay
+.. clicmd:: ip ospf transmit-delay
+
+.. index:: no ip ospf transmit-delay
+.. clicmd:: no ip ospf transmit-delay
+
+   Set number of seconds for InfTransDelay value. LSAs' age should be
+   incremented by this value when transmitting.
+   The default value is 1 seconds.
+
+.. index:: ip ospf area (A.B.C.D|(0-4294967295))
+.. clicmd:: ip ospf area (A.B.C.D|(0-4294967295))
+
+.. index:: no ip ospf area
+.. clicmd:: no ip ospf area
+
+    Enable ospf on an interface and set associated area.
+
+.. _redistribute-routes-to-ospf:
+
+Redistribute routes to OSPF
+===========================
+
+.. index:: redistribute (kernel|connected|static|rip|bgp)
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp)
+
+.. index:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
+
+.. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
+
+.. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD
+
+.. index:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
+
+.. index:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214) route-map WORD
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214) route-map WORD
+
+.. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214)
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214)
+
+.. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214) route-map WORD
+.. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214) route-map WORD
+
+.. index:: no redistribute (kernel|connected|static|rip|bgp)
+.. clicmd:: no redistribute (kernel|connected|static|rip|bgp)
+
+.. _ospf-redistribute:
+
+   Redistribute routes of the specified protocol
+   or kind into OSPF, with the metric type and metric set if specified,
+   filtering the routes using the given route-map if specified.
+   Redistributed routes may also be filtered with distribute-lists, see
+   :ref:`ospf distribute-list configuration <ospf-distribute-list>`.
+
+   Redistributed routes are distributed as into OSPF as Type-5 External
+   LSAs into links to areas that accept external routes, Type-7 External LSAs
+   for NSSA areas and are not redistributed at all into Stub areas, where
+   external routes are not permitted.
+
+   Note that for connected routes, one may instead use the `passive-interface`
+   configuration.
+
+.. seealso::
+
+   clicmd:`passive-interface INTERFACE`.
+
+.. index:: default-information originate
+.. clicmd:: default-information originate
+
+.. index:: default-information originate metric (0-16777214)
+.. clicmd:: default-information originate metric (0-16777214)
+
+.. index:: default-information originate metric (0-16777214) metric-type (1|2)
+.. clicmd:: default-information originate metric (0-16777214) metric-type (1|2)
+
+.. index:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD
+.. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD
+
+.. index:: default-information originate always
+.. clicmd:: default-information originate always
+
+.. index:: default-information originate always metric (0-16777214)
+.. clicmd:: default-information originate always metric (0-16777214)
+
+.. index:: default-information originate always metric (0-16777214) metric-type (1|2)
+.. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2)
+
+.. index:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD
+.. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD
+
+.. index:: no default-information originate
+.. clicmd:: no default-information originate
+
+   Originate an AS-External (type-5) LSA describing a default route into
+   all external-routing capable areas, of the specified metric and metric
+   type. If the 'always' keyword is given then the default is always
+   advertised, even when there is no default present in the routing table.
+
+.. index:: distribute-list NAME out (kernel|connected|static|rip|ospf
+.. clicmd:: distribute-list NAME out (kernel|connected|static|rip|ospf
+
+.. index:: no distribute-list NAME out (kernel|connected|static|rip|ospf
+.. clicmd:: no distribute-list NAME out (kernel|connected|static|rip|ospf
+
+.. _ospf-distribute-list:
+
+   Apply the access-list filter, NAME, to
+   redistributed routes of the given type before allowing the routes to
+   redistributed into OSPF (:ref:`ospf redistribution <ospf-redistribute>`).
+
+.. index:: default-metric (0-16777214)
+.. clicmd:: default-metric (0-16777214)
+
+.. index:: no default-metric
+.. clicmd:: no default-metric
+
+.. index:: distance (1-255)
+.. clicmd:: distance (1-255)
+
+.. index:: no distance (1-255)
+.. clicmd:: no distance (1-255)
+
+.. index:: distance ospf (intra-area|inter-area|external) (1-255)
+.. clicmd:: distance ospf (intra-area|inter-area|external) (1-255)
+
+.. index:: no distance ospf
+.. clicmd:: no distance ospf
+
+.. index:: router zebra
+.. clicmd:: router zebra
+
+.. index:: no router zebra
+.. clicmd:: no router zebra
+
+
+.. _showing-ospf-information:
+
+Showing OSPF information
+========================
+
+.. _show-ip-ospf:
+
+.. index:: show ip ospf
+.. clicmd:: show ip ospf
+
+   Show information on a variety of general OSPF and area state and
+   configuration information.
+
+.. index:: show ip ospf interface [INTERFACE]
+.. clicmd:: show ip ospf interface [INTERFACE]
+
+   Show state and configuration of OSPF the specified interface, or all
+   interfaces if no interface is given.
+
+.. index:: show ip ospf neighbor
+.. clicmd:: show ip ospf neighbor
+
+.. index:: show ip ospf neighbor INTERFACE
+.. clicmd:: show ip ospf neighbor INTERFACE
+
+.. index:: show ip ospf neighbor detail
+.. clicmd:: show ip ospf neighbor detail
+
+.. index:: show ip ospf neighbor INTERFACE detail
+.. clicmd:: show ip ospf neighbor INTERFACE detail
+
+.. index:: show ip ospf database
+.. clicmd:: show ip ospf database
+
+.. index:: show ip ospf database (asbr-summary|external|network|router|summary)
+.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary)
+
+.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID
+.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID
+
+.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER
+.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER
+
+.. index:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
+.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
+
+.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate
+.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate
+
+.. index:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate
+.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate
+
+.. index:: show ip ospf database max-age
+.. clicmd:: show ip ospf database max-age
+
+.. index:: show ip ospf database self-originate
+.. clicmd:: show ip ospf database self-originate
+
+.. index:: show ip ospf route
+.. clicmd:: show ip ospf route
+
+   Show the OSPF routing table, as determined by the most recent SPF calculation.
+
+.. _opaque-lsa:
+
+Opaque LSA
+==========
+
+.. index:: ospf opaque-lsa
+.. clicmd:: ospf opaque-lsa
+
+.. index:: capability opaque
+.. clicmd:: capability opaque
+
+.. index:: no ospf opaque-lsa
+.. clicmd:: no ospf opaque-lsa
+
+.. index:: no capability opaque
+.. clicmd:: no capability opaque
+
+   *ospfd* support Opaque LSA (RFC2370) as fondment for MPLS Traffic Engineering
+   LSA. Prior to used MPLS TE, opaque-lsa must be enable in the configuration
+   file. Alternate command could be "mpls-te on"
+   (:ref:`ospf-traffic-engineering`).
+
+.. index:: show ip ospf database (opaque-link|opaque-area|opaque-external)
+.. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external)
+
+.. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID
+.. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID
+
+.. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER
+.. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER
+
+.. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER
+.. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER
+
+.. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate
+.. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate
+
+.. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate
+.. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate
+
+   Show Opaque LSA from the database.
+
+.. _ospf-traffic-engineering:
+
+Traffic Engineering
+===================
+
+.. index:: mpls-te on
+.. clicmd:: mpls-te on
+
+.. index:: no mpls-te
+.. clicmd:: no mpls-te
+
+   Enable Traffic Engineering LSA flooding.
+
+.. index:: mpls-te router-address <A.B.C.D>
+.. clicmd:: mpls-te router-address <A.B.C.D>
+
+   Configure stable IP address for MPLS-TE. This IP address is then advertise
+   in Opaque LSA Type-10 TLV=1 (TE) option 1 (Router-Address).
+
+.. index:: mpls-te inter-as area <area-id>|as
+.. clicmd:: mpls-te inter-as area <area-id>|as
+
+.. index:: no mpls-te inter-as
+.. clicmd:: no mpls-te inter-as
+
+   Enable :rfc:`5392` support - Inter-AS TE v2 - to flood Traffic Engineering
+   parameters of Inter-AS link.  2 modes are supported: AREA and AS; LSA are
+   flood in AREA <area-id> with Opaque Type-10, respectively in AS with Opaque
+   Type-11. In all case, Opaque-LSA TLV=6.
+
+.. index:: show ip ospf mpls-te interface
+.. clicmd:: show ip ospf mpls-te interface
+
+.. index:: show ip ospf mpls-te interface INTERFACE
+.. clicmd:: show ip ospf mpls-te interface INTERFACE
+
+   Show MPLS Traffic Engineering parameters for all or specified interface.
+
+.. index:: show ip ospf mpls-te router
+.. clicmd:: show ip ospf mpls-te router
+
+   Show Traffic Engineering router parameters.
+
+.. _router-information:
+
+Router Information
+==================
+
+.. index:: router-info [as | area <A.B.C.D>]
+.. clicmd:: router-info [as | area <A.B.C.D>]
+
+.. index:: no router-info
+.. clicmd:: no router-info
+
+   Enable Router Information (:rfc:`4970`) LSA advertisement with AS scope
+   (default) or Area scope flooding when area is specified.
+
+.. index:: pce address <A.B.C.D>
+.. clicmd:: pce address <A.B.C.D>
+
+.. index:: no pce address
+.. clicmd:: no pce address
+
+.. index:: pce domain as (0-65535)
+.. clicmd:: pce domain as (0-65535)
+
+.. index:: no pce domain as (0-65535)
+.. clicmd:: no pce domain as (0-65535)
+
+.. index:: pce neighbor as (0-65535)
+.. clicmd:: pce neighbor as (0-65535)
+
+.. index:: no pce neighbor as (0-65535)
+.. clicmd:: no pce neighbor as (0-65535)
+
+.. index:: pce flag BITPATTERN
+.. clicmd:: pce flag BITPATTERN
+
+.. index:: no pce flag
+.. clicmd:: no pce flag
+
+.. index:: pce scope BITPATTERN
+.. clicmd:: pce scope BITPATTERN
+
+.. index:: no pce scope
+.. clicmd:: no pce scope
+
+  The commands are conform to :rfc:`5088` and allow OSPF router announce Path
+  Compuatation Elemenent (PCE) capabilities through the Router Information (RI)
+  LSA. Router Information must be enable prior to this. The command set/unset
+  respectively the PCE IP adress, Autonomous System (AS) numbers of controlled
+  domains, neighbor ASs, flag and scope. For flag and scope, please refer to
+  :rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor' command
+  could be specified in order to specify all PCE neighbours.
+
+.. index:: show ip ospf router-info
+.. clicmd:: show ip ospf router-info
+
+   Show Router Capabilities flag.
+.. index:: show ip ospf router-info pce
+.. clicmd:: show ip ospf router-info pce
+
+   Show Router Capabilities PCE parameters.
+
+.. _debugging-ospf:
+
+Segment Routing
+===============
+
+This is an EXPERIMENTAL support of Segment Routing as per draft
+`draft-ietf-ospf-segment-routing-extensions-24.txt` for MPLS dataplane.
+
+.. index:: [no] segment-routing on
+.. clicmd:: [no] segment-routing on
+
+   Enable Segment Routing. Even if this also activate routing information
+   support, it is preferable to also activate routing information, and set
+   accordingly the Area or AS flooding.
+
+.. index:: [no] segment-routing global-block (0-1048575) (0-1048575)
+.. clicmd:: [no] segment-routing global-block (0-1048575) (0-1048575)
+
+   Fix the Segment Routing Global Block i.e. the label range used by MPLS to
+   store label in the MPLS FIB.
+
+.. index:: [no] segment-routing node-msd (1-16)
+.. clicmd:: [no] segment-routing node-msd (1-16)
+
+   Fix the Maximum Stack Depth supported by the router. The value depend of the
+   MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32.
+
+.. index:: [no] segment-routing prefix A.B.C.D/M index (0-65535) [no-php-flag]
+.. clicmd:: [no] segment-routing prefix A.B.C.D/M index (0-65535) [no-php-flag]
+
+   Set the Segment Rounting index for the specifyed prefix. Note
+   that, only prefix with /32 corresponding to a loopback interface are
+   currently supported. The 'no-php-flag' means NO Penultimate Hop Popping that
+   allows SR node to request to its neighbor to not pop the label.
+
+.. index:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
+.. clicmd:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
+
+   Show Segment Routing Data Base, all SR nodes, specific advertized router or
+   self router. Optional JSON output can be obtained by appending 'json' to the
+   end of the command.
+
+Debugging OSPF
+==============
+
+.. index:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
+.. clicmd:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
+
+.. index:: no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
+.. clicmd:: no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
+
+   Dump Packet for debugging
+
+.. index:: debug ospf ism
+.. clicmd:: debug ospf ism
+
+.. index:: debug ospf ism (status|events|timers)
+.. clicmd:: debug ospf ism (status|events|timers)
+
+.. index:: no debug ospf ism
+.. clicmd:: no debug ospf ism
+
+.. index:: no debug ospf ism (status|events|timers)
+.. clicmd:: no debug ospf ism (status|events|timers)
+
+   Show debug information of Interface State Machine
+
+.. index:: debug ospf nsm
+.. clicmd:: debug ospf nsm
+
+.. index:: debug ospf nsm (status|events|timers)
+.. clicmd:: debug ospf nsm (status|events|timers)
+
+.. index:: no debug ospf nsm
+.. clicmd:: no debug ospf nsm
+
+.. index:: no debug ospf nsm (status|events|timers)
+.. clicmd:: no debug ospf nsm (status|events|timers)
+
+   Show debug information of Network State Machine
+
+.. index:: debug ospf event
+.. clicmd:: debug ospf event
+
+.. index:: no debug ospf event
+.. clicmd:: no debug ospf event
+
+   Show debug information of OSPF event
+
+.. index:: debug ospf nssa
+.. clicmd:: debug ospf nssa
+
+.. index:: no debug ospf nssa
+.. clicmd:: no debug ospf nssa
+
+   Show debug information about Not So Stub Area
+
+.. index:: debug ospf lsa
+.. clicmd:: debug ospf lsa
+
+.. index:: debug ospf lsa (generate|flooding|refresh)
+.. clicmd:: debug ospf lsa (generate|flooding|refresh)
+
+.. index:: no debug ospf lsa
+.. clicmd:: no debug ospf lsa
+
+.. index:: no debug ospf lsa (generate|flooding|refresh)
+.. clicmd:: no debug ospf lsa (generate|flooding|refresh)
+
+   Show debug detail of Link State messages
+
+.. index:: debug ospf te
+.. clicmd:: debug ospf te
+
+.. index:: no debug ospf te
+.. clicmd:: no debug ospf te
+
+   Show debug information about Traffic Engineering LSA
+
+.. index:: debug ospf zebra
+.. clicmd:: debug ospf zebra
+
+.. index:: debug ospf zebra (interface|redistribute)
+.. clicmd:: debug ospf zebra (interface|redistribute)
+
+.. index:: no debug ospf zebra
+.. clicmd:: no debug ospf zebra
+
+.. index:: no debug ospf zebra (interface|redistribute)
+.. clicmd:: no debug ospf zebra (interface|redistribute)
+
+   Show debug information of ZEBRA API
+
+.. index:: show debugging ospf
+.. clicmd:: show debugging ospf
+
+
+OSPF Configuration Examples
+===========================
+
+A simple example, with MD5 authentication enabled:
+
+::
+
+   !
+   interface bge0
+    ip ospf authentication message-digest
+    ip ospf message-digest-key 1 md5 ABCDEFGHIJK
+   !
+   router ospf
+    network 192.168.0.0/16 area 0.0.0.1
+    area 0.0.0.1 authentication message-digest
+
+
+An :abbr:`ABR` router, with MD5 authentication and performing summarisation
+of networks between the areas:
+
+::
+
+   !
+   password ABCDEF
+   log file /var/log/frr/ospfd.log
+   service advanced-vty
+   !
+   interface eth0
+    ip ospf authentication message-digest
+    ip ospf message-digest-key 1 md5 ABCDEFGHIJK
+   !
+   interface ppp0
+   !
+   interface br0
+    ip ospf authentication message-digest
+    ip ospf message-digest-key 2 md5 XYZ12345
+   !
+   router ospf
+    ospf router-id 192.168.0.1
+    redistribute connected
+    passive interface ppp0
+    network 192.168.0.0/24 area 0.0.0.0
+    network 10.0.0.0/16 area 0.0.0.0
+    network 192.168.1.0/24 area 0.0.0.1
+    area 0.0.0.0 authentication message-digest
+    area 0.0.0.0 range 10.0.0.0/16
+    area 0.0.0.0 range 192.168.0.0/24
+    area 0.0.0.1 authentication message-digest
+    area 0.0.0.1 range 10.2.0.0/16
+   !
+
+
+A Traffic Engineering configuration, with Inter-ASv2 support.
+
+First, the 'zebra.conf' part:::
+
+   interface eth0
+    ip address 198.168.1.1/24
+    link-params
+     enable
+     admin-grp 0xa1
+     metric 100
+     max-bw 1.25e+07
+     max-rsv-bw 1.25e+06
+     unrsv-bw 0 1.25e+06
+     unrsv-bw 1 1.25e+06
+     unrsv-bw 2 1.25e+06
+     unrsv-bw 3 1.25e+06
+     unrsv-bw 4 1.25e+06
+     unrsv-bw 5 1.25e+06
+     unrsv-bw 6 1.25e+06
+     unrsv-bw 7 1.25e+06
+   !
+   interface eth1
+    ip address 192.168.2.1/24
+    link-params
+     enable
+     metric 10
+     max-bw 1.25e+07
+     max-rsv-bw 1.25e+06
+     unrsv-bw 0 1.25e+06
+     unrsv-bw 1 1.25e+06
+     unrsv-bw 2 1.25e+06
+     unrsv-bw 3 1.25e+06
+     unrsv-bw 4 1.25e+06
+     unrsv-bw 5 1.25e+06
+     unrsv-bw 6 1.25e+06
+     unrsv-bw 7 1.25e+06
+     neighbor 192.168.2.2 as 65000
+      hostname HOSTNAME
+      password PASSWORD
+      log file /var/log/zebra.log
+      !
+      interface eth0
+       ip address 198.168.1.1/24
+       link-params
+        enable
+        admin-grp 0xa1
+        metric 100
+        max-bw 1.25e+07
+        max-rsv-bw 1.25e+06
+        unrsv-bw 0 1.25e+06
+        unrsv-bw 1 1.25e+06
+        unrsv-bw 2 1.25e+06
+        unrsv-bw 3 1.25e+06
+        unrsv-bw 4 1.25e+06
+        unrsv-bw 5 1.25e+06
+        unrsv-bw 6 1.25e+06
+        unrsv-bw 7 1.25e+06
+      !
+      interface eth1
+       ip address 192.168.2.1/24
+       link-params
+        enable
+        metric 10
+        max-bw 1.25e+07
+        max-rsv-bw 1.25e+06
+        unrsv-bw 0 1.25e+06
+        unrsv-bw 1 1.25e+06
+        unrsv-bw 2 1.25e+06
+        unrsv-bw 3 1.25e+06
+        unrsv-bw 4 1.25e+06
+        unrsv-bw 5 1.25e+06
+        unrsv-bw 6 1.25e+06
+        unrsv-bw 7 1.25e+06
+        neighbor 192.168.2.2 as 65000
+
+Then the 'ospfd.conf' itself:::
+
+   hostname HOSTNAME
+   password PASSWORD
+   log file /var/log/ospfd.log
+   !
+   !
+   interface eth0
+    ip ospf hello-interval 60
+    ip ospf dead-interval 240
+   !
+   interface eth1
+    ip ospf hello-interval 60
+    ip ospf dead-interval 240
+   !
+   !
+   router ospf
+    ospf router-id 192.168.1.1
+    network 192.168.0.0/16 area 1
+    ospf opaque-lsa
+    mpls-te
+    mpls-te router-address 192.168.1.1
+    mpls-te inter-as area 1
+   !
+   line vty
+
+
+A router information example with PCE advsertisement:::
+
+   !
+   router ospf
+    ospf router-id 192.168.1.1
+    network 192.168.0.0/16 area 1
+    capability opaque
+    mpls-te
+    mpls-te router-address 192.168.1.1
+    router-info area 0.0.0.1
+    pce address 192.168.1.1
+    pce flag 0x80
+    pce domain as 65400
+    pce neighbor as 65500
+    pce neighbor as 65200
+    pce scope 0x80
+   !
diff --git a/doc/user/overview.rst b/doc/user/overview.rst
new file mode 100644 (file)
index 0000000..064dc43
--- /dev/null
@@ -0,0 +1,302 @@
+.. _overview:
+
+********
+Overview
+********
+
+`FRR`_ is a routing software package that provides TCP/IP based
+routing services with routing protocols support such as RIPv1, RIPv2, RIPng,
+OSPFv2, OSPFv3, IS-IS, BGP-4, and BGP-4+ (:ref:`supported-rfcs`). FRR also
+supports special BGP Route Reflector and Route Server behavior.  In addition to
+traditional IPv4 routing protocols, FRR also supports IPv6 routing protocols.
+With SNMP daemon which supports SMUX and AgentX protocol, FRR provides routing
+protocol MIBs (:ref:`snmp-support`).
+
+FRR uses an advanced software architecture to provide you with a high
+quality, multi server routing engine. FRR has an interactive user
+interface for each routing protocol and supports common client commands.
+Due to this design, you can add new protocol daemons to FRR easily.  You
+can use FRR library as your program's client user interface.
+
+FRR is distributed under the GNU General Public License.
+
+.. _about-frr:
+
+About FRR
+=========
+
+Today, TCP/IP networks are covering all of the world.  The Internet has
+been deployed in many countries, companies, and to the home.  When you
+connect to the Internet your packet will pass many routers which have TCP/IP
+routing functionality.
+
+A system with FRR installed acts as a dedicated router.  With FRR,
+your machine exchanges routing information with other routers using routing
+protocols.  FRR uses this information to update the kernel routing table
+so that the right data goes to the right place.  You can dynamically change
+the configuration and you may view routing table information from the FRR
+terminal interface.
+
+Adding to routing protocol support, FRR can setup interface's flags,
+interface's address, static routes and so on.  If you have a small network,
+or a stub network, or xDSL connection, configuring the FRR routing
+software is very easy.  The only thing you have to do is to set up the
+interfaces and put a few commands about static routes and/or default routes.
+If the network is rather large, or if the network structure changes
+frequently, you will want to take advantage of FRR's dynamic routing
+protocol support for protocols such as RIP, OSPF, IS-IS or BGP.
+
+Traditionally, UNIX based router configuration is done by
+*ifconfig* and *route* commands.  Status of routing
+table is displayed by *netstat* utility.  Almost of these commands
+work only if the user has root privileges.  FRR has a different system
+administration method.  There are two user modes in FRR.  One is normal
+mode, the other is enable mode.  Normal mode user can only view system
+status, enable mode user can change system configuration.  This UNIX account
+independent feature will be great help to the router administrator.
+
+Currently, FRR supports common unicast routing protocols, that is BGP,
+OSPF, RIP and IS-IS.  Upcoming for MPLS support, an implementation of LDP is
+currently being prepared for merging.  Implementations of BFD and PIM-SSM
+(IPv4) also exist, but are not actively being worked on.
+
+The ultimate goal of the FRR project is making a productive, quality, free
+TCP/IP routing software package.
+
+
+System Architecture
+===================
+
+.. index:: System architecture
+
+.. index:: Software architecture
+
+.. index:: Software internals
+
+Traditional routing software is made as a one process program which
+provides all of the routing protocol functionalities.  FRR takes a
+different approach.  It is made from a collection of several daemons that
+work together to build the routing table.  There may be several
+protocol-specific routing daemons and zebra the kernel routing manager.
+
+The *ripd* daemon handles the RIP protocol, while
+*ospfd* is a daemon which supports OSPF version 2.
+*bgpd* supports the BGP-4 protocol.  For changing the kernel
+routing table and for redistribution of routes between different routing
+protocols, there is a kernel routing table manager *zebra* daemon.
+It is easy to add a new routing protocol daemons to the entire routing
+system without affecting any other software.  You need to run only the
+protocol daemon associated with routing protocols in use.  Thus, user may
+run a specific daemon and send routing reports to a central routing console.
+
+There is no need for these daemons to be running on the same machine. You
+can even run several same protocol daemons on the same machine.  This
+architecture creates new possibilities for the routing system.
+
+::
+
+  +----+  +----+  +-----+  +-----+
+  |bgpd|  |ripd|  |ospfd|  |zebra|
+  +----+  +----+  +-----+  +-----+
+                              |
+  +---------------------------|--+
+  |                           v  |
+  |  UNIX Kernel  routing table  |
+  |                              |
+  +------------------------------+
+
+      FRR System Architecture
+
+
+Multi-process architecture brings extensibility, modularity and
+maintainability.  At the same time it also brings many configuration files
+and terminal interfaces.  Each daemon has it's own configuration file and
+terminal interface.  When you configure a static route, it must be done in
+*zebra* configuration file.  When you configure BGP network it must
+be done in *bgpd* configuration file.  This can be a very annoying
+thing.  To resolve the problem, FRR provides integrated user interface
+shell called *vtysh*.  *vtysh* connects to each daemon with
+UNIX domain socket and then works as a proxy for user input.
+
+FRR was planned to use multi-threaded mechanism when it runs with a
+kernel that supports multi-threads.  But at the moment, the thread library
+which comes with GNU/Linux or FreeBSD has some problems with running
+reliable services such as routing software, so we don't use threads at all.
+Instead we use the *select(2)* system call for multiplexing the
+events.
+
+
+Supported Platforms
+===================
+
+.. index:: Supported platforms
+
+.. index:: FRR on other systems
+
+.. index:: Compatibility with other systems
+
+.. index:: Operating systems that support FRR
+
+Currently FRR supports GNU/Linux and BSD. Porting FRR
+to other platforms is not too difficult as platform dependent code should
+most be limited to the *zebra* daemon.  Protocol daemons are mostly
+platform independent. Please let us know when you find out FRR runs on a
+platform which is not listed below.
+
+The list of officially supported platforms are listed below. Note that
+FRR may run correctly on other platforms, and may run with partial
+functionality on further platforms.
+
+- GNU/Linux
+- FreeBSD
+- NetBSD
+- OpenBSD
+
+Versions of these platforms that are older than around 2 years from the point
+of their original release (in case of GNU/Linux, this is since the kernel's
+release on https://kernel.org/) may need some work.  Similarly, the following platforms
+may work with some effort:
+
+- Solaris
+- MacOS
+
+Also note that, in particular regarding proprietary platforms, compiler
+and C library choice will affect FRR.  Only recent versions of the
+following C compilers are well-tested:
+
+- GNU's GCC
+- LLVM's clang
+- Intel's ICC
+
+
+.. _supported-rfcs:
+
+Supported RFCs
+==============
+
+FRR implements the following RFCs:
+
+- :rfc:`1058`
+  :t:`Routing Information Protocol. C.L. Hedrick. Jun-01-1988.`
+- :rfc:`2082`
+  :t:`RIP-2 MD5 Authentication. F. Baker, R. Atkinson. January 1997.`
+- :rfc:`2453`
+  :t:`RIP Version 2. G. Malkin. November 1998.`
+- :rfc:`2080`
+  :t:`RIPng for IPv6. G. Malkin, R. Minnear. January 1997.`
+- :rfc:`2328`
+  :t:`OSPF Version 2. J. Moy. April 1998.`
+- :rfc:`2370`
+  :t:`The OSPF Opaque LSA Option R. Coltun. July 1998.`
+- :rfc:`3101`
+  :t:`The OSPF Not-So-Stubby Area (NSSA) Option P. Murphy. January 2003.`
+- :rfc:`2740`
+  :t:`OSPF for IPv6. R. Coltun, D. Ferguson, J. Moy. December 1999.`
+- :rfc:`1771`
+  :t:`A Border Gateway Protocol 4 (BGP-4). Y. Rekhter & T. Li. March 1995.`
+- :rfc:`1965`
+  :t:`Autonomous System Confederations for BGP. P. Traina. June 1996.`
+- :rfc:`1997`
+  :t:`BGP Communities Attribute. R. Chandra, P. Traina & T. Li. August 1996.`
+- :rfc:`2545`
+  :t:`Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing. P.
+  Marques, F. Dupont. March 1999.`
+- :rfc:`2796`
+  :t:`BGP Route Reflection An alternative to full mesh IBGP. T. Bates & R.
+  Chandrasekeran. June 1996.`
+- :rfc:`2858`
+  :t:`Multiprotocol Extensions for BGP-4. T. Bates, Y. Rekhter, R. Chandra, D.
+  Katz. June 2000.`
+- :rfc:`2842`
+  :t:`Capabilities Advertisement with BGP-4. R. Chandra, J. Scudder. May 2000.`
+- :rfc:`3137`
+  :t:`OSPF Stub Router Advertisement, A. Retana, L. Nguyen, R. White, A. Zinin,
+  D. McPherson. June 2001`
+
+**When SNMP support is enabled, the following RFCs are also supported:**
+
+- :rfc:`1227`
+  :t:`SNMP MUX protocol and MIB. M.T. Rose. May-01-1991.`
+- :rfc:`1657`
+  :t:`Definitions of Managed Objects for the Fourth Version of the Border
+  Gateway Protocol (BGP-4) using SMIv2. S. Willis, J. Burruss, J. Chu, Editor.
+  July 1994.`
+- :rfc:`1724`
+  :t:`RIP Version 2 MIB Extension. G. Malkin & F. Baker. November 1994.`
+- :rfc:`1850`
+  :t:`OSPF Version 2 Management Information Base. F. Baker, R. Coltun.
+  November 1995.`
+- :rfc:`2741`
+  :t:`Agent Extensibility (AgentX) Protocol. M. Daniele, B. Wijnen. January 2000.`
+
+How to get FRR
+==============
+
+The official FRR website is located at |PACKAGE_URL| and contains further
+information, as well as links to additional resources.
+
+FRR is a fork of `Quagga <http://www.quagga.net/>`_.
+
+Mailing Lists
+=============
+
+.. index:: How to get in touch with FRR
+.. index:: Contact information
+.. index:: Mailing lists
+
+
+Italicized lists are private.
+
++--------------------------------+------------------------------+
+| Topic                          | List                         |
++================================+==============================+
+| Development                    | dev@lists.frrouting.org      |
++--------------------------------+------------------------------+
+| Users & Operators              | frog@lists.frrouting.org     |
++--------------------------------+------------------------------+
+| Announcements                  | announce@lists.frrouting.org |
++--------------------------------+------------------------------+
+| *Security*                     | security@lists.frrouting.org |
++--------------------------------+------------------------------+
+| *Technical Steering Committee* | tsc@lists.frrouting.org      |
++--------------------------------+------------------------------+
+
+The Development list is used to discuss and document general issues related to
+project development and governance. The public `Slack`_ instance and weekly
+technical meetings provide a higher bandwidth channel for discussions. The
+results of such discussions are reflected in updates, as appropriate, to code
+(i.e., merges), `GitHub issues`_ tracked issues, and for governance or process
+changes, updates to the Development list and either this file or information
+posted at `FRR`_.
+
+.. index:: Bug Reports
+.. index:: Bug hunting
+.. index:: Found a bug?
+.. index:: Reporting bugs
+.. index:: Reporting software errors
+.. index:: Errors in the software
+
+.. _bug-reports:
+
+Bug Reports
+===========
+
+If you think you have found a bug, please file a bug report on our
+`GitHub issues`_ page.
+
+When you send a bug report, please be careful about the points below.
+
+- Please note what kind of OS you are using.  If you use the IPv6 stack
+  please note that as well.
+- Please show us the results of `netstat -rn` and `ifconfig -a`.
+  Information from zebra's VTY command `show ip route` will also be
+  helpful.
+- Please send your configuration file with the report.  If you specify
+  arguments to the configure script please note that too.
+
+Bug reports help us improve FRR and are very much appreciated.
+
+.. _frr: |package-url|
+.. _github: https://github.com/frrouting/frr/
+.. _github issues: https://github.com/frrouting/frr/issues
+.. _slack: https://frrouting.slack.com/
diff --git a/doc/user/pim.rst b/doc/user/pim.rst
new file mode 100644 (file)
index 0000000..b994568
--- /dev/null
@@ -0,0 +1,409 @@
+.. _pim:
+
+***
+PIM
+***
+
+PIM -- Protocol Independent Multicast
+
+*pimd* supports pim-sm as well as igmp v2 and v3. pim is
+vrf aware and can work within the context of vrf's in order to
+do S,G mrouting.
+
+.. _starting-and-stopping-pimd:
+
+Starting and Stopping pimd
+==========================
+
+The default configuration file name of *pimd*'s is :file:`pimd.conf`. When
+invoked *pimd* searches directory |INSTALL_PREFIX_ETC|. If
+:file:`pimd.conf` is not there then next search current directory.
+
+*pimd* requires zebra for proper operation. Additionally *pimd* depends on
+routing properly setup and working in the network that it is working on.
+
+::
+
+   # zebra -d
+   # pimd -d
+
+
+Please note that *zebra* must be invoked before *pimd*.
+
+To stop *pimd* please use::
+
+   kill `cat /var/run/pimd.pid`
+
+Certain signals have special meanings to *pimd*.
+
++---------+---------------------------------------------------------------------+
+| Signal  | Meaning                                                             |
++=========+=====================================================================+
+| SIGUSR1 | Rotate the *pimd* logfile                                           |
++---------+---------------------------------------------------------------------+
+| SIGINT  | *pimd* sweeps all installed PIM mroutes then terminates gracefully. |
+| SIGTERM |                                                                     |
++---------+---------------------------------------------------------------------+
+
+*pimd* invocation options. Common options that can be specified
+(:ref:`common-invocation-options`).
+
+.. index:: ip pim rp A.B.C.D A.B.C.D/M
+.. clicmd:: ip pim rp A.B.C.D A.B.C.D/M
+
+   In order to use pim, it is necessary to configure a RP for join messages to
+   be sent to. Currently the only methodology to do this is via static rp
+   commands. All routers in the pim network must agree on these values. The
+   first ip address is the RP's address and the second value is the matching
+   prefix of group ranges covered. This command is vrf aware, to configure for
+   a vrf, enter the vrf submode.
+
+.. index:: ip pim spt-switchover infinity-and-beyond
+.. clicmd:: ip pim spt-switchover infinity-and-beyond
+
+   On the last hop router if it is desired to not switch over to the SPT tree.
+   Configure this command. This command is vrf aware, to configure for a vrf,
+   enter the vrf submode.
+
+.. index:: ip pim ecmp
+.. clicmd:: ip pim ecmp
+
+   If pim has the a choice of ECMP nexthops for a particular RPF, pim will
+   cause S,G flows to be spread out amongst the nexthops. If this command is
+   not specified then the first nexthop found will be used. This command is vrf
+   aware, to configure for a vrf, enter the vrf submode.
+
+.. index:: ip pim ecmp rebalance
+.. clicmd:: ip pim ecmp rebalance
+
+   If pim is using ECMP and an interface goes down, cause pim to rebalance all
+   S,G flows aross the remaining nexthops. If this command is not configured
+   pim only modifies those S,G flows that were using the interface that went
+   down. This command is vrf aware, to configure for a vrf, enter the vrf
+   submode.
+
+.. index:: ip pim join-prune-interval (60-600)
+.. clicmd:: ip pim join-prune-interval (60-600)
+
+   Modify the join/prune interval that pim uses to the new value. Time is
+   specified in seconds. This command is vrf aware, to configure for a vrf,
+   enter the vrf submode.
+
+.. index:: ip pim keep-alive-timer (31-60000)
+.. clicmd:: ip pim keep-alive-timer (31-60000)
+
+   Modify the time out value for a S,G flow from 31-60000 seconds. 31 seconds
+   is choosen for a lower bound because some hardware platforms cannot see data
+   flowing in better than 30 second chunks. This comand is vrf aware, to
+   configure for a vrf, enter the vrf submode.
+
+.. index:: ip pim packets (1-100)
+.. clicmd:: ip pim packets (1-100)
+
+   When processing packets from a neighbor process the number of packets
+   incoming at one time before moving on to the next task. The default value is
+   3 packets.  This command is only useful at scale when you can possibly have
+   a large number of pim control packets flowing. This command is vrf aware, to
+   configure for a vrf, enter the vrf submode.
+
+.. index:: ip pim register-suppress-time (5-60000)
+.. clicmd:: ip pim register-suppress-time (5-60000)
+
+   Modify the time that pim will register suppress a FHR will send register
+   notifications to the kernel. This command is vrf aware, to configure for a
+   vrf, enter the vrf submode.
+
+.. index:: ip pim send-v6-secondary
+.. clicmd:: ip pim send-v6-secondary
+
+   When sending pim hello packets tell pim to send any v6 secondary addresses
+   on the interface. This information is used to allow pim to use v6 nexthops
+   in it's decision for RPF lookup. This command is vrf aware, to configure for
+   a vrf, enter the vrf submode.
+
+.. index:: ip pim ssm prefix-list WORD
+.. clicmd:: ip pim ssm prefix-list WORD
+
+   Specify a range of group addresses via a prefix-list that forces pim to
+   never do SM over. This command is vrf aware, to configure for a vrf, enter
+   the vrf submode.
+
+.. index:: ip multicast rpf-lookup-mode WORD
+.. clicmd:: ip multicast rpf-lookup-mode WORD
+
+   Modify how PIM does RPF lookups in the zebra routing table.  You can use
+   these choices:
+
+   longer-prefix
+      Lookup the RPF in both tables using the longer prefix as a match
+
+   lower-distance
+      Lookup the RPF in both tables using the lower distance as a match
+
+   mrib-only
+      Lookup in the Multicast RIB only
+
+   mrib-then-urib
+      Lookup in the Multicast RIB then the Unicast Rib, returning first found.
+      This is the default value for lookup if this command is not entered
+
+   urib-only
+      Lookup in the Unicast Rib only.
+
+
+.. _pim-interface-configuration:
+
+PIM Interface Configuration
+===========================
+
+PIM interface commands allow you to configure an interface as either a Receiver
+or a interface that you would like to form pim neighbors on. If the interface
+is in a vrf, enter the interface command with the vrf keyword at the end.
+
+.. index:: ip pim bfd
+.. clicmd:: ip pim bfd
+
+   Turns on BFD support for PIM for this interface.
+
+.. index:: ip pim drpriority (1-4294967295)
+.. clicmd:: ip pim drpriority (1-4294967295)
+
+   Set the DR Priority for the interface. This command is useful to allow the
+   user to influence what node becomes the DR for a lan segment.
+
+.. index:: ip pim hello (1-180) (1-180)
+.. clicmd:: ip pim hello (1-180) (1-180)
+
+   Set the pim hello and hold interval for a interface.
+
+.. index:: ip pim sm
+.. clicmd:: ip pim sm
+
+   Tell pim that we would like to use this interface to form pim neighbors
+   over. Please note we will *not* accept igmp reports over this interface with
+   this command.
+
+.. index:: ip igmp
+.. clicmd:: ip igmp
+
+   Tell pim to receive IGMP reports and Query on this interface. The default
+   version is v3. This command is useful on the LHR.
+
+.. index:: ip igmp query-interval (1-1800)
+.. clicmd:: ip igmp query-interval (1-1800)
+
+   Set the IGMP query interval that PIM will use.
+
+.. index:: ip igmp query-max-response-time (10-250)
+.. clicmd:: ip igmp query-max-response-time (10-250)
+
+   Set the IGMP query response timeout value. If an report is not returned in
+   the specified time we will assume the S,G or \*,G has timed out.
+
+.. index:: ip igmp version (2-3)
+.. clicmd:: ip igmp version (2-3)
+
+   Set the IGMP version used on this interface. The default value is 3.
+
+.. index:: ip multicat boundary oil WORD
+.. clicmd:: ip multicat boundary oil WORD
+
+   Set a pim multicast boundary, based upon the WORD prefix-list. If a pim join
+   or IGMP report is received on this interface and the Group is denyed by the
+   prefix-list, PIM will ignore the join or report.
+
+.. _pim-multicast-rib-insertion:
+
+PIM Multicast RIB insertion::
+=============================
+
+In order to influence Multicast RPF lookup, it is possible to insert
+into zebra routes for the Multicast RIB. These routes are only
+used for RPF lookup and will not be used by zebra for insertion
+into the kernel *or* for normal rib processing. As such it is
+possible to create weird states with these commands. Use with
+caution. Most of the time this will not be necessary.
+
+.. index:: ip mroute A.B.C.D/M A.B.C.D (1-255)
+.. clicmd:: ip mroute A.B.C.D/M A.B.C.D (1-255)
+
+   Insert into the Multicast Rib Route A.B.C.D/M with specified nexthop. The
+   distance can be specified as well if desired.
+
+.. index:: ip mroute A.B.C.D/M INTERFACE (1-255)
+.. clicmd:: ip mroute A.B.C.D/M INTERFACE (1-255)
+
+   Insert into the Multicast Rib Route A.B.C.D/M using the specified INTERFACE.
+   The distance can be specified as well if desired.
+
+.. _show-pim-information:
+
+Show PIM Information
+====================
+
+All PIM show commands are vrf aware and typically allow you to insert a
+specified vrf command if information is desired about a specific vrf. If no
+vrf is specified then the default vrf is assumed. Finally the special keyword
+'all' allows you to look at all vrfs for the command. Naming a vrf 'all' will
+cause great confusion.
+
+.. index:: show ip multicast
+.. clicmd:: show ip multicast
+
+   Display various information about the interfaces used in this pim instance.
+
+.. index:: show ip mroute
+.. clicmd:: show ip mroute
+
+   Display information about installed into the kernel S,G mroutes.
+
+.. index:: show ip mroute count
+.. clicmd:: show ip mroute count
+
+   Display information about installed into the kernel S,G mroutes and in
+   addition display data about packet flow for the mroutes.
+
+.. index:: show ip pim assert
+.. clicmd:: show ip pim assert
+
+   Display information about asserts in the PIM system for S,G mroutes.
+
+.. index:: show ip pim assert-internal
+.. clicmd:: show ip pim assert-internal
+
+   Display internal assert state for S,G mroutes
+
+.. index:: show ip pim assert-metric
+.. clicmd:: show ip pim assert-metric
+
+   Display metric information about assert state for S,G mroutes
+
+.. index:: show ip pim assert-winner-metric
+.. clicmd:: show ip pim assert-winner-metric
+
+   Display winner metric for assert state for S,G mroutes
+
+.. index:: show ip pim group-type
+.. clicmd:: show ip pim group-type
+
+   Display SSM group ranges.
+
+.. index:: show ip pim interface
+.. clicmd:: show ip pim interface
+
+   Display information about interfaces PIM is using.
+
+.. index:: show ip pim join
+.. clicmd:: show ip pim join
+
+   Display information about PIM joins received.
+
+.. index:: show ip pim local-membership
+.. clicmd:: show ip pim local-membership
+
+   Display information about PIM interface local-membership.
+
+.. index:: show ip pim neighbor
+.. clicmd:: show ip pim neighbor
+
+   Display information about PIM neighbors.
+
+.. index:: show ip pim nexthop
+.. clicmd:: show ip pim nexthop
+
+   Display information about pim nexthops that are being used.
+
+.. index:: show ip pim nexthop-lookup
+.. clicmd:: show ip pim nexthop-lookup
+
+   Display information about a S,G pair and how the RPF would be choosen. This
+   is especially useful if there are ECMP's available from the RPF lookup.
+
+.. index:: show ip pim rp-info
+.. clicmd:: show ip pim rp-info
+
+   Display information about RP's that are configured on this router.
+
+.. index:: show ip pim rpf
+.. clicmd:: show ip pim rpf
+
+   Display information about currently being used S,G's and their RPF lookup
+   information. Additionally display some statistics about what has been
+   happening on the router.
+
+.. index:: show ip pim secondary
+.. clicmd:: show ip pim secondary
+
+   Display information about an interface and all the secondary addresses
+   associated with it.
+
+.. index:: show ip pim state
+.. clicmd:: show ip pim state
+
+   Display information about known S,G's and incoming interface as well as the
+   OIL and how they were choosen.
+
+.. index:: show ip pim upstream
+.. clicmd:: show ip pim upstream
+
+   Display upstream information about a S,G mroute.
+
+.. index:: show ip pim upstream-join-desired
+.. clicmd:: show ip pim upstream-join-desired
+
+{show PIM Information} {show ip pim upstream-join-desired} {}
+  Display upstream information for S,G's and if we desire to
+  join the mcast tree
+
+.. index:: show ip pim upstream-rpf
+.. clicmd:: show ip pim upstream-rpf
+
+   Display upstream information for S,G's and the RPF data associated with them.
+
+.. index:: show ip rpf
+.. clicmd:: show ip rpf
+
+   Display the multicast RIB created in zebra.
+
+PIM Debug Commands
+==================
+
+The debugging subsystem for PIM behaves in accordance with how FRR handles
+debugging. You can specify debugging at the enable cli mode as well as the
+configure cli mode. If you specify debug commands in the configuration cli
+mode, the debug commands can be persistent across restarts of the FRR pimd if
+the config was written out.
+
+.. index:: debug pim events
+.. clicmd:: debug pim events
+
+   This turns on debugging for PIM system events. Especially timers.
+
+.. index:: debug pim nht
+.. clicmd:: debug pim nht
+
+   This turns on debugging for PIM nexthop tracking. It will display
+   information about RPF lookups and information about when a nexthop changes.
+
+.. index:: debug pim packet-dump
+.. clicmd:: debug pim packet-dump
+
+   This turns on an extraordinary amount of data. Each pim packet sent and
+   received is dumped for debugging purposes. This should be considered a
+   developer only command.
+
+.. index:: debug pim packets
+.. clicmd:: debug pim packets
+
+   This turns on information about packet generation for sending and about
+   packet handling from a received packet.
+
+.. index:: debug pim trace
+.. clicmd:: debug pim trace
+
+   This traces pim code and how it is running.
+
+.. index:: debug pim zebra
+.. clicmd:: debug pim zebra
+
+   This gathers data about events from zebra that come up through the zapi.
diff --git a/doc/user/protocol.rst b/doc/user/protocol.rst
new file mode 100644 (file)
index 0000000..b474c12
--- /dev/null
@@ -0,0 +1,122 @@
+.. _zebra-protocol:
+
+**************
+Zebra Protocol
+**************
+
+Overview of the Zebra Protocol
+==============================
+
+Zebra Protocol is used by protocol daemons to communicate with the zebra
+daemon.
+
+Each protocol daemon may request and send information to and from the zebra
+daemon such as interface states, routing state, nexthop-validation, and so on.
+Protocol daemons may also install routes with zebra. The zebra daemon manages
+which route is installed into the forwarding table with the kernel.
+
+Zebra Protocol is a streaming protocol, with a common header. Two versions of
+the header are in use. Version 0 is implicitely versioned. Version 1 has an
+explicit version field. Version 0 can be distinguished from all other versions
+by examining the 3rd byte of the header, which contains a marker value for all
+versions bar version 0. The marker byte corresponds to the command field in
+version 0, and the marker value is a reserved command in version 0.
+
+We do not anticipate there will be further versions of the header for the
+foreseeable future, as the command field in version 1 is wide enough to allow
+for future extensions to done compatibly through seperate commands.
+
+Version 0 is used by all versions of GNU Zebra as of this writing, and versions
+of Quagga up to and including Quagga 0.98. Version 2 was created for 0.99.21 of
+Quagga. Version 3 designates VRF compatibility and was released in 1.0.
+Version 4 will be used as of FRR 2.0 to indicate that we are a different
+Routing Suite now and to hopefully prevent accidental Quagga <-> FRR issues.
+
+Zebra Protocol Definition
+=========================
+
+Zebra Protocol Header (version 0)
+----------------------------------
+
+::
+
+   0                   1                   2                   3
+   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+   +-------------------------------+---------------+
+   |           Length (2)          |   Command (1) |
+   +-------------------------------+---------------+
+
+
+Zebra Protocol Common Header (version 1)
+----------------------------------------
+
+::
+
+   0                   1                   2                   3
+   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+   +-------------------------------+---------------+-------------+
+   |           Length (2)          |   Marker (1)  | Version (1) |
+   +-------------------------------+---------------+-------------+
+   |          Command (2)          |
+   +-------------------------------+
+
+
+Zebra Protocol Header Field Definitions
+---------------------------------------
+
+Length
+   Total packet length including this header. The minimum length is 3 bytes for
+   version 0 messages and 6 bytes for version 1 messages.
+
+Marker
+   Static marker with a value of 255 always. This is to allow version 0 Zserv
+   headers (which do not include version explicitly) to be distinguished from
+   versioned headers. Not present in version 0 messages.
+
+Version
+   Version number of the Zserv message. Clients should not continue processing
+   messages past the version field for versions they do not recognise. Not
+   present in version 0 messages.
+
+Command
+   The Zebra Protocol command.
+
+
+Zebra Protocol Commands
+-----------------------
+
++-----------------------------------+-------+
+| Command                           | Value |
++===================================+=======+
+| ZEBRA_INTERFACE_ADD               | 1     |
++-----------------------------------+-------+
+| ZEBRA_INTERFACE_DELETE            | 2     |
++-----------------------------------+-------+
+| ZEBRA_INTERFACE_ADDRESS_ADD       | 3     |
++-----------------------------------+-------+
+| ZEBRA_INTERFACE_ADDRESS_DELETE    | 4     |
++-----------------------------------+-------+
+| ZEBRA_INTERFACE_UP                | 5     |
++-----------------------------------+-------+
+| ZEBRA_INTERFACE_DOWN              | 6     |
++-----------------------------------+-------+
+| ZEBRA_IPV4_ROUTE_ADD              | 7     |
++-----------------------------------+-------+
+| ZEBRA_IPV4_ROUTE_DELETE           | 8     |
++-----------------------------------+-------+
+| ZEBRA_IPV6_ROUTE_ADD              | 9     |
++-----------------------------------+-------+
+| ZEBRA_IPV6_ROUTE_DELETE           | 10    |
++-----------------------------------+-------+
+| ZEBRA_REDISTRIBUTE_ADD            | 11    |
++-----------------------------------+-------+
+| ZEBRA_REDISTRIBUTE_DELETE         | 12    |
++-----------------------------------+-------+
+| ZEBRA_REDISTRIBUTE_DEFAULT_ADD    | 13    |
++-----------------------------------+-------+
+| ZEBRA_REDISTRIBUTE_DEFAULT_DELETE | 14    |
++-----------------------------------+-------+
+| ZEBRA_IPV4_NEXTHOP_LOOKUP         | 15    |
++-----------------------------------+-------+
+| ZEBRA_IPV6_NEXTHOP_LOOKUP         | 16    |
++-----------------------------------+-------+
diff --git a/doc/user/ripd.rst b/doc/user/ripd.rst
new file mode 100644 (file)
index 0000000..b8cbd16
--- /dev/null
@@ -0,0 +1,695 @@
+.. _rip:
+
+***
+RIP
+***
+
+RIP -- Routing Information Protocol is widely deployed interior gateway
+protocol. RIP was developed in the 1970s at Xerox Labs as part of the
+XNS routing protocol. RIP is a :term:`distance-vector` protocol and is
+based on the :term:`Bellman-Ford` algorithms. As a distance-vector
+protocol, RIP router send updates to its neighbors periodically, thus
+allowing the convergence to a known topology. In each update, the
+distance to any given network will be broadcasted to its neighboring
+router.
+
+*ripd* supports RIP version 2 as described in RFC2453 and RIP
+version 1 as described in RFC1058.
+
+.. _starting-and-stopping-ripd:
+
+Starting and Stopping ripd
+==========================
+
+The default configuration file name of *ripd*'s is :file:`ripd.conf`. When
+invocation *ripd* searches directory |INSTALL_PREFIX_ETC|. If :file:`ripd.conf`
+is not there next search current directory.
+
+RIP uses UDP port 520 to send and receive RIP packets. So the user must have
+the capability to bind the port, generally this means that the user must have
+superuser privileges. RIP protocol requires interface information maintained by
+*zebra* daemon. So running *zebra* is mandatory to run *ripd*. Thus minimum
+sequence for running RIP is like below:
+
+::
+
+  # zebra -d
+  # ripd -d
+
+
+Please note that *zebra* must be invoked before *ripd*.
+
+To stop *ripd*. Please use::
+   kill `cat /var/run/ripd.pid`
+
+Certain signals have special meaningss to *ripd*.
+
+ +-------------+------------------------------------------------------+
+ | Signal      | Action                                               |
+ +=============+======================================================+
+ | ``SIGHUP``  | Reload configuration file :file:`ripd.conf`.         |
+ |             | All configurations are reset. All routes learned     |
+ |             | so far are cleared and removed from routing table.   |
+ +-------------+------------------------------------------------------+
+ | ``SIGUSR1`` | Rotate the *ripd* logfile.                           |
+ +-------------+------------------------------------------------------+
+ | ``SIGINT``  |                                                      |
+ | ``SIGTERM`` | Sweep all installed routes and gracefully terminate. |
+ +-------------+------------------------------------------------------+
+
+*ripd* invocation options. Common options that can be specified
+(:ref:`common-invocation-options`).
+
+.. option:: -r
+.. option:: --retain
+
+   When the program terminates, retain routes added by *ripd*.
+
+.. _rip-netmask:
+
+RIP netmask
+-----------
+
+The netmask features of *ripd* support both version 1 and version 2 of RIP.
+Version 1 of RIP originally contained no netmask information. In RIP version 1,
+network classes were originally used to determine the size of the netmask.
+Class A networks use 8 bits of mask, Class B networks use 16 bits of masks,
+while Class C networks use 24 bits of mask. Today, the most widely used method
+of a network mask is assigned to the packet on the basis of the interface that
+received the packet.  Version 2 of RIP supports a variable length subnet mask
+(VLSM). By extending the subnet mask, the mask can be divided and reused. Each
+subnet can be used for different purposes such as large to middle size LANs and
+WAN links. FRR *ripd* does not support the non-sequential netmasks that are
+included in RIP Version 2.
+
+In a case of similar information with the same prefix and metric, the old
+information will be suppressed. Ripd does not currently support equal cost
+multipath routing.
+
+.. _rip-configuration:
+
+RIP Configuration
+=================
+
+.. index:: router rip
+.. clicmd:: router rip
+
+   The `router rip` command is necessary to enable RIP. To disable RIP, use the
+   `no router rip` command. RIP must be enabled before carrying out any of the
+   RIP commands.
+
+.. index:: no router rip
+.. clicmd:: no router rip
+
+   Disable RIP.
+
+.. index:: network NETWORK
+.. clicmd:: network NETWORK
+
+.. index:: no network NETWORK
+.. clicmd:: no network NETWORK
+
+   Set the RIP enable interface by NETWORK. The interfaces which have addresses
+   matching with NETWORK are enabled.
+
+   This group of commands either enables or disables RIP interfaces between
+   certain numbers of a specified network address. For example, if the network
+   for 10.0.0.0/24 is RIP enabled, this would result in all the addresses from
+   10.0.0.0 to 10.0.0.255 being enabled for RIP. The `no network` command will
+   disable RIP for the specified network.
+
+.. index:: network IFNAME
+.. clicmd:: network IFNAME
+
+.. index:: no network IFNAME
+.. clicmd:: no network IFNAME
+
+   Set a RIP enabled interface by IFNAME. Both the sending and
+   receiving of RIP packets will be enabled on the port specified in the
+   `network ifname` command. The `no network ifname` command will disable
+   RIP on the specified interface.
+
+.. index:: neighbor A.B.C.D
+.. clicmd:: neighbor A.B.C.D
+
+.. index:: no neighbor A.B.C.D
+.. clicmd:: no neighbor A.B.C.D
+
+   Specify RIP neighbor. When a neighbor doesn't understand multicast, this
+   command is used to specify neighbors. In some cases, not all routers will be
+   able to understand multicasting, where packets are sent to a network or a
+   group of addresses. In a situation where a neighbor cannot process multicast
+   packets, it is necessary to establish a direct link between routers. The
+   neighbor command allows the network administrator to specify a router as a
+   RIP neighbor. The `no neighbor a.b.c.d` command will disable the RIP
+   neighbor.
+
+   Below is very simple RIP configuration. Interface `eth0` and interface which
+   address match to `10.0.0.0/8` are RIP enabled.
+
+   ::
+
+      !
+      router rip
+       network 10.0.0.0/8
+       network eth0
+      !
+
+
+.. index:: passive-interface (IFNAME|default)
+.. clicmd:: passive-interface (IFNAME|default)
+
+.. index:: no passive-interface IFNAME
+.. clicmd:: no passive-interface IFNAME
+
+   This command sets the specified interface to passive mode. On passive mode
+   interface, all receiving packets are processed as normal and ripd does not
+   send either multicast or unicast RIP packets except to RIP neighbors
+   specified with `neighbor` command. The interface may be specified as
+   `default` to make ripd default to passive on all interfaces.
+
+   The default is to be passive on all interfaces.
+
+.. index:: ip split-horizon
+.. clicmd:: ip split-horizon
+
+.. index:: no ip split-horizon
+.. clicmd:: no ip split-horizon
+
+   Control split-horizon on the interface. Default is `ip split-horizon`. If
+   you don't perform split-horizon on the interface, please specify `no ip
+   split-horizon`.
+
+.. _rip-version-control:
+
+RIP Version Control
+===================
+
+RIP can be configured to send either Version 1 or Version 2 packets.  The
+default is to send RIPv2 while accepting both RIPv1 and RIPv2 (and replying
+with packets of the appropriate version for REQUESTS / triggered updates). The
+version to receive and send can be specified globally, and further overriden on
+a per-interface basis if needs be for send and receive seperately (see below).
+
+It is important to note that RIPv1 cannot be authenticated. Further, if RIPv1
+is enabled then RIP will reply to REQUEST packets, sending the state of its RIP
+routing table to any remote routers that ask on demand. For a more detailed
+discussion on the security implications of RIPv1 see :ref:`rip-authentication`.
+
+.. index:: version VERSION
+.. clicmd:: version VERSION
+
+   Set RIP version to accept for reads and send. ``VERSION`` can be either 1 or
+   1.
+
+   Disabling RIPv1 by specifying version 2 is STRONGLY encouraged,
+   :ref:`rip-authentication`. This may become the default in a future release.
+
+   Default: Send Version 2, and accept either version.
+
+.. index:: no version
+.. clicmd:: no version
+
+   Reset the global version setting back to the default.
+
+.. index:: ip rip send version VERSION
+.. clicmd:: ip rip send version VERSION
+
+   VERSION can be ``1``, ``2``, or ``1 2``.
+
+   This interface command overrides the global rip version setting, and selects
+   which version of RIP to send packets with, for this interface specifically.
+   Choice of RIP Version 1, RIP Version 2, or both versions. In the latter
+   case, where ``1 2`` is specified, packets will be both broadcast and
+   multicast.
+
+   Default: Send packets according to the global version (version 2)
+
+.. index:: ip rip receive version VERSION
+.. clicmd:: ip rip receive version VERSION
+
+   VERSION can be ``1``, ``2``, or ``1 2``.
+
+   This interface command overrides the global rip version setting, and selects
+   which versions of RIP packets will be accepted on this interface. Choice of
+   RIP Version 1, RIP Version 2, or both.
+
+   Default: Accept packets according to the global setting (both 1 and 2).
+
+.. _how-to-announce-rip-route:
+
+How to Announce RIP route
+=========================
+
+.. index:: redistribute kernel
+.. clicmd:: redistribute kernel
+
+.. index:: redistribute kernel metric (0-16)
+.. clicmd:: redistribute kernel metric (0-16)
+
+.. index:: redistribute kernel route-map ROUTE-MAP
+.. clicmd:: redistribute kernel route-map ROUTE-MAP
+
+.. index:: no redistribute kernel
+.. clicmd:: no redistribute kernel
+
+   `redistribute kernel` redistributes routing information from kernel route
+   entries into the RIP tables. `no redistribute kernel` disables the routes.
+
+.. index:: redistribute static
+.. clicmd:: redistribute static
+
+.. index:: redistribute static metric (0-16)
+.. clicmd:: redistribute static metric (0-16)
+
+.. index:: redistribute static route-map ROUTE-MAP
+.. clicmd:: redistribute static route-map ROUTE-MAP
+
+.. index:: no redistribute static
+.. clicmd:: no redistribute static
+
+   `redistribute static` redistributes routing information from static route
+   entries into the RIP tables. `no redistribute static` disables the routes.
+
+.. index:: redistribute connected
+.. clicmd:: redistribute connected
+
+.. index:: redistribute connected metric (0-16)
+.. clicmd:: redistribute connected metric (0-16)
+
+.. index:: redistribute connected route-map ROUTE-MAP
+.. clicmd:: redistribute connected route-map ROUTE-MAP
+
+.. index:: no redistribute connected
+.. clicmd:: no redistribute connected
+
+   Redistribute connected routes into the RIP tables. `no redistribute
+   connected` disables the connected routes in the RIP tables.  This command
+   redistribute connected of the interface which RIP disabled.  The connected
+   route on RIP enabled interface is announced by default.
+
+.. index:: redistribute ospf
+.. clicmd:: redistribute ospf
+
+.. index:: redistribute ospf metric (0-16)
+.. clicmd:: redistribute ospf metric (0-16)
+
+.. index:: redistribute ospf route-map ROUTE-MAP
+.. clicmd:: redistribute ospf route-map ROUTE-MAP
+
+.. index:: no redistribute ospf
+.. clicmd:: no redistribute ospf
+
+   `redistribute ospf` redistributes routing information from ospf route
+   entries into the RIP tables. `no redistribute ospf` disables the routes.
+
+.. index:: redistribute bgp
+.. clicmd:: redistribute bgp
+
+.. index:: redistribute bgp metric (0-16)
+.. clicmd:: redistribute bgp metric (0-16)
+
+.. index:: redistribute bgp route-map ROUTE-MAP
+.. clicmd:: redistribute bgp route-map ROUTE-MAP
+
+.. index:: no redistribute bgp
+.. clicmd:: no redistribute bgp
+
+   `redistribute bgp` redistributes routing information from bgp route entries
+   into the RIP tables. `no redistribute bgp` disables the routes.
+
+   If you want to specify RIP only static routes:
+
+.. index:: default-information originate
+.. clicmd:: default-information originate
+
+.. index:: route A.B.C.D/M
+.. clicmd:: route A.B.C.D/M
+
+.. index:: no route A.B.C.D/M
+.. clicmd:: no route A.B.C.D/M
+
+   This command is specific to FRR. The `route` command makes a static route
+   only inside RIP. This command should be used only by advanced users who are
+   particularly knowledgeable about the RIP protocol. In most cases, we
+   recommend creating a static route in FRR and redistributing it in RIP using
+   `redistribute static`.
+
+.. _filtering-rip-routes:
+
+Filtering RIP Routes
+====================
+
+RIP routes can be filtered by a distribute-list.
+
+.. index:: distribute-list ACCESS_LIST DIRECT IFNAME
+.. clicmd:: distribute-list ACCESS_LIST DIRECT IFNAME
+
+   You can apply access lists to the interface with a `distribute-list` command.
+   ACCESS_LIST is the access list name. DIRECT is ``in`` or ``out``. If DIRECT
+   is ``in`` the access list is applied to input packets.
+
+   The `distribute-list` command can be used to filter the RIP path.
+   `distribute-list` can apply access-lists to a chosen interface.  First, one
+   should specify the access-list. Next, the name of the access-list is used in
+   the distribute-list command. For example, in the following configuration
+   ``eth0`` will permit only the paths that match the route 10.0.0.0/8
+
+   ::
+
+       !
+       router rip
+        distribute-list private in eth0
+       !
+       access-list private permit 10 10.0.0.0/8
+       access-list private deny any
+       !
+
+
+   `distribute-list` can be applied to both incoming and outgoing data.
+
+.. index:: distribute-list prefix PREFIX_LIST (in|out) IFNAME
+.. clicmd:: distribute-list prefix PREFIX_LIST (in|out) IFNAME
+
+   You can apply prefix lists to the interface with a `distribute-list`
+   command. PREFIX_LIST is the prefix list name. Next is the direction of
+   ``in`` or ``out``. If DIRECT is ``in`` the access list is applied to input
+   packets.
+
+.. _rip-metric-manipulation:
+
+RIP Metric Manipulation
+=======================
+
+RIP metric is a value for distance for the network. Usually
+*ripd* increment the metric when the network information is
+received. Redistributed routes' metric is set to 1.
+
+.. index:: default-metric (1-16)
+.. clicmd:: default-metric (1-16)
+
+.. index:: no default-metric (1-16)
+.. clicmd:: no default-metric (1-16)
+
+   This command modifies the default metric value for redistributed routes.
+   The default value is 1. This command does not affect connected route even if
+   it is redistributed by *redistribute connected*. To modify connected route's
+   metric value, please use ``redistribute connected metric`` or *route-map*.
+   *offset-list* also affects connected routes.
+
+.. index:: offset-list ACCESS-LIST (in|out)
+.. clicmd:: offset-list ACCESS-LIST (in|out)
+
+.. index:: offset-list ACCESS-LIST (in|out) IFNAME
+.. clicmd:: offset-list ACCESS-LIST (in|out) IFNAME
+
+
+.. _rip-distance:
+
+RIP distance
+============
+
+Distance value is used in zebra daemon. Default RIP distance is 120.
+
+.. index:: distance (1-255)
+.. clicmd:: distance (1-255)
+
+.. index:: no distance (1-255)
+.. clicmd:: no distance (1-255)
+
+   Set default RIP distance to specified value.
+
+.. index:: distance (1-255) A.B.C.D/M
+.. clicmd:: distance (1-255) A.B.C.D/M
+
+.. index:: no distance (1-255) A.B.C.D/M
+.. clicmd:: no distance (1-255) A.B.C.D/M
+
+   Set default RIP distance to specified value when the route's source IP
+   address matches the specified prefix.
+
+.. index:: distance (1-255) A.B.C.D/M ACCESS-LIST
+.. clicmd:: distance (1-255) A.B.C.D/M ACCESS-LIST
+
+.. index:: no distance (1-255) A.B.C.D/M ACCESS-LIST
+.. clicmd:: no distance (1-255) A.B.C.D/M ACCESS-LIST
+
+   Set default RIP distance to specified value when the route's source IP
+   address matches the specified prefix and the specified access-list.
+
+.. _rip-route-map:
+
+RIP route-map
+=============
+
+Usage of *ripd*'s route-map support.
+
+Optional argument route-map MAP_NAME can be added to each `redistribute`
+statement.
+
+::
+
+  redistribute static [route-map MAP_NAME]
+  redistribute connected [route-map MAP_NAME]
+  .....
+
+
+Cisco applies route-map _before_ routes will exported to rip route table.  In
+current FRR's test implementation, *ripd* applies route-map after routes are
+listed in the route table and before routes will be announced to an interface
+(something like output filter). I think it is not so clear, but it is draft and
+it may be changed at future.
+
+Route-map statement (:ref:`route-map`) is needed to use route-map
+functionality.
+
+.. index:: match interface WORD
+.. clicmd:: match interface WORD
+
+   This command match to incoming interface. Notation of this match is
+   different from Cisco. Cisco uses a list of interfaces - NAME1 NAME2 ...
+   NAMEN. Ripd allows only one name (maybe will change in the future). Next -
+   Cisco means interface which includes next-hop of routes (it is somewhat
+   similar to "ip next-hop" statement). Ripd means interface where this route
+   will be sent. This difference is because "next-hop" of same routes which
+   sends to different interfaces must be different. Maybe it'd be better to
+   made new matches - say "match interface-out NAME" or something like that.
+
+.. index:: match ip address WORD
+.. clicmd:: match ip address WORD
+
+.. index:: match ip address prefix-list WORD
+.. clicmd:: match ip address prefix-list WORD
+
+   Match if route destination is permitted by access-list.
+
+.. index:: match ip next-hop WORD
+.. clicmd:: match ip next-hop WORD
+
+.. index:: match ip next-hop prefix-list WORD
+.. clicmd:: match ip next-hop prefix-list WORD
+
+   Match if route next-hop (meaning next-hop listed in the rip route-table as
+   displayed by "show ip rip") is permitted by access-list.
+
+.. index:: match metric (0-4294967295)
+.. clicmd:: match metric (0-4294967295)
+
+   This command match to the metric value of RIP updates. For other protocol
+   compatibility metric range is shown as (0-4294967295). But for RIP protocol
+   only the value range (0-16) make sense.
+
+.. index:: set ip next-hop A.B.C.D
+.. clicmd:: set ip next-hop A.B.C.D
+
+   This command set next hop value in RIPv2 protocol. This command does not
+   affect RIPv1 because there is no next hop field in the packet.
+
+.. index:: set metric (0-4294967295)
+.. clicmd:: set metric (0-4294967295)
+
+   Set a metric for matched route when sending announcement. The metric value
+   range is very large for compatibility with other protocols. For RIP, valid
+   metric values are from 1 to 16.
+
+.. _rip-authentication:
+
+RIP Authentication
+==================
+
+RIPv2 allows packets to be authenticated via either an insecure plain
+text password, included with the packet, or via a more secure MD5 based
+:abbr:`HMAC (keyed-Hashing for Message AuthentiCation)`,
+RIPv1 can not be authenticated at all, thus when authentication is
+configured `ripd` will discard routing updates received via RIPv1
+packets.
+
+However, unless RIPv1 reception is disabled entirely,
+:ref:`rip-version-control`, RIPv1 REQUEST packets which are received,
+which query the router for routing information, will still be honoured
+by `ripd`, and `ripd` WILL reply to such packets. This allows
+`ripd` to honour such REQUESTs (which sometimes is used by old
+equipment and very simple devices to bootstrap their default route),
+while still providing security for route updates which are received.
+
+In short: Enabling authentication prevents routes being updated by
+unauthenticated remote routers, but still can allow routes (I.e. the
+entire RIP routing table) to be queried remotely, potentially by anyone
+on the internet, via RIPv1.
+
+To prevent such unauthenticated querying of routes disable RIPv1,
+:ref:`rip-version-control`.
+
+.. index:: ip rip authentication mode md5
+.. clicmd:: ip rip authentication mode md5
+
+.. index:: no ip rip authentication mode md5
+.. clicmd:: no ip rip authentication mode md5
+
+   Set the interface with RIPv2 MD5 authentication.
+
+.. index:: ip rip authentication mode text
+.. clicmd:: ip rip authentication mode text
+
+.. index:: no ip rip authentication mode text
+.. clicmd:: no ip rip authentication mode text
+
+   Set the interface with RIPv2 simple password authentication.
+
+.. index:: ip rip authentication string STRING
+.. clicmd:: ip rip authentication string STRING
+
+.. index:: no ip rip authentication string STRING
+.. clicmd:: no ip rip authentication string STRING
+
+   RIP version 2 has simple text authentication. This command sets
+   authentication string. The string must be shorter than 16 characters.
+
+.. index:: ip rip authentication key-chain KEY-CHAIN
+.. clicmd:: ip rip authentication key-chain KEY-CHAIN
+
+.. index:: no ip rip authentication key-chain KEY-CHAIN
+.. clicmd:: no ip rip authentication key-chain KEY-CHAIN
+
+   Specifiy Keyed MD5 chain.
+
+::
+
+    !
+    key chain test
+     key 1
+      key-string test
+    !
+    interface eth1
+     ip rip authentication mode md5
+     ip rip authentication key-chain test
+    !
+
+
+.. _rip-timers:
+
+RIP Timers
+==========
+
+.. index:: timers basic UPDATE TIMEOUT GARBAGE
+.. clicmd:: timers basic UPDATE TIMEOUT GARBAGE
+
+
+   RIP protocol has several timers. User can configure those timers' values
+   by `timers basic` command.
+
+   The default settings for the timers are as follows:
+
+   - The update timer is 30 seconds. Every update timer seconds, the RIP
+     process is awakened to send an unsolicited Response message containing
+     the complete routing table to all neighboring RIP routers.
+   - The timeout timer is 180 seconds. Upon expiration of the timeout, the
+     route is no longer valid; however, it is retained in the routing table
+     for a short time so that neighbors can be notified that the route has
+     been dropped.
+   - The garbage collect timer is 120 seconds. Upon expiration of the
+     garbage-collection timer, the route is finally removed from the routing
+     table.
+
+   The ``timers basic`` command allows the the default values of the timers
+   listed above to be changed.
+
+.. index:: no timers basic
+.. clicmd:: no timers basic
+
+   The `no timers basic` command will reset the timers to the default settings
+   listed above.
+
+.. _show-rip-information:
+
+Show RIP Information
+====================
+
+To display RIP routes.
+
+.. index:: show ip rip
+.. clicmd:: show ip rip
+
+   Show RIP routes.
+
+The command displays all RIP routes. For routes that are received
+through RIP, this command will display the time the packet was sent and
+the tag information. This command will also display this information
+for routes redistributed into RIP.
+
+.. index:: show ip rip status
+.. clicmd:: show ip rip status
+
+   The command displays current RIP status. It includes RIP timer,
+   filtering, version, RIP enabled interface and RIP peer inforation.
+
+::
+
+   ripd> **show ip rip status**
+   Routing Protocol is "rip"
+     Sending updates every 30 seconds with +/-50%, next due in 35 seconds
+     Timeout after 180 seconds, garbage collect after 120 seconds
+     Outgoing update filter list for all interface is not set
+     Incoming update filter list for all interface is not set
+     Default redistribution metric is 1
+     Redistributing: kernel connected
+     Default version control: send version 2, receive version 2
+       Interface  Send  Recv
+     Routing for Networks:
+       eth0
+       eth1
+       1.1.1.1
+       203.181.89.241
+     Routing Information Sources:
+       Gateway    BadPackets BadRoutes  Distance Last Update
+
+
+RIP Debug Commands
+==================
+
+Debug for RIP protocol.
+
+.. index:: debug rip events
+.. clicmd:: debug rip events
+
+   Shows RIP events. Sending and receiving packets, timers, and changes in
+   interfaces are events shown with *ripd*.
+
+.. index:: debug rip packet
+.. clicmd:: debug rip packet
+
+   Shows display detailed information about the RIP packets. The origin and
+   port number of the packet as well as a packet dump is shown.
+
+.. index:: debug rip zebra
+.. clicmd:: debug rip zebra
+
+   This command will show the communication between *ripd* and *zebra*. The
+   main information will include addition and deletion of paths to the kernel
+   and the sending and receiving of interface information.
+
+.. index:: show debugging rip
+.. clicmd:: show debugging rip
+
+   Shows all information currently set for ripd debug.
+
diff --git a/doc/user/ripngd.rst b/doc/user/ripngd.rst
new file mode 100644 (file)
index 0000000..ae2400f
--- /dev/null
@@ -0,0 +1,89 @@
+.. _ripng:
+
+*****
+RIPng
+*****
+
+*ripngd* supports the RIPng protocol as described in :rfc:`2080`. It's an IPv6
+reincarnation of the RIP protocol.
+
+.. _invoking-ripngd:
+
+Invoking ripngd
+===============
+
+There are no `ripngd` specific invocation options. Common options can be
+specified (:ref:`common-invocation-options`).
+
+.. _ripngd-configuration:
+
+ripngd Configuration
+====================
+
+Currently ripngd supports the following commands:
+
+.. index:: router ripng
+.. clicmd:: router ripng
+
+   Enable RIPng.
+
+.. index:: flush_timer TIME
+.. clicmd:: flush_timer TIME
+
+   Set flush timer.
+
+.. index:: network NETWORK
+.. clicmd:: network NETWORK
+
+   Set RIPng enabled interface by NETWORK.
+
+.. index:: network IFNAME
+.. clicmd:: network IFNAME
+
+   Set RIPng enabled interface by IFNAME.
+
+.. index:: route NETWORK
+.. clicmd:: route NETWORK
+
+   Set RIPng static routing announcement of NETWORK.
+
+.. index:: router zebra
+.. clicmd:: router zebra
+
+   This command is the default and does not appear in the configuration. With
+   this statement, RIPng routes go to the *zebra* daemon.
+
+.. _ripngd-terminal-mode-commands:
+
+ripngd Terminal Mode Commands
+=============================
+
+.. index:: show ip ripng
+.. clicmd:: show ip ripng
+
+.. index:: show debugging ripng
+.. clicmd:: show debugging ripng
+
+.. index:: debug ripng events
+.. clicmd:: debug ripng events
+
+.. index:: debug ripng packet
+.. clicmd:: debug ripng packet
+
+.. index:: debug ripng zebra
+.. clicmd:: debug ripng zebra
+
+
+ripngd Filtering Commands
+=========================
+
+.. index:: distribute-list ACCESS_LIST (in|out) IFNAME
+.. clicmd:: distribute-list ACCESS_LIST (in|out) IFNAME
+
+   You can apply an access-list to the interface using the `distribute-list`
+   command. ACCESS_LIST is an access-list name. `direct` is ``in`` or
+   ``out``. If `direct` is ``in``, the access-list is applied only to incoming
+   packets.::
+
+      distribute-list local-only out sit1
+
diff --git a/doc/user/routemap.rst b/doc/user/routemap.rst
new file mode 100644 (file)
index 0000000..acf63a6
--- /dev/null
@@ -0,0 +1,287 @@
+.. _route-map:
+
+**********
+Route Maps
+**********
+
+Route maps provide a means to both filter and/or apply actions to route, hence
+allowing policy to be applied to routes.
+
+Route maps are an ordered list of route map entries. Each entry may specify up
+to four distincts sets of clauses:
+
+.. glossary::
+
+   Matching Conditions
+      A route-map entry may, optionally, specify one or more conditions which
+      must be matched if the entry is to be considered further, as governed by
+      the Match Policy. If a route-map entry does not explicitely specify any
+      matching conditions, then it always matches.
+
+   Set Actions
+      A route-map entry may, optionally, specify one or more Set Actions to set
+      or modify attributes of the route.
+
+   Matching Policy
+      This specifies the policy implied if the :term:`Matching Conditions` are
+      met or not met, and which actions of the route-map are to be taken, if
+      any. The two possibilities are:
+
+      - :dfn:`permit`: If the entry matches, then carry out the
+        :term:`Set Actions`. Then finish processing the route-map, permitting
+        the route, unless an :term:`Exit Policy` action indicates otherwise.
+
+      - :dfn:`deny`: If the entry matches, then finish processing the route-map and
+        deny the route (return `deny`).
+
+      The `Matching Policy` is specified as part of the command which defines
+      the ordered entry in the route-map. See below.
+
+   Call Action
+      Call to another route-map, after any :term:`Set Actions` have been carried out.
+      If the route-map called returns `deny` then processing of the route-map
+      finishes and the route is denied, regardless of the :term:Matching Policy` or
+      the :term:`Exit Policy`. If the called route-map returns `permit`, then
+      :term:`Matching Policy` and :term:`Exit Policy` govern further behaviour, as normal.
+
+   Exit Policy
+      An entry may, optionally, specify an alternative :dfn:`Exit Policy` to
+      take if the entry matched, rather than the normal policy of exiting the
+      route-map and permitting the route. The two possibilities are:
+
+      - :dfn:`next`: Continue on with processing of the route-map entries.
+
+      - :dfn:`goto N`: Jump ahead to the first route-map entry whose order in
+        the route-map is >= N. Jumping to a previous entry is not permitted.
+
+The default action of a route-map, if no entries match, is to deny.  I.e. a
+route-map essentially has as its last entry an empty *deny* entry, which
+matches all routes. To change this behaviour, one must specify an empty
+*permit* entry as the last entry in the route-map.
+
+To summarise the above:
+
++--------+--------+----------+
+|        | Match  | No Match |
++========+========+==========+
+| Permit | action | cont     |
++--------+--------+----------+
+| Deny   | deny   | cont     |
++--------+--------+----------+
+
+action
+   - Apply *set* statements
+   - If *call* is present, call given route-map. If that returns a ``deny``,
+     finish processing and return ``deny``.
+   - If *Exit Policy* is *next*, goto next route-map entry
+   - If *Exit Policy* is *goto*, goto first entry whose order in the
+     list is >= the given order.
+   - Finish processing the route-map and permit the route.
+
+deny
+   The route is denied by the route-map (return ``deny``).
+
+cont
+   goto next route-map entry
+
+.. _route-map-command:
+
+Route Map Command
+=================
+
+.. index:: route-map ROUTE-MAP-NAME (permit|deny) ORDER
+.. clicmd:: route-map ROUTE-MAP-NAME (permit|deny) ORDER
+
+   Configure the `order`'th entry in `route-map-name` with ``Match Policy`` of
+   either *permit* or *deny*.
+
+.. _route-map-match-command:
+
+Route Map Match Command
+=======================
+
+.. index:: match ip address ACCESS_LIST
+.. clicmd:: match ip address ACCESS_LIST
+
+   Matches the specified `access_list`
+
+.. index:: match ip address PREFIX-LIST
+.. clicmd:: match ip address PREFIX-LIST
+
+   Matches the specified `prefix-list`
+
+.. index:: match ip address prefix-len 0-32
+.. clicmd:: match ip address prefix-len 0-32
+
+   Matches the specified `prefix-len`. This is a Zebra specific command.
+
+.. index:: match ipv6 address ACCESS_LIST
+.. clicmd:: match ipv6 address ACCESS_LIST
+
+   Matches the specified `access_list`
+
+.. index:: match ipv6 address PREFIX-LIST
+.. clicmd:: match ipv6 address PREFIX-LIST
+
+   Matches the specified `prefix-list`
+
+.. index:: match ipv6 address prefix-len 0-128
+.. clicmd:: match ipv6 address prefix-len 0-128
+
+   Matches the specified `prefix-len`. This is a Zebra specific command.
+
+.. index:: match ip next-hop IPV4_ADDR
+.. clicmd:: match ip next-hop IPV4_ADDR
+
+   Matches the specified `ipv4_addr`.
+
+.. index:: match aspath AS_PATH
+.. clicmd:: match aspath AS_PATH
+
+   Matches the specified `as_path`.
+
+.. index:: match metric METRIC
+.. clicmd:: match metric METRIC
+
+   Matches the specified `metric`.
+
+.. index:: match tag TAG
+.. clicmd:: match tag TAG
+
+   Matches the specified tag value associated with the route. This tag value
+   can be in the range of (1-4294967295).
+
+.. index:: match local-preference METRIC
+.. clicmd:: match local-preference METRIC
+
+   Matches the specified `local-preference`.
+
+.. index:: match community COMMUNITY_LIST
+.. clicmd:: match community COMMUNITY_LIST
+
+   Matches the specified  `community_list`
+
+.. index:: match peer IPV4_ADDR
+.. clicmd:: match peer IPV4_ADDR
+
+   This is a BGP specific match command. Matches the peer ip address
+   if the neighbor was specified in this manner.
+
+.. index:: match peer IPV6_ADDR
+.. clicmd:: match peer IPV6_ADDR
+
+   This is a BGP specific match command. Matches the peer ipv6
+   address if the neighbor was specified in this manner.
+
+.. index:: match peer INTERFACE_NAME
+.. clicmd:: match peer INTERFACE_NAME
+
+  This is a BGP specific match command. Matches the peer
+  interface name specified if the neighbor was specified
+  in this manner.
+
+.. _route-map-set-command:
+
+Route Map Set Command
+=====================
+
+.. program:: configure
+
+.. index:: set tag TAG
+.. clicmd:: set tag TAG
+
+   Set a tag on the matched route. This tag value can be from (1-4294967295).
+   Additionally if you have compiled with the :option:`--enable-realms`
+   configure option. Tag values from (1-255) are sent to the Linux kernel as a
+   realm value. Then route policy can be applied. See the tc man page.
+
+.. index:: set ip next-hop IPV4_ADDRESS
+.. clicmd:: set ip next-hop IPV4_ADDRESS
+
+   Set the BGP nexthop address.
+
+.. index:: set local-preference LOCAL_PREF
+.. clicmd:: set local-preference LOCAL_PREF
+
+   Set the BGP local preference to `local_pref`.
+
+.. index:: set weight WEIGHT
+.. clicmd:: set weight WEIGHT
+
+   Set the route's weight.
+
+.. index:: set metric METRIC
+.. clicmd:: set metric METRIC
+
+   Set the BGP attribute MED.
+
+.. index:: set as-path prepend AS_PATH
+.. clicmd:: set as-path prepend AS_PATH
+
+   Set the BGP AS path to prepend.
+
+.. index:: set community COMMUNITY
+.. clicmd:: set community COMMUNITY
+
+   Set the BGP community attribute.
+
+.. index:: set ipv6 next-hop global IPV6_ADDRESS
+.. clicmd:: set ipv6 next-hop global IPV6_ADDRESS
+
+   Set the BGP-4+ global IPv6 nexthop address.
+
+.. index:: set ipv6 next-hop local IPV6_ADDRESS
+.. clicmd:: set ipv6 next-hop local IPV6_ADDRESS
+
+   Set the BGP-4+ link local IPv6 nexthop address.
+
+.. _route-map-call-command:
+
+Route Map Call Command
+======================
+
+.. index:: call NAME
+.. clicmd:: call NAME
+
+   Call route-map `name`. If it returns deny, deny the route and
+   finish processing the route-map.
+
+.. _route-map-exit-action-command:
+
+Route Map Exit Action Command
+=============================
+
+.. index:: on-match next
+.. clicmd:: on-match next
+
+.. index:: continue
+.. clicmd:: continue
+
+   Proceed on to the next entry in the route-map.
+
+.. index:: on-match goto N
+.. clicmd:: on-match goto N
+
+.. index:: continue N
+.. clicmd:: continue N
+
+   Proceed processing the route-map at the first entry whose order is >= N
+
+Route Map Examples
+==================
+
+A simple example of a route-map:
+
+::
+
+  route-map test permit 10
+   match ip address 10
+   set local-preference 200
+
+
+This means that if a route matches ip access-list number 10 it's
+local-preference value is set to 200.
+
+See :ref:`bgp-configuration-examples` for examples of more sophisticated
+useage of route-maps, including of the ``call`` action.
+
diff --git a/doc/user/routeserver.rst b/doc/user/routeserver.rst
new file mode 100644 (file)
index 0000000..890897b
--- /dev/null
@@ -0,0 +1,550 @@
+.. _configuring-frr-as-a-route-server:
+
+Configuring FRR as a Route Server
+=================================
+
+The purpose of a Route Server is to centralize the peerings between BGP
+speakers. For example if we have an exchange point scenario with four BGP
+speakers, each of which maintaining a BGP peering with the other three
+(:ref:`fig-topologies-full`), we can convert it into a centralized scenario where
+each of the four establishes a single BGP peering against the Route Server
+(:ref:`fig-topologies-rs`).
+
+We will first describe briefly the Route Server model implemented by FRR.
+We will explain the commands that have been added for configuring that
+model. And finally we will show a full example of FRR configured as Route
+Server.
+
+.. _description-of-the-route-server-model:
+
+Description of the Route Server model
+-------------------------------------
+
+First we are going to describe the normal processing that BGP announcements
+suffer inside a standard BGP speaker, as shown in :ref:`fig-normal-processing`,
+it consists of three steps:
+
+- When an announcement is received from some peer, the `In` filters configured
+  for that peer are applied to the announcement. These filters can reject the
+  announcement, accept it unmodified, or accept it with some of its attributes
+  modified.
+
+- The announcements that pass the `In` filters go into the Best Path Selection
+  process, where they are compared to other announcements referred to the same
+  destination that have been received from different peers (in case such other
+  announcements exist). For each different destination, the announcement which
+  is selected as the best is inserted into the BGP speaker's Loc-RIB.
+
+- The routes which are inserted in the Loc-RIB are considered for announcement
+  to all the peers (except the one from which the route came). This is done by
+  passing the routes in the Loc-RIB through the `Out` filters corresponding to
+  each peer. These filters can reject the route, accept it unmodified, or
+  accept it with some of its attributes modified. Those routes which are
+  accepted by the `Out` filters of a peer are announced to that peer.
+
+.. _fig-normal-processing:
+
+.. figure:: ../figures/fig-normal-processing.png
+   :alt: Normal announcement processing
+   :align: center
+
+   Announcement processing inside a 'normal' BGP speaker
+
+.. _fig-topologies-full:
+
+.. figure:: ../figures/fig_topologies_full.png
+   :alt: Full Mesh BGP Topology
+   :align: center
+
+   Full Mesh
+
+.. _fig-topologies-rs:
+
+.. figure:: ../figures/fig_topologies_rs.png
+   :alt: Route Server BGP Topology
+   :align: center
+
+   Route server and clients
+
+Of course we want that the routing tables obtained in each of the routers are
+the same when using the route server than when not. But as a consequence of
+having a single BGP peering (against the route server), the BGP speakers can no
+longer distinguish from/to which peer each announce comes/goes.
+
+.. _filter-delegation:
+
+This means that the routers connected to the route server are not able to apply
+by themselves the same input/output filters as in the full mesh scenario, so
+they have to delegate those functions to the route server.
+
+Even more, the 'best path' selection must be also performed inside the route
+server on behalf of its clients. The reason is that if, after applying the
+filters of the announcer and the (potential) receiver, the route server decides
+to send to some client two or more different announcements referred to the same
+destination, the client will only retain the last one, considering it as an
+implicit withdrawal of the previous announcements for the same destination.
+This is the expected behavior of a BGP speaker as defined in :rfc:`1771`,
+and even though there are some proposals of mechanisms that permit multiple
+paths for the same destination to be sent through a single BGP peering, none
+are currently supported by most existing BGP implementations.
+
+As a consequence a route server must maintain additional information and
+perform additional tasks for a RS-client that those necessary for common BGP
+peerings. Essentially a route server must:
+
+.. _route-server-tasks:
+
+- Maintain a separated Routing Information Base (Loc-RIB)
+  for each peer configured as RS-client, containing the routes
+  selected as a result of the 'Best Path Selection' process
+  that is performed on behalf of that RS-client.
+
+- Whenever it receives an announcement from a RS-client,
+  it must consider it for the Loc-RIBs of the other RS-clients.
+
+  - This means that for each of them the route server must pass the
+    announcement through the appropriate `Out` filter of the
+    announcer.
+
+  - Then through the appropriate `In` filter of the potential receiver.
+
+  - Only if the announcement is accepted by both filters it will be passed
+    to the 'Best Path Selection' process.
+
+  - Finally, it might go into the Loc-RIB of the receiver.
+
+When we talk about the 'appropriate' filter, both the announcer and the
+receiver of the route must be taken into account. Suppose that the route server
+receives an announcement from client A, and the route server is considering it
+for the Loc-RIB of client B. The filters that should be applied are the same
+that would be used in the full mesh scenario, i.e., first the `Out` filter of
+router A for announcements going to router B, and then the `In` filter of
+router B for announcements coming from router A.
+
+We call 'Export Policy' of a RS-client to the set of `Out` filters that the
+client would use if there was no route server. The same applies for the 'Import
+Policy' of a RS-client and the set of `In` filters of the client if there was
+no route server.
+
+It is also common to demand from a route server that it does not modify some
+BGP attributes (next-hop, as-path and MED) that are usually modified by
+standard BGP speakers before announcing a route.
+
+The announcement processing model implemented by Frr is shown in
+:ref:`fig-rs-processing`. The figure shows a mixture of RS-clients (B, C and D)
+with normal BGP peers (A). There are some details that worth additional
+comments:
+
+- Announcements coming from a normal BGP peer are also considered for the
+  Loc-RIBs of all the RS-clients. But logically they do not pass through any
+  export policy.
+
+- Those peers that are configured as RS-clients do not receive any announce
+  from the `Main` Loc-RIB.
+
+- Apart from import and export policies, `In` and `Out` filters can also be set
+  for RS-clients. `In` filters might be useful when the route server has also
+  normal BGP peers. On the other hand, `Out` filters for RS-clients are
+  probably unnecessary, but we decided not to remove them as they do not hurt
+  anybody (they can always be left empty).
+
+.. _fig-rs-processing:
+.. figure:: ../figures/fig-rs-processing.png
+   :align: center
+   :alt: Route Server Processing Model
+
+   Announcement processing model implemented by the Route Server
+
+.. _commands-for-configuring-a-route-server:
+
+Commands for configuring a Route Server
+---------------------------------------
+
+Now we will describe the commands that have been added to frr
+in order to support the route server features.
+
+.. index:: neighbor PEER-GROUP route-server-client
+.. clicmd:: neighbor PEER-GROUP route-server-client
+
+.. index:: neighbor A.B.C.D route-server-client
+.. clicmd:: neighbor A.B.C.D route-server-client
+
+.. index:: neighbor X:X::X:X route-server-client
+.. clicmd:: neighbor X:X::X:X route-server-client
+
+   This command configures the peer given by `peer`, `A.B.C.D` or `X:X::X:X` as
+   an RS-client.
+
+   Actually this command is not new, it already existed in standard Frr. It
+   enables the transparent mode for the specified peer. This means that some
+   BGP attributes (as-path, next-hop and MED) of the routes announced to that
+   peer are not modified.
+
+   With the route server patch, this command, apart from setting the
+   transparent mode, creates a new Loc-RIB dedicated to the specified peer
+   (those named `Loc-RIB for X` in :ref:`fig-rs-processing`.). Starting from
+   that moment, every announcement received by the route server will be also
+   considered for the new Loc-RIB.
+
+.. index:: neigbor A.B.C.D|X.X::X.X|peer-group route-map WORD import|export
+.. clicmd:: neigbor A.B.C.D|X.X::X.X|peer-group route-map WORD import|export
+
+   This set of commands can be used to specify the route-map that represents
+   the Import or Export policy of a peer which is configured as a RS-client
+   (with the previous command).
+
+.. index:: match peer A.B.C.D|X:X::X:X
+.. clicmd:: match peer A.B.C.D|X:X::X:X
+
+   This is a new *match* statement for use in route-maps, enabling them to
+   describe import/export policies. As we said before, an import/export policy
+   represents a set of input/output filters of the RS-client. This statement
+   makes possible that a single route-map represents the full set of filters
+   that a BGP speaker would use for its different peers in a non-RS scenario.
+
+   The *match peer* statement has different semantics whether it is used inside
+   an import or an export route-map. In the first case the statement matches if
+   the address of the peer who sends the announce is the same that the address
+   specified by {A.B.C.D|X:X::X:X}. For export route-maps it matches when
+   {A.B.C.D|X:X::X:X} is the address of the RS-Client into whose Loc-RIB the
+   announce is going to be inserted (how the same export policy is applied
+   before different Loc-RIBs is shown in :ref:`fig-rs-processing`.).
+
+.. index:: call WORD
+.. clicmd:: call WORD
+
+   This command (also used inside a route-map) jumps into a different
+   route-map, whose name is specified by `WORD`. When the called
+   route-map finishes, depending on its result the original route-map
+   continues or not. Apart from being useful for making import/export
+   route-maps easier to write, this command can also be used inside
+   any normal (in or out) route-map.
+
+.. _example-of-route-server-configuration:
+
+Example of Route Server Configuration
+-------------------------------------
+
+Finally we are going to show how to configure a Frr daemon to act as a
+Route Server. For this purpose we are going to present a scenario without
+route server, and then we will show how to use the configurations of the BGP
+routers to generate the configuration of the route server.
+
+All the configuration files shown in this section have been taken
+from scenarios which were tested using the VNUML tool
+`http://www.dit.upm.es/vnuml,VNUML <http://www.dit.upm.es/vnuml,VNUML>`_.
+
+.. _configuration-of-the-bgp-routers-without-route-server:
+
+Configuration of the BGP routers without Route Server
+-----------------------------------------------------
+
+We will suppose that our initial scenario is an exchange point with three
+BGP capable routers, named RA, RB and RC. Each of the BGP speakers generates
+some routes (with the `network` command), and establishes BGP peerings
+against the other two routers. These peerings have In and Out route-maps
+configured, named like 'PEER-X-IN' or 'PEER-X-OUT'. For example the
+configuration file for router RA could be the following:
+
+::
+
+   #Configuration for router 'RA'
+   !
+   hostname RA
+   password ****
+   !
+   router bgp 65001
+     no bgp default ipv4-unicast
+     neighbor 2001:0DB8::B remote-as 65002
+     neighbor 2001:0DB8::C remote-as 65003
+   !
+     address-family ipv6
+       network 2001:0DB8:AAAA:1::/64
+       network 2001:0DB8:AAAA:2::/64
+       network 2001:0DB8:0000:1::/64
+       network 2001:0DB8:0000:2::/64
+       neighbor 2001:0DB8::B activate
+       neighbor 2001:0DB8::B soft-reconfiguration inbound
+       neighbor 2001:0DB8::B route-map PEER-B-IN in
+       neighbor 2001:0DB8::B route-map PEER-B-OUT out
+       neighbor 2001:0DB8::C activate
+       neighbor 2001:0DB8::C soft-reconfiguration inbound
+       neighbor 2001:0DB8::C route-map PEER-C-IN in
+       neighbor 2001:0DB8::C route-map PEER-C-OUT out
+     exit-address-family
+   !
+   ipv6 prefix-list COMMON-PREFIXES seq  5 permit 2001:0DB8:0000::/48 ge 64 le 64
+   ipv6 prefix-list COMMON-PREFIXES seq 10 deny any
+   !
+   ipv6 prefix-list PEER-A-PREFIXES seq  5 permit 2001:0DB8:AAAA::/48 ge 64 le 64
+   ipv6 prefix-list PEER-A-PREFIXES seq 10 deny any
+   !
+   ipv6 prefix-list PEER-B-PREFIXES seq  5 permit 2001:0DB8:BBBB::/48 ge 64 le 64
+   ipv6 prefix-list PEER-B-PREFIXES seq 10 deny any
+   !
+   ipv6 prefix-list PEER-C-PREFIXES seq  5 permit 2001:0DB8:CCCC::/48 ge 64 le 64
+   ipv6 prefix-list PEER-C-PREFIXES seq 10 deny any
+   !
+   route-map PEER-B-IN permit 10
+     match ipv6 address prefix-list COMMON-PREFIXES
+     set metric 100
+   route-map PEER-B-IN permit 20
+     match ipv6 address prefix-list PEER-B-PREFIXES
+     set community 65001:11111
+   !
+   route-map PEER-C-IN permit 10
+     match ipv6 address prefix-list COMMON-PREFIXES
+     set metric 200
+   route-map PEER-C-IN permit 20
+     match ipv6 address prefix-list PEER-C-PREFIXES
+     set community 65001:22222
+   !
+   route-map PEER-B-OUT permit 10
+     match ipv6 address prefix-list PEER-A-PREFIXES
+   !
+   route-map PEER-C-OUT permit 10
+     match ipv6 address prefix-list PEER-A-PREFIXES
+   !
+   line vty
+   !
+
+
+.. _configuration-of-the-bgp-routers-with-route-server:
+
+Configuration of the BGP routers with Route Server
+--------------------------------------------------
+
+To convert the initial scenario into one with route server, first we must
+modify the configuration of routers RA, RB and RC. Now they must not peer
+between them, but only with the route server. For example, RA's
+configuration would turn into:
+
+::
+
+  # Configuration for router 'RA'
+  !
+  hostname RA
+  password ****
+  !
+  router bgp 65001
+    no bgp default ipv4-unicast
+    neighbor 2001:0DB8::FFFF remote-as 65000
+  !
+    address-family ipv6
+      network 2001:0DB8:AAAA:1::/64
+      network 2001:0DB8:AAAA:2::/64
+      network 2001:0DB8:0000:1::/64
+      network 2001:0DB8:0000:2::/64
+
+      neighbor 2001:0DB8::FFFF activate
+      neighbor 2001:0DB8::FFFF soft-reconfiguration inbound
+    exit-address-family
+  !
+  line vty
+  !
+
+
+Which is logically much simpler than its initial configuration, as it now
+maintains only one BGP peering and all the filters (route-maps) have
+disappeared.
+
+.. _configuration-of-the-route-server-itself:
+
+Configuration of the Route Server itself
+----------------------------------------
+
+As we said when we described the functions of a route server
+(:ref:`description-of-the-route-server-model`), it is in charge of all the
+route filtering. To achieve that, the In and Out filters from the RA, RB and RC
+configurations must be converted into Import and Export policies in the route
+server.
+
+This is a fragment of the route server configuration (we only show
+the policies for client RA):
+
+::
+
+  # Configuration for Route Server ('RS')
+  !
+  hostname RS
+  password ix
+  !
+  bgp multiple-instance
+  !
+  router bgp 65000 view RS
+    no bgp default ipv4-unicast
+    neighbor 2001:0DB8::A  remote-as 65001
+    neighbor 2001:0DB8::B  remote-as 65002
+    neighbor 2001:0DB8::C  remote-as 65003
+  !
+    address-family ipv6
+      neighbor 2001:0DB8::A activate
+      neighbor 2001:0DB8::A route-server-client
+      neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import
+      neighbor 2001:0DB8::A route-map RSCLIENT-A-EXPORT export
+      neighbor 2001:0DB8::A soft-reconfiguration inbound
+
+      neighbor 2001:0DB8::B activate
+      neighbor 2001:0DB8::B route-server-client
+      neighbor 2001:0DB8::B route-map RSCLIENT-B-IMPORT import
+      neighbor 2001:0DB8::B route-map RSCLIENT-B-EXPORT export
+      neighbor 2001:0DB8::B soft-reconfiguration inbound
+
+      neighbor 2001:0DB8::C activate
+      neighbor 2001:0DB8::C route-server-client
+      neighbor 2001:0DB8::C route-map RSCLIENT-C-IMPORT import
+      neighbor 2001:0DB8::C route-map RSCLIENT-C-EXPORT export
+      neighbor 2001:0DB8::C soft-reconfiguration inbound
+    exit-address-family
+  !
+  ipv6 prefix-list COMMON-PREFIXES seq  5 permit 2001:0DB8:0000::/48 ge 64 le 64
+  ipv6 prefix-list COMMON-PREFIXES seq 10 deny any
+  !
+  ipv6 prefix-list PEER-A-PREFIXES seq  5 permit 2001:0DB8:AAAA::/48 ge 64 le 64
+  ipv6 prefix-list PEER-A-PREFIXES seq 10 deny any
+  !
+  ipv6 prefix-list PEER-B-PREFIXES seq  5 permit 2001:0DB8:BBBB::/48 ge 64 le 64
+  ipv6 prefix-list PEER-B-PREFIXES seq 10 deny any
+  !
+  ipv6 prefix-list PEER-C-PREFIXES seq  5 permit 2001:0DB8:CCCC::/48 ge 64 le 64
+  ipv6 prefix-list PEER-C-PREFIXES seq 10 deny any
+  !
+  route-map RSCLIENT-A-IMPORT permit 10
+    match peer 2001:0DB8::B
+    call A-IMPORT-FROM-B
+  route-map RSCLIENT-A-IMPORT permit 20
+    match peer 2001:0DB8::C
+    call A-IMPORT-FROM-C
+  !
+  route-map A-IMPORT-FROM-B permit 10
+    match ipv6 address prefix-list COMMON-PREFIXES
+    set metric 100
+  route-map A-IMPORT-FROM-B permit 20
+    match ipv6 address prefix-list PEER-B-PREFIXES
+    set community 65001:11111
+  !
+  route-map A-IMPORT-FROM-C permit 10
+    match ipv6 address prefix-list COMMON-PREFIXES
+    set metric 200
+  route-map A-IMPORT-FROM-C permit 20
+    match ipv6 address prefix-list PEER-C-PREFIXES
+    set community 65001:22222
+  !
+  route-map RSCLIENT-A-EXPORT permit 10
+    match peer 2001:0DB8::B
+    match ipv6 address prefix-list PEER-A-PREFIXES
+  route-map RSCLIENT-A-EXPORT permit 20
+    match peer 2001:0DB8::C
+    match ipv6 address prefix-list PEER-A-PREFIXES
+  !
+  ...
+  ...
+  ...
+
+
+If you compare the initial configuration of RA with the route server
+configuration above, you can see how easy it is to generate the Import and
+Export policies for RA from the In and Out route-maps of RA's original
+configuration.
+
+When there was no route server, RA maintained two peerings, one with RB and
+another with RC. Each of this peerings had an In route-map configured. To
+build the Import route-map for client RA in the route server, simply add
+route-map entries following this scheme:
+
+::
+
+   route-map <NAME> permit 10
+       match peer <Peer Address>
+       call <In Route-Map for this Peer>
+   route-map <NAME> permit 20
+       match peer <Another Peer Address>
+       call <In Route-Map for this Peer>
+
+
+This is exactly the process that has been followed to generate the route-map
+RSCLIENT-A-IMPORT. The route-maps that are called inside it (A-IMPORT-FROM-B
+and A-IMPORT-FROM-C) are exactly the same than the In route-maps from the
+original configuration of RA (PEER-B-IN and PEER-C-IN), only the name is
+different.
+
+The same could have been done to create the Export policy for RA (route-map
+RSCLIENT-A-EXPORT), but in this case the original Out route-maps where so
+simple that we decided not to use the `call WORD` commands, and we
+integrated all in a single route-map (RSCLIENT-A-EXPORT).
+
+The Import and Export policies for RB and RC are not shown, but
+the process would be identical.
+
+Further considerations about Import and Export route-maps
+---------------------------------------------------------
+
+The current version of the route server patch only allows to specify a
+route-map for import and export policies, while in a standard BGP speaker
+apart from route-maps there are other tools for performing input and output
+filtering (access-lists, community-lists, ...). But this does not represent
+any limitation, as all kinds of filters can be included in import/export
+route-maps. For example suppose that in the non-route-server scenario peer
+RA had the following filters configured for input from peer B:
+
+::
+
+   neighbor 2001:0DB8::B prefix-list LIST-1 in
+   neighbor 2001:0DB8::B filter-list LIST-2 in
+   neighbor 2001:0DB8::B route-map PEER-B-IN in
+   ...
+   ...
+   route-map PEER-B-IN permit 10
+     match ipv6 address prefix-list COMMON-PREFIXES
+     set local-preference 100
+   route-map PEER-B-IN permit 20
+     match ipv6 address prefix-list PEER-B-PREFIXES
+     set community 65001:11111
+
+
+It is posible to write a single route-map which is equivalent to
+the three filters (the community-list, the prefix-list and the
+route-map). That route-map can then be used inside the Import
+policy in the route server. Lets see how to do it:
+
+::
+
+   neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import
+   ...
+   !
+   ...
+   route-map RSCLIENT-A-IMPORT permit 10
+     match peer 2001:0DB8::B
+     call A-IMPORT-FROM-B
+   ...
+   ...
+   !
+   route-map A-IMPORT-FROM-B permit 1
+     match ipv6 address prefix-list LIST-1
+     match as-path LIST-2
+     on-match goto 10
+   route-map A-IMPORT-FROM-B deny 2
+   route-map A-IMPORT-FROM-B permit 10
+     match ipv6 address prefix-list COMMON-PREFIXES
+     set local-preference 100
+   route-map A-IMPORT-FROM-B permit 20
+     match ipv6 address prefix-list PEER-B-PREFIXES
+     set community 65001:11111
+   !
+   ...
+   ...
+
+
+The route-map A-IMPORT-FROM-B is equivalent to the three filters (LIST-1,
+LIST-2 and PEER-B-IN). The first entry of route-map A-IMPORT-FROM-B (sequence
+number 1) matches if and only if both the prefix-list LIST-1 and the
+filter-list LIST-2 match. If that happens, due to the 'on-match goto 10'
+statement the next route-map entry to be processed will be number 10, and as of
+that point route-map A-IMPORT-FROM-B is identical to PEER-B-IN. If the first
+entry does not match, `on-match goto 10`' will be ignored and the next
+processed entry will be number 2, which will deny the route.
+
+Thus, the result is the same that with the three original filters, i.e., if
+either LIST-1 or LIST-2 rejects the route, it does not reach the route-map
+PEER-B-IN. In case both LIST-1 and LIST-2 accept the route, it passes to
+PEER-B-IN, which can reject, accept or modify the route.
diff --git a/doc/user/rpki.rst b/doc/user/rpki.rst
new file mode 100644 (file)
index 0000000..86d88dc
--- /dev/null
@@ -0,0 +1,261 @@
+.. _prefix-origin-validation-using-rpki:
+
+Prefix Origin Validation Using RPKI
+===================================
+
+Prefix Origin Validation allows BGP routers to verify if the origin AS of an IP
+prefix is legitimate to announce this IP prefix. The required attestation
+objects are stored in the Resource Public Key Infrastructure (:abbr:`RPKI`).
+However, RPKI-enabled routers do not store cryptographic data itself but only
+validation information. The validation of the cryptographic data (so called
+Route Origin Authorization, or short :abbr:`ROA`, objects) will be performed by
+trusted cache servers. The RPKI/RTR protocol defines a standard mechanism to
+maintain the exchange of the prefix/origin AS mapping between the cache server
+and routers. In combination with a  BGP Prefix Origin Validation scheme a
+router is able to verify received BGP updates without suffering from
+cryptographic complexity.
+
+The RPKI/RTR protocol is defined in :rfc:`6810` and the validation scheme in
+:rfc:`6811`. The current version of Prefix Origin Validation in FRR implements
+both RFCs.
+
+For a more detailed but still easy-to-read background, we suggest:
+
+- [Securing-BGP]_
+- [Resource-Certification]_
+
+.. _features-of-the-current-implementation:
+
+Features of the Current Implementation
+--------------------------------------
+
+In a nutshell, the current implementation provides the following features
+
+- The BGP router can connect to one or more RPKI cache servers to receive
+  validated prefix to origin AS mappings. Advanced failover can be implemented
+  by server sockets with different preference values.
+- If no connection to an RPKI cache server can be established after a
+  pre-defined timeout, the router will process routes without prefix origin
+  validation. It still will try to establish a connection to an RPKI cache
+  server in the background.
+- By default, enabling RPKI does not change best path selection. In particular,
+  invalid prefixes will still be considered during best path selection.
+  However, the router can be configured to ignore all invalid prefixes.
+- Route maps can be configured to match a specific RPKI validation state. This
+  allows the creation of local policies, which handle BGP routes based on the
+  outcome of the Prefix Origin Validation.
+
+
+.. _enabling-rpki:
+
+Enabling RPKI
+-------------
+
+.. index:: rpki
+.. clicmd:: rpki
+
+   This command enables the RPKI configuration mode. Most commands that start
+   with *rpki* can only be used in this mode.
+
+   When it is used in a telnet session, leaving of this mode cause rpki to be initialized.
+
+   Executing this command alone does not activate prefix validation. You need
+   to configure at least one reachable cache server. See section
+   :ref:`configuring-rpki-rtr-cache-servers` for configuring a cache server.
+
+.. _configuring-rpki-rtr-cache-servers:
+
+Configuring RPKI/RTR Cache Servers
+----------------------------------
+
+The following commands are independent of a specific cache server.
+
+.. index:: rpki polling_period (1-3600)
+.. clicmd:: rpki polling_period (1-3600)
+
+.. index:: no rpki polling_period
+.. clicmd:: no rpki polling_period
+
+   Set the number of seconds the router waits until the router asks the cache
+   again for updated data.
+
+   The default value is 300 seconds.
+
+.. index:: rpki timeout <1-4,294,967,296>
+.. clicmd:: rpki timeout <1-4,294,967,296>
+
+.. index:: no rpki timeout
+.. clicmd:: no rpki timeout
+
+   Set the number of seconds the router waits for the cache reply. If the cache
+   server is not replying within this time period, the router deletes all
+   received prefix records from the prefix table.
+
+   The default value is 600 seconds.
+
+.. index:: rpki initial-synchronisation-timeout <1-4,294,967,296>
+.. clicmd:: rpki initial-synchronisation-timeout <1-4,294,967,296>
+
+.. index:: no rpki initial-synchronisation-timeout
+.. clicmd:: no rpki initial-synchronisation-timeout
+
+   Set the number of seconds until the first synchronization with the cache
+   server needs to be completed. If the timeout expires, BGP routing is started
+   without RPKI. The router will try to establish the cache server connection in
+   the background.
+
+   The default value is 30 seconds.
+
+   The following commands configure one or multiple cache servers.
+
+.. index:: rpki cache (A.B.C.D|WORD) PORT [SSH_USERNAME] [SSH_PRIVKEY_PATH] [SSH_PUBKEY_PATH] [KNOWN_HOSTS_PATH] PREFERENCE
+.. clicmd:: rpki cache (A.B.C.D|WORD) PORT [SSH_USERNAME] [SSH_PRIVKEY_PATH] [SSH_PUBKEY_PATH] [KNOWN_HOSTS_PATH] PREFERENCE
+
+.. index:: no rpki cache (A.B.C.D|WORD) [PORT] PREFERENCE
+.. clicmd:: no rpki cache (A.B.C.D|WORD) [PORT] PREFERENCE
+
+   Add a cache server to the socket. By default, the connection between router
+   and cache server is based on plain TCP. Protecting the connection between
+   router and cache server by SSH is optional. Deleting a socket removes the
+   associated cache server and terminates the existing connection.
+
+   A.B.C.D|WORD
+      Address of the cache server.
+
+   PORT
+      Port number to connect to the cache server
+
+   SSH_USERNAME
+      SSH username to establish an SSH connection to the cache server.
+
+
+   SSH_PRIVKEY_PATH
+      Local path that includes the private key file of the router.
+
+
+   SSH_PUBKEY_PATH
+      Local path that includes the public key file of the router.
+
+
+   KNOWN_HOSTS_PATH
+      Local path that includes the known hosts file. The default value depends
+      on the configuration of the operating system environment, usually
+      :file:`~/.ssh/known_hosts`.
+
+
+.. _validating-bgp-updates:
+
+Validating BGP Updates
+----------------------
+
+.. index:: match rpki notfound|invalid|valid
+.. clicmd:: match rpki notfound|invalid|valid
+
+.. index:: no match rpki notfound|invalid|valid
+.. clicmd:: no match rpki notfound|invalid|valid
+
+    Create a clause for a route map to match prefixes with the specified RPKI
+    state.
+
+    **Note** that the matching of invalid prefixes requires that invalid
+    prefixes are considered for best path selection, i.e.,
+    ``bgp bestpath prefix-validate disallow-invalid`` is not enabled.
+
+    In the following example, the router prefers valid routes over invalid
+    prefixes because invalid routes have a lower local preference.
+
+    ::
+
+       ! Allow for invalid routes in route selection process
+       route bgp 60001
+       !
+       ! Set local preference of invalid prefixes to 10
+       route-map rpki permit 10
+        match rpki invalid
+        set local-preference 10
+       !
+       ! Set local preference of valid prefixes to 500
+       route-map rpki permit 500
+        match rpki valid
+        set local-preference 500
+
+
+.. _debugging:
+
+Debugging
+---------
+
+.. index:: debug rpki
+.. clicmd:: debug rpki
+
+.. index:: no debug rpki
+.. clicmd:: no debug rpki
+
+   Enable or disable debugging output for RPKI.
+
+.. _displaying-rpki:
+
+Displaying RPKI
+---------------
+
+.. index:: show rpki prefix-table
+.. clicmd:: show rpki prefix-table
+
+   Display all validated prefix to origin AS mappings/records which have been
+   received from the cache servers and stored in the router. Based on this data,
+   the router validates BGP Updates.
+
+.. index:: show rpki cache-connection
+.. clicmd:: show rpki cache-connection
+
+   Display all configured cache servers, whether active or not.
+
+RPKI Configuration Example
+--------------------------
+
+::
+
+   hostname bgpd1
+   password zebra
+   ! log stdout
+   debug bgp updates
+   debug bgp keepalives
+   debug rpki
+   !
+   rpki
+    rpki polling_period 1000
+    rpki timeout 10
+     ! SSH Example:
+     rpki cache example.com 22 rtr-ssh ./ssh_key/id_rsa ./ssh_key/id_rsa.pub preference 1
+     ! TCP Example:
+     rpki cache rpki-validator.realmv6.org 8282 preference 2
+     exit
+   !
+   router bgp 60001
+    bgp router-id 141.22.28.223
+    network 192.168.0.0/16
+    neighbor 123.123.123.0 remote-as 60002
+    neighbor 123.123.123.0 route-map rpki in
+   !
+    address-family ipv6
+     neighbor 123.123.123.0 activate
+      neighbor 123.123.123.0 route-map rpki in
+    exit-address-family
+   !
+   route-map rpki permit 10
+    match rpki invalid
+    set local-preference 10
+   !
+   route-map rpki permit 20
+    match rpki notfound
+    set local-preference 20
+   !
+   route-map rpki permit 30
+    match rpki valid
+    set local-preference 30
+   !
+   route-map rpki permit 40
+   !
+
+.. [Securing-BGP] Geoff Huston, Randy Bush: Securing BGP, In: The Internet Protocol Journal, Volume 14, No. 2, 2011. <http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_14-2/142_bgp.html>
+.. [Resource-Certification] Geoff Huston: Resource Certification, In: The Internet Protocol Journal, Volume 12, No.1, 2009. <http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_12-1/121_resource.html>
diff --git a/doc/user/snmp.rst b/doc/user/snmp.rst
new file mode 100644 (file)
index 0000000..114f1f7
--- /dev/null
@@ -0,0 +1,200 @@
+.. _snmp-support:
+
+************
+SNMP Support
+************
+
+:abbr:`SNMP (Simple Network Managing Protocol)` is a widely implemented feature
+for collecting network information from router and/or host. FRR itself does
+not support SNMP agent (server daemon) functionality but is able to connect to
+a SNMP agent using the SMUX protocol (:rfc:`1227`) or the AgentX protocol
+(:rfc:`2741`) and make the routing protocol MIBs available through it.
+
+Note that SNMP Support needs to be enabled at compile-time and loaded as module
+on daemon startup. Refer to :ref:`loadable-module-support` on the latter.
+
+.. _getting-and-installing-an-snmp-agent:
+
+Getting and installing an SNMP agent
+====================================
+
+There are several SNMP agent which support SMUX or AgentX. We recommend to use
+the latest version of `net-snmp` which was formerly known as `ucd-snmp`. It is
+free and open software and available at `http://www.net-snmp.org/ <http://www.net-snmp.org/>`_
+and as binary package for most Linux distributions. `net-snmp` has to be
+compiled with `--with-mib-modules=agentx` to be able to accept connections from
+FRR using AgentX protocol or with `--with-mib-modules=smux` to use SMUX
+protocol.
+
+Nowadays, SMUX is a legacy protocol. The AgentX protocol should be preferred
+for any new deployment. Both protocols have the same coverage.
+
+.. _agentx-configuration:
+
+AgentX configuration
+====================
+
+.. program:: configure
+
+To enable AgentX protocol support, FRR must have been build with the
+:option:`--enable-snmp` or `--enable-snmp=agentx` option. Both the
+master SNMP agent (snmpd) and each of the FRR daemons must be configured. In
+:file:`/etc/snmp/snmpd.conf`, the ``master agentx`` directive should be added.
+In each of the FRR daemons, ``agentx`` command will enable AgentX support.
+
+::
+
+   /etc/snmp/snmpd.conf:
+      #
+      # example access restrictions setup
+      #
+      com2sec readonly default public
+      group MyROGroup v1 readonly
+      view all included .1 80
+      access MyROGroup "" any noauth exact all none none
+      #
+      # enable master agent for AgentX subagents
+      #
+      master agentx
+
+   /etc/frr/ospfd.conf:
+      ! ... the rest of ospfd.conf has been omitted for clarity ...
+      !
+      agentx
+      !
+
+
+Upon successful connection, you should get something like this in the log of
+each FRR daemons:
+
+::
+
+  2012/05/25 11:39:08 ZEBRA: snmp[info]: NET-SNMP version 5.4.3 AgentX subagent connected
+
+
+Then, you can use the following command to check everything works as expected:
+
+::
+
+  # snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
+  OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
+  [...]
+
+
+The AgentX protocol can be transported over a Unix socket or using TCP or UDP.
+It usually defaults to a Unix socket and depends on how NetSNMP was built. If
+need to configure FRR to use another transport, you can configure it through
+:file:`/etc/snmp/frr.conf`:
+
+::
+
+   /etc/snmp/frr.conf:
+      [snmpd]
+      # Use a remote master agent
+      agentXSocket tcp:192.168.15.12:705
+
+
+.. _smux-configuration:
+
+SMUX configuration
+==================
+
+To enable SMUX protocol support, FRR must have been build with the
+:option:`--enable-snmp` option.
+
+A separate connection has then to be established between the SNMP agent (snmpd)
+and each of the FRR daemons. This connections each use different OID numbers
+and passwords. Be aware that this OID number is not the one that is used in
+queries by clients, it is solely used for the intercommunication of the
+daemons.
+
+In the following example the ospfd daemon will be connected to the snmpd daemon
+using the password "frr_ospfd". For testing it is recommending to take exactly
+the below snmpd.conf as wrong access restrictions can be hard to debug.
+
+::
+
+   /etc/snmp/snmpd.conf:
+      #
+      # example access restrictions setup
+      #
+      com2sec readonly default public
+      group MyROGroup v1 readonly
+      view all included .1 80
+      access MyROGroup "" any noauth exact all none none
+      #
+      # the following line is relevant for FRR
+      #
+      smuxpeer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
+
+   /etc/frr/ospf:
+      ! ... the rest of ospfd.conf has been omitted for clarity ...
+      !
+      smux peer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
+      !
+
+
+After restarting snmpd and frr, a successful connection can be verified in the
+syslog and by querying the SNMP daemon:
+
+::
+
+   snmpd[12300]: [smux_accept] accepted fd 12 from 127.0.0.1:36255
+   snmpd[12300]: accepted smux peer: \\
+      oid GNOME-PRODUCT-ZEBRA-MIB::ospfd, frr-0.96.5
+
+   # snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
+   OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
+
+
+Be warned that the current version (5.1.1) of the Net-SNMP daemon writes a line
+for every SNMP connect to the syslog which can lead to enormous log file sizes.
+If that is a problem you should consider to patch snmpd and comment out the
+troublesome `snmp_log()` line in the function `netsnmp_agent_check_packet()` in
+`agent/snmp_agent.c`.
+
+MIB and command reference
+=========================
+
+The following OID numbers are used for the interprocess communication of snmpd and
+the FRR daemons with SMUX only.::
+
+  .    (OIDs below .iso.org.dod.internet.private.enterprises)
+  zebra        .1.3.6.1.4.1.3317.1.2.1 .gnome.gnomeProducts.zebra.zserv
+  bgpd .1.3.6.1.4.1.3317.1.2.2 .gnome.gnomeProducts.zebra.bgpd
+  ripd .1.3.6.1.4.1.3317.1.2.3 .gnome.gnomeProducts.zebra.ripd
+  ospfd        .1.3.6.1.4.1.3317.1.2.5 .gnome.gnomeProducts.zebra.ospfd
+  ospf6d       .1.3.6.1.4.1.3317.1.2.6 .gnome.gnomeProducts.zebra.ospf6d
+
+
+Sadly, SNMP has not been implemented in all daemons yet. The following
+OID numbers are used for querying the SNMP daemon by a client:::
+
+  zebra        .1.3.6.1.2.1.4.24   .iso.org.dot.internet.mgmt.mib-2.ip.ipForward
+  ospfd        .1.3.6.1.2.1.14     .iso.org.dot.internet.mgmt.mib-2.ospf
+  bgpd .1.3.6.1.2.1.15     .iso.org.dot.internet.mgmt.mib-2.bgp
+  ripd .1.3.6.1.2.1.23     .iso.org.dot.internet.mgmt.mib-2.rip2
+  ospf6d       .1.3.6.1.3.102      .iso.org.dod.internet.experimental.ospfv3
+
+
+The following syntax is understood by the FRR daemons for configuring SNMP
+using SMUX:
+
+.. index:: smux peer OID
+.. clicmd:: smux peer OID
+.. index:: no smux peer OID
+.. clicmd:: no smux peer OID
+.. index:: smux peer OID PASSWORD
+.. clicmd:: smux peer OID PASSWORD
+.. index:: no smux peer OID PASSWORD
+.. clicmd:: no smux peer OID PASSWORD
+
+Here is the syntax for using AgentX:
+
+.. index:: agentx
+.. clicmd:: agentx
+.. index:: no agentx
+.. clicmd:: no agentx
+
+
+.. include:: snmptrap.rst
diff --git a/doc/user/snmptrap.rst b/doc/user/snmptrap.rst
new file mode 100644 (file)
index 0000000..9e642a5
--- /dev/null
@@ -0,0 +1,201 @@
+Handling SNMP Traps
+===================
+
+To handle snmp traps make sure your snmp setup of frr works correctly as
+described in the frr documentation in :ref:`snmp-support`.
+
+The BGP4 mib will send traps on peer up/down events. These should be visible in
+your snmp logs with a message similar to:
+
+::
+
+   snmpd[13733]: Got trap from peer on fd 14
+
+To react on these traps they should be handled by a trapsink. Configure your
+trapsink by adding the following lines to :file:`/etc/snmpd/snmpd.conf`:
+
+::
+
+   # send traps to the snmptrapd on localhost
+   trapsink localhost
+
+
+This will send all traps to an snmptrapd running on localhost. You can of
+course also use a dedicated management station to catch traps. Configure the
+snmptrapd daemon by adding the following line to
+:file:`/etc/snmpd/snmptrapd.conf`:
+
+::
+
+   traphandle .1.3.6.1.4.1.3317.1.2.2 /etc/snmp/snmptrap_handle.sh
+
+
+This will use the bash script :file:`/etc/snmp/snmptrap_handle.sh` to handle
+the BGP4 traps. To add traps for other protocol daemons, lookup their
+appropriate OID from their mib. (For additional information about which traps
+are supported by your mib, lookup the mib on
+`http://www.oidview.com/mibs/detail.html <http://www.oidview.com/mibs/detail.html>`_).
+
+Make sure *snmptrapd* is started.
+
+The snmptrap_handle.sh script I personally use for handling BGP4 traps is
+below. You can of course do all sorts of things when handling traps, like sound
+a siren, have your display flash, etc., be creative ;).
+
+::
+
+   #!/bin/bash
+
+   # routers name
+   ROUTER=`hostname -s`
+
+   #email address use to sent out notification
+   EMAILADDR="john@doe.com"
+   #email address used (allongside above) where warnings should be sent
+   EMAILADDR_WARN="sms-john@doe.com"
+
+   # type of notification
+   TYPE="Notice"
+
+   # local snmp community for getting AS belonging to peer
+   COMMUNITY="<community>"
+
+   # if a peer address is in $WARN_PEERS a warning should be sent
+   WARN_PEERS="192.0.2.1"
+
+   # get stdin
+   INPUT=`cat -`
+
+   # get some vars from stdin
+   uptime=`echo $INPUT | cut -d' ' -f5`
+   peer=`echo $INPUT | cut -d' ' -f8 | sed -e 's/SNMPv2-SMI::mib-2.15.3.1.14.//g'`
+   peerstate=`echo $INPUT | cut -d' ' -f13`
+   errorcode=`echo $INPUT | cut -d' ' -f9 | sed -e 's/\\"//g'`
+   suberrorcode=`echo $INPUT | cut -d' ' -f10 | sed -e 's/\\"//g'`
+   remoteas=`snmpget -v2c -c $COMMUNITY localhost SNMPv2-SMI::mib-2.15.3.1.9.$peer | cut -d' ' -f4`
+
+   WHOISINFO=`whois -h whois.ripe.net " -r AS$remoteas" | egrep '(as-name|descr)'`
+   asname=`echo "$WHOISINFO" | grep "^as-name:" | sed -e 's/^as-name://g' -e 's/  //g' -e 's/^ //g' | uniq`
+   asdescr=`echo "$WHOISINFO" | grep "^descr:" | sed -e 's/^descr://g' -e 's/  //g' -e 's/^ //g' | uniq`
+
+   # if peer address is in $WARN_PEER, the email should also
+   # be sent to $EMAILADDR_WARN
+   for ip in $WARN_PEERS; do
+   if [ "x$ip" == "x$peer" ]; then
+   EMAILADDR="$EMAILADDR,$EMAILADDR_WARN"
+   TYPE="WARNING"
+   break
+   fi
+   done
+
+   # convert peer state
+   case "$peerstate" in
+   1) peerstate="Idle" ;;
+   2) peerstate="Connect" ;;
+   3) peerstate="Active" ;;
+   4) peerstate="Opensent" ;;
+   5) peerstate="Openconfirm" ;;
+   6) peerstate="Established" ;;
+   *) peerstate="Unknown" ;;
+   esac
+
+   # get textual messages for errors
+   case "$errorcode" in
+   00)
+   error="No error"
+   suberror=""
+   ;;
+   01)
+   error="Message Header Error"
+   case "$suberrorcode" in
+   01) suberror="Connection Not Synchronized" ;;
+   02) suberror="Bad Message Length" ;;
+   03) suberror="Bad Message Type" ;;
+   *) suberror="Unknown" ;;
+   esac
+   ;;
+   02)
+   error="OPEN Message Error"
+   case "$suberrorcode" in
+   01) suberror="Unsupported Version Number" ;;
+   02) suberror="Bad Peer AS" ;;
+   03) suberror="Bad BGP Identifier" ;;
+   04) suberror="Unsupported Optional Parameter" ;;
+   05) suberror="Authentication Failure" ;;
+   06) suberror="Unacceptable Hold Time" ;;
+   *) suberror="Unknown" ;;
+   esac
+   ;;
+   03)
+   error="UPDATE Message Error"
+   case "$suberrorcode" in
+   01) suberror="Malformed Attribute List" ;;
+   02) suberror="Unrecognized Well-known Attribute" ;;
+   03) suberror="Missing Well-known Attribute" ;;
+   04) suberror="Attribute Flags Error" ;;
+   05) suberror="Attribute Length Error" ;;
+   06) suberror="Invalid ORIGIN Attribute" ;;
+   07) suberror="AS Routing Loop" ;;
+   08) suberror="Invalid NEXT_HOP Attribute" ;;
+   09) suberror="Optional Attribute Error" ;;
+   10) suberror="Invalid Network Field" ;;
+   11) suberror="Malformed AS_PATH" ;;
+   *) suberror="Unknown" ;;
+   esac
+   ;;
+   04)
+   error="Hold Timer Expired"
+   suberror=""
+   ;;
+   05)
+   error="Finite State Machine Error"
+   suberror=""
+   ;;
+   06)
+   error="Cease"
+   case "$suberrorcode" in
+   01) suberror="Maximum Number of Prefixes Reached" ;;
+   02) suberror="Administratively Shutdown" ;;
+   03) suberror="Peer Unconfigured" ;;
+   04) suberror="Administratively Reset" ;;
+   05) suberror="Connection Rejected" ;;
+   06) suberror="Other Configuration Change" ;;
+   07) suberror="Connection collision resolution" ;;
+   08) suberror="Out of Resource" ;;
+   09) suberror="MAX" ;;
+   *) suberror="Unknown" ;;
+   esac
+   ;;
+   *)
+   error="Unknown"
+   suberror=""
+   ;;
+   esac
+
+   # create textual message from errorcodes
+   if [ "x$suberror" == "x" ]; then
+   NOTIFY="$errorcode ($error)"
+   else
+   NOTIFY="$errorcode/$suberrorcode ($error/$suberror)"
+   fi
+
+   # form a decent subject
+   SUBJECT="$TYPE: $ROUTER [bgp] $peer is $peerstate: $NOTIFY"
+   # create the email body
+   MAIL=`cat << EOF
+   BGP notification on router $ROUTER.
+
+   Peer: $peer
+   AS: $remoteas
+   New state: $peerstate
+   Notification: $NOTIFY
+
+   Info:
+   $asname
+   $asdescr
+
+   Snmpd uptime: $uptime
+   EOF`
+
+   # mail the notification
+   echo "$MAIL" | mail -s "$SUBJECT" $EMAILADDR
diff --git a/doc/user/vnc.rst b/doc/user/vnc.rst
new file mode 100644 (file)
index 0000000..8be4ff6
--- /dev/null
@@ -0,0 +1,1425 @@
+.. _vnc-and-vnc-gw:
+
+**************
+VNC and VNC-GW
+**************
+
+This chapter describes how to use :abbr:`VNC (Virtual Network Control)`
+services, including :abbr:`NVA (Network Virtualization Authority)` and
+:abbr:`VNC-GW (VNC Gateway)` functions. Background information on NVAs,
+:abbr:`NVE (Network Virtualization Edge)` s, :abbr:`UN (Underlay Network)` s,
+and :abbr:`VN (Virtual Network)` is available from the
+`IETF <https://datatracker.ietf.org/wg/nvo3>`_. :abbr:`VNC-GW (VNC Gateway)` s
+support the import/export of routing information between VNC and :abbr:`CE
+(customer edge)` routers operating within a VN.  Both IP/Layer 3 (L3) VNs, and
+IP with Ethernet/Layer 2 (L2) VNs are supported.
+
+BGP, with IP VPNs and Tunnel Encapsulation, is used to distribute VN
+information between NVAs. BGP based IP VPN support is defined in :rfc:`4364`,
+and :rfc:`4659`. Encapsulation information is provided via the Tunnel
+Encapsulation Attribute, :rfc:`5512`.
+
+The protocol that is used to communicate routing and Ethernet / Layer 2 (L2)
+forwarding information between NVAs and NVEs is referred to as the Remote
+Forwarder Protocol (RFP). `OpenFlow` is an example RFP. Specific RFP
+implementations may choose to implement either a `hard-state` or `soft-state`
+prefix and address registration model. To support a `soft-state` refresh model,
+a `lifetime` in seconds is associated with all registrations and responses.
+
+The chapter also provides sample configurations for basic example scenarios.
+
+.. _configuring-vnc:
+
+Configuring VNC
+===============
+
+Virtual Network Control (:abbr:`VNC`) service configuration commands appear in
+the `router bgp` section of the BGPD configuration file
+(:ref:`bgp-configuration-examples`). The commands are broken down into the
+following areas:
+
+- :dfn:`General VNC` configuration applies to general VNC operation and is
+  primarily used to control the method used to advertise tunnel information.
+
+- :dfn:`Remote Forwarder Protocol (RFP)` configuration relates to the protocol
+  used between NVAs and NVEs.
+
+- :dfn:`VNC Defaults` provides default parameters for registered NVEs.
+
+- :dfn:`VNC NVE Group` provides for configuration of a specific set of
+  registered NVEs and overrides default parameters.
+
+- :dfn:`Redistribution` and :dfn:`Export` control VNC-GW operation, i.e., the
+  import/export of routing information between VNC and customer edge routers
+  (:abbr:`CE` s) operating within a VN.
+
+
+.. _general-vnc-configuration:
+
+General VNC Configuration
+-------------------------
+
+.. _rfp-related-configuration:
+
+RFP Related Configuration
+-------------------------
+
+The protocol that is used to communicate routing and Ethernet / L2 forwarding
+information between NVAs and NVEs is referred to as the Remote Forwarder
+Protocol (RFP). Currently, only a simple example RFP is included in FRR.
+Developers may use this example as a starting point to integrate FRR with an
+RFP of their choosing, e.g., `OpenFlow`. The example code includes the
+following sample configuration:
+
+.. clicmd:: rfp example-config-value VALUE
+
+This is a simple example configuration parameter included as part of the RFP
+example code. VALUE must be in the range of 0 to 4294967295.
+
+.. _vnc-defaults-configuration:
+
+VNC Defaults Configuration
+--------------------------
+
+The VNC Defaults section allows the user to specify default values for
+configuration parameters for all registered NVEs.
+Default values are overridden by :ref:`vnc-nve-group-configuration`.
+
+.. clicmd:: vnc defaults
+
+Enter VNC configuration mode for specifying VNC default behaviors. Use
+`exit-vnc` to leave VNC configuration mode. `vnc defaults` is optional.
+
+::
+
+   vnc defaults
+   ... various VNC defaults
+   exit-vnc
+
+
+These are the statements that can appear between ``vnc defaults`` and
+``exit-vnc``. Documentation for these statements is given in
+:ref:`vnc-nve-group-configuration`.
+
+- :clicmd:`rt import RT-LIST`
+- :clicmd:`rt export RT-LIST`
+- :clicmd:`rt both RT-LIST`
+- :clicmd:`rd ROUTE-DISTINGUISHER`
+- :clicmd:`l2rd NVE-ID-VALUE`
+- :clicmd:`response-lifetime LIFETIME|infinite`
+- :clicmd:`export bgp|zebra route-map MAP-NAME`
+- :clicmd:`export bgp|zebra no route-map`
+
+.. index:: exit-vnc
+.. clicmd:: exit-vnc
+
+   Exit VNC configuration mode.
+
+.. _vnc-nve-group-configuration:
+
+VNC NVE Group Configuration
+---------------------------
+
+A NVE Group corresponds to a specific set of NVEs. A Client NVE is
+assigned to an NVE Group based on whether there is a match for either
+its virtual or underlay network address against the VN and/or UN address
+prefixes specified in the NVE Group definition. When an NVE Group
+definition specifies both VN and UN address prefixes, then an NVE must
+match both prefixes in order to be assigned to the NVE Group. In the
+event that multiple NVE Groups match based on VN and/or UN addresses,
+the NVE is assigned to the first NVE Group listed in the configuration.
+If an NVE is not assigned to an NVE Group, its messages will be ignored.
+
+Configuration values specified for an NVE group apply to all
+member NVEs and override configuration values specified in the VNC
+Defaults section.
+
+**At least one `nve-group` is mandatory for useful VNC operation.**
+
+.. index:: vnc nve-group NAME
+.. clicmd:: vnc nve-group NAME
+
+  Enter VNC configuration mode for defining the NVE group `name`.
+  Use `exit` or `exit-vnc` to exit group configuration mode.
+
+  ::
+
+     vnc nve-group group1
+     ... configuration commands
+     exit-vnc
+
+
+.. index:: no vnc nve-group NAME
+.. clicmd:: no vnc nve-group NAME
+
+   Delete the NVE group named `name`.
+
+   The following statements are valid in an NVE group definition:
+
+.. index:: l2rd NVE-ID-VALUE
+.. clicmd:: l2rd NVE-ID-VALUE
+
+   Set the value used to distinguish NVEs connected to the same physical
+   Ethernet segment (i.e., at the same location) [#]_.
+
+   The nve-id subfield may be specified as either a literal value in the range
+   1-255, or it may be specified as `auto:vn`, which means to use the
+   least-significant octet of the originating NVE's VN address.
+
+.. index:: prefix vn|un A.B.C.D/M|X:X::X:X/M
+.. clicmd:: prefix vn|un A.B.C.D/M|X:X::X:X/M
+
+   Specify the matching prefix for this NVE group by either virtual-network
+   address (`vn`) or underlay-network address (`un`). Either or both
+   virtual-network and underlay-network prefixes may be specified. Subsequent
+   virtual-network or underlay-network values within a `vnc nve-group`
+   `exit-vnc` block override their respective previous values.
+
+   These prefixes are used only for determining assignments of NVEs to NVE
+   Groups.
+
+.. index:: rd ROUTE-DISTINGUISHER
+.. clicmd:: rd ROUTE-DISTINGUISHER
+
+   Specify the route distinguisher for routes advertised via BGP
+   VPNs. The route distinguisher must be in one of these forms:
+
+   - ``IPv4-address:two-byte-integer``
+   - ``four-byte-autonomous-system-number:two-byte-integer``
+   - ``two-byte-autonomous-system-number:four-byte-integer``
+   - ``auto:vn:two-byte-integer``
+
+   Routes originated by NVEs in the NVE group will use the group's specified
+   `route-distinguisher` when they are advertised via BGP.  If the `auto` form
+   is specified, it means that a matching NVE has its RD set to
+   ``rd_type=IP=1:IPv4-address=VN-address:two-byte-integer``, for IPv4 VN
+   addresses and
+   ``rd_type=IP=1:IPv4-address=Last-four-bytes-of-VN-address:two-byte-integer``,
+   for IPv6 VN addresses.
+
+   If the NVE group definition does not specify a `route-distinguisher`, then
+   the default `route-distinguisher` is used.  If neither a group nor a default
+   `route-distinguisher` is configured, then the advertised RD is set to
+   ``two-byte-autonomous-system-number=0:four-byte-integer=0``.
+
+.. index:: response-lifetime LIFETIME|infinite
+.. clicmd:: response-lifetime LIFETIME|infinite
+
+   Specify the response lifetime, in seconds, to be included in RFP response
+   messages sent to NVEs. If the value 'infinite' is given, an infinite
+   lifetime will be used.
+
+   Note that this parameter is not the same as the lifetime supplied by NVEs in
+   RFP registration messages. This parameter does not affect the lifetime value
+   attached to routes sent by this server via BGP.
+
+   If the NVE group definition does not specify a `response-lifetime`, the
+   default `response-lifetime` will be used.  If neither a group nor a default
+   `response-lifetime` is configured, the value 3600 will be used. The maximum
+   response lifetime is 2147483647.
+
+.. index:: rt export RT-LIST
+.. clicmd:: rt export RT-LIST
+
+.. index:: rt import RT-LIST
+.. clicmd:: rt import RT-LIST
+
+.. index:: rt both RT-LIST
+.. clicmd:: rt both RT-LIST
+
+   Specify route target import and export lists. `rt-list` is a
+   space-separated list of route targets, each element of which is
+   in one of the following forms:
+
+   - ``IPv4-address:two-byte-integer``
+   - ``four-byte-autonomous-system-number:two-byte-integer``
+   - ``two-byte-autonomous-system-number:four-byte-integer``
+
+   The first form, `rt export`, specifies an `export rt-list`.  The `export
+   rt-list` will be attached to routes originated by NVEs in the NVE group
+   when they are advertised via BGP.  If the NVE group definition does not
+   specify an `export rt-list`, then the default `export rt-list` is used.
+   If neither a group nor a default `export rt-list` is configured, then no
+   RT list will be sent; in turn, these routes will probably not be
+   processed by receiving NVAs.
+
+   The second form, `rt import` specifies an `import rt-list`, which is a
+   filter for incoming routes.  In order to be made available to NVEs in the
+   group, incoming BGP VPN routes must have RT lists that have at least one
+   route target in common with the group's `import rt-list`.
+
+   If the NVE group definition does not specify an import filter, then the
+   default `import rt-list` is used.  If neither a group nor a default
+   `import rt-list` is configured, there can be no RT intersections when
+   receiving BGP routes and therefore no incoming BGP routes will be
+   processed for the group.
+
+   The third, `rt both`, is a shorthand way of specifying both lists
+   simultaneously, and is equivalent to `rt export `rt-list`` followed by
+   `rt import `rt-list``.
+
+.. index:: export bgp|zebra route-map MAP-NAME
+.. clicmd:: export bgp|zebra route-map MAP-NAME
+
+   Specify that the named route-map should be applied to routes being exported
+   to bgp or zebra.  This paramter is used in conjunction with
+   :ref:`configuring-export-of-routes-to-other-routing-protocols`.  This item
+   is optional.
+
+.. index:: export bgp|zebra no route-map
+.. clicmd:: export bgp|zebra no route-map
+
+   Specify that no route-map should be applied to routes being exported to bgp
+   or zebra.  This paramter is used in conjunction with
+   :ref:`configuring-export-of-routes-to-other-routing-protocols`.  This item
+   is optional.
+
+.. index:: export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME
+.. clicmd:: export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME
+
+   Specify that the named prefix-list filter should be applied to routes being
+   exported to bgp or zebra. Prefix-lists for ipv4 and ipv6 are independent of
+   each other. This paramter is used in conjunction with
+   :ref:`configuring-export-of-routes-to-other-routing-protocols`.  This item
+   is optional.
+
+.. index:: export bgp|zebra no ipv4|ipv6 prefix-list
+.. clicmd:: export bgp|zebra no ipv4|ipv6 prefix-list
+
+   Specify that no prefix-list filter should be applied to routes being
+   exported to bgp or zebra. This parameter is used in conjunction with
+   :ref:`configuring-export-of-routes-to-other-routing-protocols`.  This item
+   is optional.
+
+.. _vnc-l2-group-configuration:
+
+VNC L2 Group Configuration
+--------------------------
+
+The route targets advertised with prefixes and addresses registered by an NVE
+are determined based on the NVE's associated VNC NVE Group Configuration,
+:ref:`vnc-nve-group-configuration`. Layer 2 (L2) Groups are used to override
+the route targets for an NVE's Ethernet registrations based on the Logical
+Network Identifier and label value.  A Logical Network Identifier is used to
+uniquely identify a logical Ethernet segment and is conceptually similar to the
+Ethernet Segment Identifier defined in :rfc:`7432`. Both the Logical Network
+Identifier and Label are passed to VNC via RFP prefix and address registration.
+
+Note that a corresponding NVE group configuration must be present, and that
+other NVE associated configuration information, notably RD, is not impacted by
+L2 Group Configuration.
+
+.. index:: vnc l2-group NAME
+.. clicmd:: vnc l2-group NAME
+
+   Enter VNC configuration mode for defining the L2 group `name`.
+   Use `exit` or `exit-vnc` to exit group configuration mode.
+
+   ::
+
+       vnc l2-group group1
+         ... configuration commands
+       exit-vnc
+
+
+.. index:: no vnc l2-group NAME
+.. clicmd:: no vnc l2-group NAME
+
+   Delete the L2 group named `name`.
+
+The following statements are valid in a L2 group definition:
+
+.. index:: logical-network-id VALUE
+.. clicmd:: logical-network-id VALUE
+
+   Define the Logical Network Identifier with a value in the range of
+   0-4294967295 that identifies the logical Ethernet segment.
+
+.. index:: labels LABEL-LIST
+.. clicmd:: labels LABEL-LIST
+
+.. index:: no labels LABEL-LIST
+.. clicmd:: no labels LABEL-LIST
+
+   Add or remove labels associated with the group. `label-list` is a
+   space separated list of label values in the range of 0-1048575.
+
+.. index:: rt import RT-TARGET
+.. clicmd:: rt import RT-TARGET
+
+.. index:: rt export RT-TARGET
+.. clicmd:: rt export RT-TARGET
+
+.. index:: rt both RT-TARGET
+.. clicmd:: rt both RT-TARGET
+
+   Specify the route target import and export value associated with the group.
+   A complete definition of these parameters is given above,
+   :ref:`vnc-nve-group-configuration`.
+
+.. _configuring-redistribution-of-routes-from-other-routing-protocols:
+
+Configuring Redistribution of Routes from Other Routing Protocols
+-----------------------------------------------------------------
+
+Routes from other protocols (including BGP) can be provided to VNC (both for
+RFP and for redistribution via BGP) from three sources: the zebra kernel
+routing process; directly from the main (default) unicast BGP RIB; or directly
+from a designated BGP unicast exterior routing RIB instance.
+
+The protocol named in the `vnc redistribute` command indicates the route
+source: `bgp-direct` routes come directly from the main (default) unicast BGP
+RIB and are available for RFP and are redistributed via BGP;
+`bgp-direct-to-nve-groups` routes come directly from a designated BGP unicast
+routing RIB and are made available only to RFP; and routes from other protocols
+come from the zebra kernel routing process.
+Note that the zebra process does not need to be active if
+only `bgp-direct` or `bgp-direct-to-nve-groups` routes are used.
+
+zebra routes
+^^^^^^^^^^^^
+
+Routes originating from protocols other than BGP must be obtained
+via the zebra routing process.
+Redistribution of these routes into VNC does not support policy mechanisms
+such as prefix-lists or route-maps.
+
+bgp-direct routes
+^^^^^^^^^^^^^^^^^
+
+`bgp-direct` redistribution supports policy via
+prefix lists and route-maps. This policy is applied to incoming
+original unicast routes before the redistribution translations
+(described below) are performed.
+
+Redistribution of `bgp-direct` routes is performed in one of three
+possible modes: `plain`, `nve-group`, or `resolve-nve`.
+The default mode is `plain`.
+These modes indicate the kind of translations applied to routes before
+they are added to the VNC RIB.
+
+In `plain` mode, the route's next hop is unchanged and the RD is set
+based on the next hop.
+For `bgp-direct` redistribution, the following translations are performed:
+
+- The VN address is set to the original unicast route's next hop address.
+- The UN address is NOT set. (VN->UN mapping will occur via
+  ENCAP route or attribute, based on `vnc advertise-un-method`
+  setting, generated by the RFP registration of the actual NVE)
+- The RD is set to as if auto:vn:0 were specified (i.e.,
+  `rd_type=IP=1`:`IPv4-address=VN-address`:`two-byte-integer=0`)
+- The RT list is included in the extended community list copied from the
+  original unicast route (i.e., it must be set in the original unicast route).
+
+In `nve-group` mode, routes are registered with VNC as if they came from an NVE
+in the nve-group designated in the `vnc redistribute nve-group` command. The
+following translations are performed:
+
+- The next hop/VN address is set to the VN prefix configured for the
+  redistribute nve-group.
+- The UN address is set to the UN prefix configured for the redistribute
+  nve-group.
+- The RD is set to the RD configured for the redistribute nve-group.
+- The RT list is set to the RT list configured for the redistribute nve-group.
+  If `bgp-direct` routes are being redistributed, any extended communities
+  present in the original unicast route will also be included.
+
+In `resolve-nve` mode, the next hop of the original BGP route is typically the
+address of an NVE connected router (CE) connected by one or more NVEs.
+Each of the connected NVEs will register, via RFP, a VNC host route to the CE.
+This mode may be though of as a mechanism to proxy RFP registrations of BGP
+unicast routes on behalf of registering NVEs.
+
+Multiple copies of the BGP route, one per matching NVE host route, will be
+added to VNC.  In other words, for a given BGP unicast route, each instance of
+a RFP-registered host route to the unicast route's next hop will result in an
+instance of an imported VNC route.  Each such imported VNC route will have a
+prefix equal to the original BGP unicast route's prefix, and a next hop equal
+to the next hop of the matching RFP-registered host route.  If there is no
+RFP-registered host route to the next hop of the BGP unicast route, no
+corresponding VNC route will be imported.
+
+The following translations are applied:
+
+- The Next Hop is set to the next hop of the NVE route (i.e., the
+  VN address of the NVE).
+
+- The extended community list in the new route is set to the
+  union of:
+
+- Any extended communities in the original BGP route
+
+  - Any extended communities in the NVE route
+  - An added route-origin extended community with the next hop of the
+    original BGP route
+    is added to the new route.
+    The value of the local administrator field defaults 5226 but may
+    be configured by the user via the `roo-ec-local-admin` parameter.
+
+- The Tunnel Encapsulation attribute is set to the value of the Tunnel
+  Encapsulation attribute of the NVE route, if any.
+
+
+bgp-direct-to-nve-groups routes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Unicast routes from the main or a designated instance of BGP may be
+redistributed to VNC as bgp-direct-to-nve-groups routes. These routes are NOT
+announced via BGP, but they are made available for local RFP lookup in response
+to queries from NVEs.
+
+A non-main/default BGP instance is configured using the `bgp multiple-instance`
+and `router bgp AS view NAME` commands as described elsewhere in this document.
+
+In order for a route in the unicast BGP RIB to be made available to a querying
+NVE, there must already be, available to that NVE, an (interior) VNC route
+matching the next hop address of the unicast route.  When the unicast route is
+provided to the NVE, its next hop is replaced by the next hop of the
+corresponding NVE. If there are multiple longest-prefix-match VNC routes, the
+unicast route will be replicated for each.
+
+There is currently no policy (prefix-list or route-map) support for
+`bgp-direct-to-nve-groups` routes.
+
+Redistribution Command Syntax
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. index:: vnc redistribute ipv4|ipv6 bgp|bgp-direct|ipv6 bgp-direct-to-nve-groups|connected|kernel|ospf|rip|static
+.. clicmd:: vnc redistribute ipv4|ipv6 bgp|bgp-direct|ipv6 bgp-direct-to-nve-groups|connected|kernel|ospf|rip|static
+
+.. index:: vnc redistribute ipv4|ipv6 bgp-direct-to-nve-groups view VIEWNAME
+.. clicmd:: vnc redistribute ipv4|ipv6 bgp-direct-to-nve-groups view VIEWNAME
+
+.. index:: no vnc redistribute ipv4|ipv6 bgp|bgp-direct|bgp-direct-to-nve-groups|connected|kernel|ospf|rip|static
+.. clicmd:: no vnc redistribute ipv4|ipv6 bgp|bgp-direct|bgp-direct-to-nve-groups|connected|kernel|ospf|rip|static
+
+   Import (or do not import) prefixes from another routing protocols. Specify
+   both the address family to import (`ipv4` or `ipv6`) and the protocol
+   (`bgp`, `bgp-direct`, `bgp-direct-to-nve-groups`, `connected`, `kernel`,
+   `ospf`, `rip`, or `static`). Repeat this statement as needed for each
+   combination of address family and routing protocol.  Prefixes from protocol
+   `bgp-direct` are imported from unicast BGP in the same bgpd process.
+   Prefixes from all other protocols (including `bgp`) are imported via the
+   `zebra` kernel routing process.
+
+.. index:: vnc redistribute mode plain|nve-group|resolve-nve
+.. clicmd:: vnc redistribute mode plain|nve-group|resolve-nve
+
+   Redistribute routes from other protocols into VNC using the specified mode.
+   Not all combinations of modes and protocols are supported.
+
+.. index:: vnc redistribute nve-group GROUP-NAME
+.. clicmd:: vnc redistribute nve-group GROUP-NAME
+
+.. index:: no vnc redistribute nve-group GROUP-NAME
+.. clicmd:: no vnc redistribute nve-group GROUP-NAME
+
+   When using `nve-group` mode, assign (or do not assign) the NVE group
+   `group-name` to routes redistributed from another routing protocol.
+   `group-name` must be configured using `vnc nve-group`.
+
+   The VN and UN prefixes of the nve-group must both be configured, and each
+   prefix must be specified as a full-length (/32 for IPv4, /128 for IPv6)
+   prefix.
+
+.. index:: vnc redistribute lifetime LIFETIME|infinite
+.. clicmd:: vnc redistribute lifetime LIFETIME|infinite
+
+   Assign a registration lifetime, either `lifetime` seconds or `infinite`, to
+   prefixes redistributed from other routing protocols as if they had been
+   received via RFP registration messages from an NVE. `lifetime` can be any
+   integer between 1 and 4294967295, inclusive.
+
+.. index:: vnc redistribute resolve-nve roo-ec-local-admin 0-65536
+.. clicmd:: vnc redistribute resolve-nve roo-ec-local-admin 0-65536
+
+   Assign a value to the local-administrator subfield used in the
+   Route Origin extended community that is assigned to routes exported
+   under the `resolve-nve` mode. The default value is `5226`.
+
+The following four `prefix-list` and `route-map` commands may be specified
+in the context of an nve-group or not.  If they are specified in the context
+of an nve-group, they apply only if the redistribution mode is `nve-group`,
+and then only for routes being redistributed from `bgp-direct`.  If they are
+specified outside the context of an nve-group, then they apply only for
+redistribution modes `plain` and `resolve-nve`, and then only for routes
+being redistributed from `bgp-direct`.
+
+.. index:: vnc redistribute bgp-direct (ipv4|ipv6) prefix-list LIST-NAME
+.. clicmd:: vnc redistribute bgp-direct (ipv4|ipv6) prefix-list LIST-NAME
+
+   When redistributing `bgp-direct` routes,
+   specifies that the named prefix-list should be applied.
+
+.. index:: vnc redistribute bgp-direct no (ipv4|ipv6) prefix-list
+.. clicmd:: vnc redistribute bgp-direct no (ipv4|ipv6) prefix-list
+
+   When redistributing `bgp-direct` routes,
+   specifies that no prefix-list should be applied.
+
+.. index:: vnc redistribute bgp-direct route-map  MAP-NAME
+.. clicmd:: vnc redistribute bgp-direct route-map  MAP-NAME
+
+   When redistributing `bgp-direct` routes,
+   specifies that the named route-map should be applied.
+
+.. index:: vnc redistribute bgp-direct no route-map
+.. clicmd:: vnc redistribute bgp-direct no route-map
+
+   When redistributing `bgp-direct` routes,
+   specifies that no route-map should be applied.
+
+.. _configuring-export-of-routes-to-other-routing-protocols:
+
+Configuring Export of Routes to Other Routing Protocols
+-------------------------------------------------------
+
+Routes from VNC (both for RFP and for redistribution via BGP) can be provided
+to other protocols, either via zebra or directly to BGP.
+
+It is important to note that when exporting routes to other protocols, the
+downstream protocol must also be configured to import the routes.  For example,
+when VNC routes are exported to unicast BGP, the BGP configuration must include
+a corresponding `redistribute vnc-direct` statement.
+
+.. index:: export bgp|zebra mode none|group-nve|registering-nve|ce
+.. clicmd:: export bgp|zebra mode none|group-nve|registering-nve|ce
+
+   Specify how routes should be exported to bgp or zebra.  If the mode is
+   `none`, routes are not exported.  If the mode is `group-nve`, routes are
+   exported according to nve-group or vrf-policy group configuration
+   (:ref:`vnc-nve-group-configuration`): if a group is configured to allow
+   export, then each prefix visible to the group is exported with next hops set
+   to the currently-registered NVEs.  If the mode is `registering-nve`, then all
+   VNC routes are exported with their original next hops.  If the mode is `ce`,
+   only VNC routes that have an NVE connected CE Router encoded in a Route
+   Origin Extended Community are exported.  This extended community must have an
+   administrative value that matches the configured `roo-ec-local-admin` value.
+   The next hop of the exported route is set to the encoded NVE connected CE
+   Router.
+
+   The default for both bgp and zebra is mode `none`.
+
+.. index:: vnc export bgp|zebra group-nve group GROUP-NAME
+.. clicmd:: vnc export bgp|zebra group-nve group GROUP-NAME
+
+.. index:: vnc export bgp|zebra group-nve no group GROUP-NAME
+.. clicmd:: vnc export bgp|zebra group-nve no group GROUP-NAME
+
+   When export mode is `group-nve`, export (or do not export) prefixes from the
+   specified nve-group or vrf-policy group to unicast BGP or to zebra.  Repeat
+   this statement as needed for each nve-group to be exported.  Each VNC prefix
+   that is exported will result in N exported routes to the prefix, each with a
+   next hop corresponding to one of the N NVEs currently associated with the
+   nve-group.
+
+Some commands have a special meaning under certain export modes.
+
+:clicmd:`export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME`
+   When export mode is `ce` or `registering-nve`,
+   specifies that the named prefix-list should be applied to routes
+   being exported to bgp or zebra.
+   Prefix-lists for ipv4 and ipv6 are independent of each other.
+
+:clicmd:`export bgp|zebra no ipv4|ipv6 prefix-list`
+   When export mode is `ce` or `registering-nve`,
+   specifies that no prefix-list should be applied to routes
+   being exported to bgp or zebra.
+
+:clicmd:`export bgp|zebra route-map MAP-NAME`
+   When export mode is `ce` or `registering-nve`, specifies that the named
+   route-map should be applied to routes being exported to bgp or zebra.
+
+:clicmd:`export bgp|zebra no route-map`
+   When export mode is `ce` or `registering-nve`, specifies that no route-map
+   should be applied to routes being exported to bgp or zebra.
+
+   When the export mode is `group-nve`, policy for exported routes is specified
+   per-NVE-group or vrf-policy group inside a `nve-group` `RFG-NAME` block via
+   the following commands(:ref:`vnc-nve-group-configuration`):
+
+:clicmd:`export bgp|zebra route-map MAP-NAME`
+   This command is valid inside a `nve-group` `RFG-NAME` block.  It specifies
+   that the named route-map should be applied to routes being exported to bgp
+   or zebra.
+
+:clicmd:`export bgp|zebra no route-map`
+   This command is valid inside a `nve-group` `RFG-NAME` block.  It specifies
+   that no route-map should be applied to routes being exported to bgp or
+   zebra.
+
+:clicmd:`export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME`
+   This command is valid inside a `nve-group` `RFG-NAME` block.  It specifies
+   that the named prefix-list filter should be applied to routes being exported
+   to bgp or zebra.  Prefix-lists for ipv4 and ipv6 are independent of each
+   other.
+
+:clicmd:`export bgp|zebra no ipv4|ipv6 prefix-list`
+   This command is valid inside a `nve-group` `RFG-NAME` block.  It specifies
+   that no prefix-list filter should be applied to routes being exported to
+   bgp or zebra.
+
+.. _manual-address-control:
+
+Manual Address Control
+======================
+
+The commands in this section can be used to augment normal dynamic VNC.  The
+`add vnc` commands can be used to manually add IP prefix or Ethernet MAC
+address forwarding information. The `clear vnc` commands can be used to remove
+manually and dynamically added information.
+
+.. clicmd:: add vnc prefix (A.B.C.D/M|X:X::X:X/M) vn (A.B.C.D|X:X::X:X) un (A.B.C.D|X:X::X:X) [cost (0-255)] [lifetime (infinite|(1-4294967295))] [local-next-hop (A.B.C.D|X:X::X:X) [local-cost (0-255)]]
+
+   Register an IP prefix on behalf of the NVE identified by the VN and UN
+   addresses. The `cost` parameter provides the administrative preference of
+   the forwarding information for remote advertisement. If omitted, it defaults
+   to 255 (lowest preference). The `lifetime` parameter identifies the period,
+   in seconds, that the information remains valid. If omitted, it defaults to
+   `infinite`. The optional `local-next-hop` parameter is used to configure a
+   nexthop to be used by an NVE to reach the prefix via a locally connected CE
+   router. This information remains local to the NVA, i.e., not passed to other
+   NVAs, and is only passed to registered NVEs. When specified, it is also
+   possible to provide a `local-cost` parameter to provide a forwarding
+   preference. If omitted, it defaults to 255 (lowest preference).
+
+.. clicmd:: add vnc mac xx:xx:xx:xx:xx:xx virtual-network-identifier (1-4294967295) vn (A.B.C.D|X:X::X:X) un (A.B.C.D|X:X::X:X) [prefix (A.B.C.D/M|X:X::X:X/M)] [cost (0-255)] [lifetime (infinite|(1-4294967295))]
+
+   Register a MAC address for a logical Ethernet (L2VPN) on behalf of the NVE
+   identified by the VN and UN addresses. The optional `prefix` parameter is to
+   support enable IP address mediation for the given prefix. The `cost`
+   parameter provides the administrative preference of the forwarding
+   information. If omitted, it defaults to 255. The `lifetime` parameter
+   identifies the period, in seconds, that the information remains valid. If
+   omitted, it defaults to `infinite`.
+
+.. clicmd:: clear vnc prefix (\*|A.B.C.D/M|X:X::X:X/M) (\*|[(vn|un) (A.B.C.D|X:X::X:X|\*) [(un|vn) (A.B.C.D|X:X::X:X|\*)] [mac xx:xx:xx:xx:xx:xx] [local-next-hop (A.B.C.D|X:X::X:X)])
+
+   Delete the information identified by prefix, VN address, and UN address.
+   Any or all of these parameters may be wilcarded to (potentially) match more
+   than one registration. The optional `mac` parameter specifies a layer-2 MAC
+   address that must match the registration(s) to be deleted. The optional
+   `local-next-hop` parameter is used to delete specific local nexthop
+   information.
+
+.. index:: clear vnc mac (\\*|xx:xx:xx:xx:xx:xx) virtual-network-identifier (\\*|(1-4294967295)) (\\*|[(vn|un) (A.B.C.D|X:X::X:X|\\*) [(un|vn) (A.B.C.D|X:X::X:X|\*)] [prefix (\\*|A.B.C.D/M|X:X::X:X/M)])
+.. clicmd:: clear vnc mac (\*|xx:xx:xx:xx:xx:xx) virtual-network-identifier (\*|(1-4294967295)) (\*|[(vn|un) (A.B.C.D|X:X::X:X|\*) [(un|vn) (A.B.C.D|X:X::X:X|\*)] [prefix (\*|A.B.C.D/M|X:X::X:X/M)])
+
+   Delete mac forwarding information. Any or all of these parameters may be
+   wilcarded to (potentially) match more than one registration. The default
+   value for the `prefix` parameter is the wildcard value `*`.
+
+.. index:: clear vnc nve (\*|((vn|un) (A.B.C.D|X:X::X:X) [(un|vn) (A.B.C.D|X:X::X:X)]))
+.. clicmd:: clear vnc nve (\*|((vn|un) (A.B.C.D|X:X::X:X) [(un|vn) (A.B.C.D|X:X::X:X)]))
+
+   Delete prefixes associated with the NVE specified by the given VN and UN
+   addresses. It is permissible to specify only one of VN or UN, in which case
+   any matching registration will be deleted. It is also permissible to specify
+   `*` in lieu of any VN or UN address, in which case all registrations will
+   match.
+
+.. _other-vnc-related-commands:
+
+Other VNC-Related Commands
+==========================
+
+Note: VNC-Related configuration can be obtained via the `show
+running-configuration` command when in `enable` mode.
+
+The following commands are used to clear and display Virtual Network Control
+related information:
+
+.. index:: clear vnc counters
+.. clicmd:: clear vnc counters
+
+   Reset the counter values stored by the NVA. Counter
+   values can be seen using the `show vnc` commands listed above. This
+   command is only available in `enable` mode.
+
+.. index:: show vnc summary
+.. clicmd:: show vnc summary
+
+   Print counter values and other general information
+   about the NVA. Counter values can be reset
+   using the `clear vnc counters` command listed below.
+
+.. index:: show vnc nves
+.. clicmd:: show vnc nves
+
+.. index:: show vnc nves vn|un ADDRESS
+.. clicmd:: show vnc nves vn|un ADDRESS
+
+   Display the NVA's current clients. Specifying `address` limits the output to
+   the NVEs whose addresses match `address`. The time since the NVA last
+   communicated with the NVE, per-NVE summary counters and each NVE's addresses
+   will be displayed.
+
+.. index:: show vnc queries
+.. clicmd:: show vnc queries
+
+.. index:: show vnc queries PREFIX
+.. clicmd:: show vnc queries PREFIX
+
+   Display active Query information. Queries remain valid for the default
+   Response Lifetime (:ref:`vnc-defaults-configuration`) or NVE-group Response
+   Lifetime (:ref:`vnc-nve-group-configuration`). Specifying `prefix` limits
+   the output to Query Targets that fall within `prefix`.
+
+   Query information is provided for each querying NVE, and includes the Query
+   Target and the time remaining before the information is removed.
+
+.. index:: show vnc registrations [all|local|remote|holddown|imported]
+.. clicmd:: show vnc registrations [all|local|remote|holddown|imported]
+
+.. index:: show vnc registrations [all|local|remote|holddown|imported] PREFIX
+.. clicmd:: show vnc registrations [all|local|remote|holddown|imported] PREFIX
+
+   Display local, remote, holddown, and/or imported registration information.
+   Local registrations are routes received via RFP, which are present in the
+   NVA Registrations Cache. Remote registrations are routes received via BGP
+   (VPN SAFIs), which are present in the NVE-group import tables. Holddown
+   registrations are local and remote routes that have been withdrawn but whose
+   holddown timeouts have not yet elapsed. Imported information represents
+   routes that are imported into NVA and are made available to querying NVEs.
+   Depending on configuration, imported routes may also be advertised via BGP.
+   Specifying `prefix` limits the output to the registered prefixes that fall
+   within `prefix`.
+
+   Registration information includes the registered prefix, the registering NVE
+   addresses, the registered administrative cost, the registration lifetime and
+   the time since the information was registered or, in the case of Holddown
+   registrations, the amount of time remaining before the information is
+   removed.
+
+.. index:: show vnc responses [active|removed]
+.. clicmd:: show vnc responses [active|removed]
+
+.. index:: show vnc responses [active|removed] PREFIX
+.. clicmd:: show vnc responses [active|removed] PREFIX
+
+   Display all, active and/or removed response information which are
+   present in the NVA Responses Cache. Responses remain valid for the
+   default Response Lifetime (:ref:`vnc-defaults-configuration`) or
+   NVE-group Response Lifetime (:ref:`vnc-nve-group-configuration`.)
+   When Removal Responses are enabled (:ref:`general-vnc-configuration`),
+   such responses are listed for the Response Lifetime. Specifying
+   `prefix` limits the output to the addresses that fall within
+   `prefix`.
+
+   Response information is provided for each querying NVE, and includes
+   the response prefix, the prefix-associated registering NVE addresses,
+   the administrative cost, the provided response lifetime and the time
+   remaining before the information is to be removed or will become inactive.
+
+.. index:: show memory vnc
+.. clicmd:: show memory vnc
+
+   Print the number of memory items allocated by the NVA.
+
+.. _example-vnc-and-vnc-gw-configurations:
+
+Example VNC and VNC-GW Configurations
+=====================================
+
+.. _vnc-mesh-nva-config:
+
+Mesh NVA Configuration
+----------------------
+
+This example includes three NVAs, nine NVEs, and two NVE groups. Note that
+while not shown, a single physical device may support multiple logical NVEs.
+:ref:`vnc-fig-vnc-mesh` shows ``code NVA-1`` (192.168.1.100), ``NVA 2``
+(192.168.1.101), and ``NVA 3`` (192.168.1.102), which are connected in a full
+mesh. Each is a member of the autonomous system 64512. Each NVA provides VNC
+services to three NVE clients in the 172.16.0.0/16 virtual-network address
+range. The 172.16.0.0/16 address range is partitioned into two NVE groups,
+``group1`` (172.16.0.0/17) and ``group2`` (172.16.128.0/17).
+
+Each NVE belongs to either NVE group ``group1`` or NVE group ``group2``.  The
+NVEs ``NVE 1``, ``NVE 2``, ``NVE 4``, ``NVE 7``, and ``NVE 8`` are members of
+the NVE group ``group1``.  The NVEs ``NVE 3``, ``NVE 5``, ``NVE 6``, and ``NVE
+9`` are members of the NVE group ``group2``.
+
+Each NVA advertises NVE underlay-network IP addresses using the
+Tunnel Encapsulation Attribute.
+
+.. _vnc-fig-vnc-mesh:
+
+.. figure:: ../figures/fig-vnc-mesh.png
+   :align: center
+   :alt: Three-way Mesh
+
+   A three-way full mesh with three NVEs per NVA.
+
+:file:`bgpd.conf` for ``NVA 1`` (192.168.1.100):::
+
+   router bgp 64512
+
+       bgp router-id 192.168.1.100
+
+       neighbor 192.168.1.101  remote-as 64512
+       neighbor 192.168.1.102  remote-as 64512
+
+       address-family ipv4 vpn
+           neighbor 192.168.1.101 activate
+           neighbor 192.168.1.102 activate
+       exit-address-family
+
+       vnc defaults
+           rd 64512:1
+           response-lifetime 200
+           rt both 1000:1 1000:2
+       exit-vnc
+
+       vnc nve-group group1
+           prefix vn 172.16.0.0/17
+           rt both 1000:1
+       exit-vnc
+
+       vnc nve-group group2
+           prefix vn 172.16.128.0/17
+           rt both 1000:2
+       exit-vnc
+
+   exit
+
+:file:`bgpd.conf` for ``NVA 2`` (192.168.1.101):::
+
+   router bgp 64512
+
+       bgp router-id 192.168.1.101
+
+       neighbor 192.168.1.100  remote-as 64512
+       neighbor 192.168.1.102  remote-as 64512
+
+       address-family ipv4 vpn
+           neighbor 192.168.1.100 activate
+           neighbor 192.168.1.102 activate
+       exit-address-family
+
+       vnc nve-group group1
+           prefix vn 172.16.0.0/17
+           rd 64512:1
+           response-lifetime 200
+           rt both 1000:1 1000:2
+       exit-vnc
+   exit
+
+:file:`bgpd.conf` for ``NVA 3`` (192.168.1.102):::
+
+   router bgp 64512
+
+       bgp router-id 192.168.1.102
+
+       neighbor 192.168.1.101  remote-as 64512
+       neighbor 192.168.1.102  remote-as 64512
+
+       address-family ipv4 vpn
+           neighbor 192.168.1.100 activate
+           neighbor 192.168.1.101 activate
+       exit-address-family
+
+       vnc defaults
+           rd 64512:1
+           response-lifetime 200
+           rt both 1000:1 1000:2
+       exit-vnc
+
+       vnc nve-group group1
+           prefix vn 172.16.128.0/17
+       exit-vnc
+   exit
+
+
+Mesh NVA and VNC-GW Configuration
+---------------------------------
+
+This example includes two NVAs, each with two associated NVEs, and two VNC-GWs,
+each supporting two CE routers physically attached to the four NVEs. Note that
+this example is showing a more complex configuration where VNC-GW is separated
+from normal NVA functions; it is equally possible to simplify the configuration
+and combine NVA and VNC-GW functions in a single FRR instance.
+
+.. _vnc-fig-vnc-gw:
+.. figure:: ../figures/fig-vnc-gw.png
+   :align: center
+   :alt: FRR VNC Gateway
+
+   Meshed NVEs and VNC-GWs
+
+As shown in :ref:`vnc-fig-vnc-gw`, NVAs and VNC-GWs are connected in a full iBGP
+mesh. The VNC-GWs each have two CEs configured as route-reflector clients.
+Each client provides BGP updates with unicast routes that the VNC-GW reflects
+to the other client. The VNC-GW also imports these unicast routes into VPN
+routes to be shared with the other VNC-GW and the two NVAs. This route
+importation is controlled with the ``vnc redistribute`` statements shown in the
+configuration. Similarly, registrations sent by NVEs via RFP to the NVAs are
+exported by the VNC-GWs to the route-reflector clients as unicast routes. RFP
+registrations exported this way have a next-hop address of the CE behind the
+connected (registering) NVE. Exporting VNC routes as IPv4 unicast is enabled
+with the ``vnc export`` command below.
+
+The configuration for ``VNC-GW 1`` is shown below.::
+
+   router bgp 64512
+    bgp router-id 192.168.1.101
+    bgp cluster-id 1.2.3.4
+    neighbor 192.168.1.102 remote-as 64512
+    neighbor 192.168.1.103 remote-as 64512
+    neighbor 192.168.1.104 remote-as 64512
+    neighbor 172.16.1.2 remote-as 64512
+    neighbor 172.16.2.2 remote-as 64512
+    !
+    address-family ipv4 unicast
+     redistribute vnc-direct
+     no neighbor 192.168.1.102 activate
+     no neighbor 192.168.1.103 activate
+     no neighbor 192.168.1.104 activate
+     neighbor 172.16.1.2 route-reflector-client
+     neighbor 172.16.2.2 route-reflector-client
+    exit-address-family
+    !
+    address-family ipv4 vpn
+      neighbor 192.168.1.102 activate
+      neighbor 192.168.1.103 activate
+      neighbor 192.168.1.104 activate
+    exit-address-family
+    vnc export bgp mode ce
+    vnc redistribute mode resolve-nve
+    vnc redistribute ipv4 bgp-direct
+    exit
+
+Note that in the VNC-GW configuration, the neighboring VNC-GW and NVAs each
+have a statement disabling the IPv4 unicast address family. IPv4 unicast is on
+by default and this prevents the other VNC-GW and NVAs from learning unicast
+routes advertised by the route-reflector clients.
+
+Configuration for ``NVA 2``:::
+
+   router bgp 64512
+    bgp router-id 192.168.1.104
+    neighbor 192.168.1.101 remote-as 64512
+    neighbor 192.168.1.102 remote-as 64512
+    neighbor 192.168.1.103 remote-as 64512
+    !
+    address-family ipv4 unicast
+     no neighbor 192.168.1.101 activate
+     no neighbor 192.168.1.102 activate
+     no neighbor 192.168.1.103 activate
+    exit-address-family
+    !
+    address-family ipv4 vpn
+      neighbor 192.168.1.101 activate
+      neighbor 192.168.1.102 activate
+      neighbor 192.168.1.103 activate
+    exit-address-family
+    !
+    vnc defaults
+     response-lifetime 3600
+     exit-vnc
+    vnc nve-group nve1
+     prefix vn 172.16.1.1/32
+     response-lifetime 3600
+     rt both 1000:1 1000:2
+     exit-vnc
+    vnc nve-group nve2
+     prefix vn 172.16.2.1/32
+     response-lifetime 3600
+     rt both 1000:1 1000:2
+     exit-vnc
+    exit
+
+.. TBD make this its own example:
+..
+.. @float Figure,fig:fig-vnc-gw-rr
+.. @center @image{fig-vnc-gw-rr,400pt,,Frr VNC Gateway with RR}
+.. @end float
+.. An NVA can also import unicast routes from BGP without advertising the
+.. imported routes as VPN routes.  Such imported routes, while not
+.. distributed to other NVAs or VNC-GWs, are are available to NVEs via
+.. RFP query messages sent to the NVA. @ref{fig:fig-vnc-gw-rr}
+.. shows an example topology where unicast routes are imported into NVAs
+.. from a Route Reflector.  (@pxref{Route Reflector} for route reflector
+.. configuration details.)  The following three lines can be added to the
+.. ``NVA 1`` and ``NVA 2`` configurations to import routes into VNC
+.. for local VNC use:
+..
+.. @verbatim
+..  neighbor 192.168.1.105 remote-as 64512
+..  vnc redistribute mode plain
+..  vnc redistribute ipv4 bgp-direct-to-nve-groups
+.. @end verbatim
+
+.. _vnc-with-frr-route-reflector-config:
+
+VNC with FRR Route Reflector Configuration
+------------------------------------------
+
+A route reflector eliminates the need for a fully meshed NVA network by acting
+as the hub between NVAs. :ref:`vnc-fig-vnc-frr-route-reflector` shows BGP
+route reflector ``BGP Route Reflector 1`` (192.168.1.100) as a route reflector
+for NVAs ``NVA 2``(192.168.1.101) and ``NVA 3`` (192.168.1.102).
+
+.. _vnc-fig-vnc-frr-route-reflector:
+.. figure:: ../figures/fig-vnc-frr-route-reflector.png
+   :align: center
+   :alt: FRR Route Reflector
+
+   Two NVAs and a BGP Route Reflector
+
+``NVA 2`` and ``NVA 3`` advertise NVE underlay-network IP addresses using the
+Tunnel Encapsulation Attribute. ``BGP Route Reflector 1`` ``reflects''
+advertisements from ``NVA 2`` to ``NVA 3`` and vice versa.
+
+As in the example of :ref:`vnc-mesh-nva-config`, there are two NVE groups.  The
+172.16.0.0/16 address range is partitioned into two NVE groups, ``group1``
+(172.16.0.0/17) and ``group2`` (172.16.128.0/17).  The NVE ``NVE 4``, ``NVE
+7``, and ``NVE 8`` are members of the NVE group ``group1``.  The NVEs ``NVE
+5``, ``NVE 6``, and ``NVE 9`` are members of the NVE group ``group2``.
+
+:file:`bgpd.conf` for ``BGP Route Reflector 1`` on 192.168.1.100:::
+
+   router bgp 64512
+
+       bgp router-id 192.168.1.100
+
+       neighbor 192.168.1.101 remote-as 64512
+       neighbor 192.168.1.101 port 7179
+       neighbor 192.168.1.101 description iBGP-client-192-168-1-101
+
+       neighbor 192.168.1.102 remote-as 64512
+       neighbor 192.168.1.102 port 7179
+       neighbor 192.168.1.102 description iBGP-client-192-168-1-102
+
+       address-family ipv4 unicast
+           neighbor 192.168.1.101 route-reflector-client
+           neighbor 192.168.1.102 route-reflector-client
+       exit-address-family
+
+       address-family ipv4 vpn
+           neighbor 192.168.1.101 activate
+           neighbor 192.168.1.102 activate
+
+           neighbor 192.168.1.101 route-reflector-client
+           neighbor 192.168.1.102 route-reflector-client
+       exit-address-family
+
+   exit
+
+:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:::
+
+   router bgp 64512
+
+       bgp router-id 192.168.1.101
+
+       neighbor 192.168.1.100  remote-as 64512
+
+       address-family ipv4 vpn
+           neighbor 192.168.1.100 activate
+       exit-address-family
+
+       vnc nve-group group1
+           prefix vn 172.16.0.0/17
+           rd 64512:1
+           response-lifetime 200
+           rt both 1000:1 1000:2
+       exit-vnc
+   exit
+
+:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.102:::
+
+  router bgp 64512
+
+      bgp router-id 192.168.1.102
+
+      neighbor 192.168.1.100  remote-as 64512
+
+      address-family ipv4 vpn
+          neighbor 192.168.1.100 activate
+      exit-address-family
+
+      vnc defaults
+          rd 64512:1
+          response-lifetime 200
+          rt both 1000:1 1000:2
+      exit-vnc
+
+      vnc nve-group group1
+          prefix vn 172.16.128.0/17
+      exit-vnc
+  exit
+
+While not shown, an NVA can also be configured as a route reflector.
+
+.. _vnc-with-commercial-route-reflector-config:
+
+VNC with Commercial Route Reflector Configuration
+-------------------------------------------------
+
+This example is identical to :ref:`vnc-with-frr-route-reflector-config`
+with the exception that the route reflector is a commercial router. Only the
+VNC-relevant configuration is provided.
+
+.. figure:: ../figures/fig-vnc-commercial-route-reflector.png
+   :align: center
+   :alt: Commercial Route Reflector
+
+   Two NVAs with a commercial route reflector
+
+:file:`bgpd.conf` for BGP route reflector ``Commercial Router`` on 192.168.1.104:::
+
+   version 8.5R1.13;
+   routing-options {
+       rib inet.0 {
+           static {
+               route 172.16.0.0/16 next-hop 192.168.1.104;
+           }
+       }
+       autonomous-system 64512;
+       resolution {
+           rib inet.3 {
+               resolution-ribs inet.0;
+           }
+           rib bgp.l3vpn.0 {
+               resolution-ribs inet.0;
+           }
+       }
+   }
+   protocols {
+       bgp {
+           advertise-inactive;
+           family inet {
+               labeled-unicast;
+           }
+          group 1 {
+               type internal;
+               advertise-inactive;
+               advertise-peer-as;
+               import h;
+               family inet {
+                   unicast;
+               }
+               family inet-vpn {
+                   unicast;
+               }
+               cluster 192.168.1.104;
+               neighbor 192.168.1.101;
+               neighbor 192.168.1.102;
+           }
+       }
+   }
+   policy-options {
+       policy-statement h {
+           from protocol bgp;
+           then {
+               as-path-prepend 64512;
+               accept;
+           }
+       }
+   }
+
+:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:::
+
+   router bgp 64512
+
+       bgp router-id 192.168.1.101
+
+       neighbor 192.168.1.100  remote-as 64512
+
+       address-family ipv4 vpn
+           neighbor 192.168.1.100 activate
+       exit-address-family
+
+       vnc nve-group group1
+           prefix vn 172.16.0.0/17
+           rd 64512:1
+           response-lifetime 200
+           rt both 1000:1 1000:2
+       exit-vnc
+   exit
+
+:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102:::
+
+   router bgp 64512
+
+       bgp router-id 192.168.1.102
+
+       neighbor 192.168.1.100  remote-as 64512
+
+       address-family ipv4 vpn
+           neighbor 192.168.1.100 activate
+       exit-address-family
+
+       vnc defaults
+           rd 64512:1
+           response-lifetime 200
+           rt both 1000:1 1000:2
+       exit-vnc
+
+       vnc nve-group group1
+           prefix vn 172.16.128.0/17
+       exit-vnc
+   exit
+
+VNC with Redundant Route Reflectors Configuration
+-------------------------------------------------
+
+This example combines the previous two
+(:ref:`vnc-with-frr-route-reflector-config` and
+:ref:`vnc-with-commercial-route-reflector-config`) into a redundant route
+reflector configuration.  BGP route reflectors ``BGP Route Reflector 1`` and
+``Commercial Router`` are the route reflectors for NVAs ``NVA 2`` and ``NVA
+3``.  The two NVAs have connections to both route reflectors.
+
+.. figure:: ../figures/fig-vnc-redundant-route-reflectors.png
+   :align: center
+   :alt: Redundant Route Reflectors
+
+   FRR-based NVA with redundant route reflectors
+
+:file:`bgpd.conf` for ``Bgpd Route Reflector 1`` on 192.168.1.100:::
+
+   router bgp 64512
+
+    bgp router-id 192.168.1.100
+    bgp cluster-id 192.168.1.100
+
+    neighbor 192.168.1.104 remote-as 64512
+
+    neighbor 192.168.1.101 remote-as 64512
+    neighbor 192.168.1.101 description iBGP-client-192-168-1-101
+    neighbor 192.168.1.101 route-reflector-client
+
+    neighbor 192.168.1.102 remote-as 64512
+    neighbor 192.168.1.102 description iBGP-client-192-168-1-102
+    neighbor 192.168.1.102 route-reflector-client
+
+    address-family ipv4 vpn
+     neighbor 192.168.1.101 activate
+     neighbor 192.168.1.102 activate
+     neighbor 192.168.1.104 activate
+
+     neighbor 192.168.1.101 route-reflector-client
+     neighbor 192.168.1.102 route-reflector-client
+    exit-address-family
+   exit
+
+:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:::
+
+    router bgp 64512
+
+     bgp router-id 192.168.1.101
+
+     neighbor 192.168.1.100  remote-as 64512
+     neighbor 192.168.1.104  remote-as 64512
+
+     address-family ipv4 vpn
+      neighbor 192.168.1.100 activate
+      neighbor 192.168.1.104 activate
+     exit-address-family
+
+     vnc nve-group group1
+      prefix vn 172.16.0.0/17
+      rd 64512:1
+      response-lifetime 200
+      rt both 1000:1 1000:2
+     exit-vnc
+    exit
+
+:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102:::
+
+   router bgp 64512
+
+    bgp router-id 192.168.1.102
+
+    neighbor 192.168.1.100  remote-as 64512
+    neighbor 192.168.1.104  remote-as 64512
+
+    address-family ipv4 vpn
+     neighbor 192.168.1.100 activate
+     neighbor 192.168.1.104 activate
+    exit-address-family
+
+    vnc defaults
+     rd 64512:1
+     response-lifetime 200
+     rt both 1000:1 1000:2
+    exit-vnc
+
+    vnc nve-group group1
+     prefix vn 172.16.128.0/17
+    exit-vnc
+   exit
+
+:file:`bgpd.conf` for the Commercial Router route reflector on 192.168.1.104:::
+
+   routing-options {
+       rib inet.0 {
+           static {
+               route 172.16.0.0/16 next-hop 192.168.1.104;
+           }
+       }
+       autonomous-system 64512;
+       resolution {
+           rib inet.3 {
+               resolution-ribs inet.0;
+           }
+           rib bgp.l3vpn.0 {
+               resolution-ribs inet.0;
+           }
+       }
+   }
+   protocols {
+       bgp {
+           advertise-inactive;
+           family inet {
+               labeled-unicast;
+           }
+          group 1 {
+               type internal;
+               advertise-inactive;
+               advertise-peer-as;
+               import h;
+               family inet {
+                   unicast;
+               }
+               family inet-vpn {
+                   unicast;
+               }
+               cluster 192.168.1.104;
+               neighbor 192.168.1.101;
+               neighbor 192.168.1.102;
+           }
+
+          group 2 {
+               type internal;
+               advertise-inactive;
+               advertise-peer-as;
+               import h;
+               family inet {
+                   unicast;
+               }
+               family inet-vpn {
+                   unicast;
+               }
+               neighbor 192.168.1.100;
+           }
+
+       }
+   }
+   policy-options {
+       policy-statement h {
+           from protocol bgp;
+           then {
+               as-path-prepend 64512;
+               accept;
+           }
+       }
+   }
+
+.. [#] The nve-id is carriedin the route distinguisher. It is the second octet
+       of the eight-octet route distinguisher generated for Ethernet / L2
+       advertisements. The first octet is a constant 0xFF, and the third
+       through eighth octets are set to the L2
+       ethernet address being advertised.
+
diff --git a/doc/user/vtysh.rst b/doc/user/vtysh.rst
new file mode 100644 (file)
index 0000000..52d54f4
--- /dev/null
@@ -0,0 +1,163 @@
+.. _vty-shell:
+
+*********
+VTY shell
+*********
+
+.. program:: configure
+
+*vtysh* provides a combined frontend to all FRR daemons in a single combined
+session. It is enabled by default at build time, but can be disabled through
+the :option:`--disable-vtysh` option to the configure script.
+
+*vtysh* has a configuration file, :file:`vtysh.conf`. The location of that
+file cannot be changed from |INSTALL_PREFIX_ETC| since it contains options
+controlling authentication behavior. This file will also not be written by
+configuration-save commands, it is intended to be updated manually by an
+administrator with an external editor.
+
+.. warning::
+
+   This also means the ``hostname`` and ``banner motd`` commands (which both do
+   have effect for vtysh) need to be manually updated in :file:`vtysh.conf`.
+
+
+Permissions and setup requirements
+==================================
+
+*vtysh* connects to running daemons through Unix sockets located in
+|INSTALL_PREFIX_STATE|. Running vtysh thus requires access to that directory,
+plus membership in the |INSTALL_VTY_GROUP| group (which is the group that the
+daemons will change ownership of their sockets to).
+
+To restrict access to FRR configuration, make sure no unauthorized users are
+members of the |INSTALL_VTY_GROUP| group.
+
+PAM support (experimental)
+--------------------------
+
+vtysh has working (but rather useless) PAM support. It will perform an
+"authenticate" PAM call using |PACKAGE_NAME| as service name. No other
+(accounting, session, password change) calls will be performed by vtysh.
+
+Users using vtysh still need to have appropriate access to the daemons' VTY
+sockets, usually by being member of the |INSTALL_VTY_GROUP| group. If they
+have this membership, PAM support is useless since they can connect to daemons
+and issue commands using some other tool. Alternatively, the *vtysh* binary
+could be made SGID (set group ID) to the |INSTALL_VTY_GROUP| group.
+
+.. warning::
+
+   No security guarantees are made for this configuration.
+
+
+.. index:: username USERNAME nopassword
+.. clicmd:: username USERNAME nopassword
+
+  If PAM support is enabled at build-time, this command allows disabling the
+  use of PAM on a per-user basis. If vtysh finds that an user is trying to
+  use vtysh and a "nopassword" entry is found, no calls to PAM will be made
+  at all.
+
+
+.. _integrated-configuration-mode:
+
+Integrated configuration mode
+=============================
+
+Integrated configuration mode uses a single configuration file,
+:file:`frr.conf`, for all daemons. This replaces the individual files like
+:file:`zebra.conf` or :file:`bgpd.conf`.
+
+:file:`frr.conf` is located in |INSTALL_PREFIX_ETC|. All daemons check for the
+existence of this file at startup, and if it exists will not load their
+individual configuration files. Instead, ``vtysh -b`` must be invoked to
+process :file:`frr.conf` and apply its settings to the individual daemons.
+
+.. warning::
+
+   *vtysh -b* must also be executed after restarting any daemon.
+
+
+Configuration saving, file ownership and permissions
+----------------------------------------------------
+
+The :file:`frr.conf` file is not written by any of the daemons; instead *vtysh*
+contains the neccessary logic to collect configuration from all of the daemons,
+combine it and write it out.
+
+.. warning::
+
+   Daemons must be running for *vtysh* to be able to collect their
+   configuration. Any configuration from non-running daemons is permanently
+   lost after doing a configuration save.
+
+Since the *vtysh* command may be running as ordinary user on the system,
+configuration writes will be tried through *watchfrr*, using the ``write
+integrated`` command internally. Since *watchfrr* is running as superuser,
+*vtysh* is able to ensure correct ownership and permissions on
+:file:`frr.conf`.
+
+If *watchfrr* is not running or the configuration write fails, *vtysh* will
+attempt to directly write to the file. This is likely to fail if running as
+unprivileged user; alternatively it may leave the file with incorrect owner or
+permissions.
+
+Writing the configuration can be triggered directly by invoking *vtysh -w*.
+This may be useful for scripting. Note this command should be run as either the
+superuser or the FRR user.
+
+We recommend you do not mix the use of the two types of files. Further, it is
+better not to use the integrated :file:`frr.conf` file, as any syntax error in
+it can lead to /all/ of your daemons being unable to start up. Per daemon files
+are more robust as impact of errors in configuration are limited to the daemon
+in whose file the error is made.
+
+.. index:: service integrated-vtysh-config
+.. clicmd:: service integrated-vtysh-config
+
+.. index:: no service integrated-vtysh-config
+.. clicmd:: no service integrated-vtysh-config
+
+   Control whether integrated :file:`frr.conf` file is written when
+   'write file' is issued.
+
+   These commands need to be placed in :file:`vtysh.conf` to have any effect.
+   Note that since :file:`vtysh.conf` is not written by FRR itself, they
+   therefore need to be manually placed in that file.
+
+   This command has 3 states:
+
+
+   service integrated-vtysh-config
+      *vtysh* will always write :file:`frr.conf`.
+
+
+   no service integrated-vtysh-config
+      *vtysh* will never write :file:`frr.conf`; instead it will ask
+      daemons to write their individual configuration files.
+
+   Neither option present (default)
+      *vtysh* will check whether :file:`frr.conf` exists. If it does,
+      configuration writes will update that file. Otherwise, writes are performed
+      through the individual daemons.
+
+   This command is primarily intended for packaging/distribution purposes, to
+   preset one of the two operating modes and ensure consistent operation across
+   installations.
+
+.. index:: write integrated
+.. clicmd:: write integrated
+
+   Unconditionally (regardless of ``service integrated-vtysh-config`` setting)
+   write out integrated :file:`frr.conf` file through *watchfrr*. If *watchfrr*
+   is not running, this command is unavailable.
+
+.. warning::
+
+   Configuration changes made while some daemon is not running will be
+   invisible to that daemon. The daemon will start up with its saved
+   configuration (either in its individual configuration file, or in
+   :file:`frr.conf`).  This is particularly troublesome for route-maps and
+   prefix lists, which would otherwise be synchronized between daemons.
+
diff --git a/doc/user/zebra.rst b/doc/user/zebra.rst
new file mode 100644 (file)
index 0000000..70a69cf
--- /dev/null
@@ -0,0 +1,628 @@
+.. _zebra:
+
+*****
+Zebra
+*****
+
+*zebra* is an IP routing manager. It provides kernel routing
+table updates, interface lookups, and redistribution of routes between
+different routing protocols.
+
+.. _invoking-zebra:
+
+Invoking zebra
+==============
+
+Besides the common invocation options (:ref:`common-invocation-options`), the
+*zebra* specific invocation options are listed below.
+
+.. program:: zebra
+
+.. option:: -b
+.. option:: --batch
+
+   Runs in batch mode. *zebra* parses configuration file and terminates
+   immediately.
+
+.. option:: -k
+.. option:: --keep_kernel
+
+   When zebra starts up, don't delete old self inserted routes.
+
+.. option:: -r
+.. option:: --retain
+
+   When program terminates, retain routes added by zebra.
+
+.. program:: configure
+
+.. _interface-commands:
+
+Interface Commands
+==================
+
+.. _standard-commands:
+
+Standard Commands
+-----------------
+
+.. index:: interface IFNAME
+
+.. clicmd:: interface IFNAME
+
+.. index:: shutdown
+
+.. clicmd:: shutdown
+.. index:: no shutdown
+
+.. clicmd:: no shutdown
+
+   Up or down the current interface.
+
+.. index:: ip address ADDRESS/PREFIX
+
+.. clicmd:: ip address ADDRESS/PREFIX
+.. index:: ipv6 address ADDRESS/PREFIX
+
+.. clicmd:: ipv6 address ADDRESS/PREFIX
+.. index:: no ip address ADDRESS/PREFIX
+
+.. clicmd:: no ip address ADDRESS/PREFIX
+.. index:: no ipv6 address ADDRESS/PREFIX
+
+.. clicmd:: no ipv6 address ADDRESS/PREFIX
+
+   Set the IPv4 or IPv6 address/prefix for the interface.
+
+.. index:: ip address LOCAL-ADDR peer PEER-ADDR/PREFIX
+
+.. clicmd:: ip address LOCAL-ADDR peer PEER-ADDR/PREFIX
+.. index:: no ip address LOCAL-ADDR peer PEER-ADDR/PREFIX
+
+.. clicmd:: no ip address LOCAL-ADDR peer PEER-ADDR/PREFIX
+
+   Configure an IPv4 Pointopoint address on the interface. (The concept of PtP
+   addressing does not exist for IPv6.)
+
+   `local-addr` has no subnet mask since the local side in PtP addressing is
+   always a single (/32) address. `peer-addr/prefix` can be an arbitrary subnet
+   behind the other end of the link (or even on the link in Point-to-Multipoint
+   setups), though generally /32s are used.
+
+.. index:: ip address ADDRESS/PREFIX secondary
+
+.. clicmd:: ip address ADDRESS/PREFIX secondary
+.. index:: no ip address ADDRESS/PREFIX secondary
+
+.. clicmd:: no ip address ADDRESS/PREFIX secondary
+
+   Set the secondary flag for this address. This causes ospfd to not treat the
+   address as a distinct subnet.
+
+.. index:: description DESCRIPTION ...
+
+.. clicmd:: description DESCRIPTION ...
+
+   Set description for the interface.
+
+.. index:: multicast
+
+.. clicmd:: multicast
+.. index:: no multicast
+
+.. clicmd:: no multicast
+
+   Enable or disables multicast flag for the interface.
+
+.. index:: bandwidth (1-10000000)
+
+.. clicmd:: bandwidth (1-10000000)
+.. index:: no bandwidth (1-10000000)
+
+.. clicmd:: no bandwidth (1-10000000)
+
+   Set bandwidth value of the interface in kilobits/sec. This is for
+   calculating OSPF cost. This command does not affect the actual device
+   configuration.
+
+.. index:: link-detect
+
+.. clicmd:: link-detect
+.. index:: no link-detect
+
+.. clicmd:: no link-detect
+
+   Enable/disable link-detect on platforms which support this. Currently only
+   Linux and Solaris, and only where network interface drivers support
+   reporting link-state via the ``IFF_RUNNING`` flag.
+
+.. _link-parameters-commands:
+
+Link Parameters Commands
+------------------------
+
+.. index:: link-params
+.. clicmd:: link-params
+
+.. index:: no link-param
+.. clicmd:: no link-param
+
+   Enter into the link parameters sub node. At least 'enable' must be set to
+   activate the link parameters, and consequently Traffic Engineering on this
+   interface. MPLS-TE must be enable at the OSPF
+   (:ref:`ospf-traffic-engineering`) or ISIS (:ref:`isis-traffic-engineering`)
+   router level in complement to this.  Disable link parameters for this
+   interface.
+
+   Under link parameter statement, the following commands set the different TE values:
+
+.. index:: link-params [enable]
+.. clicmd:: link-params [enable]
+
+   Enable link parameters for this interface.
+
+.. index:: link-params [metric (0-4294967295)]
+.. clicmd:: link-params [metric (0-4294967295)]
+
+.. index:: link-params max-bw BANDWIDTH
+.. clicmd:: link-params max-bw BANDWIDTH
+
+.. index:: link-params max-rsv-bw BANDWIDTH
+.. clicmd:: link-params max-rsv-bw BANDWIDTH
+
+.. index:: link-params unrsv-bw (0-7) BANDWIDTH
+.. clicmd:: link-params unrsv-bw (0-7) BANDWIDTH
+
+.. index:: link-params admin-grp BANDWIDTH
+.. clicmd:: link-params admin-grp BANDWIDTH
+
+   These commands specifies the Traffic Engineering parameters of the interface
+   in conformity to RFC3630 (OSPF) or RFC5305 (ISIS).  There are respectively
+   the TE Metric (different from the OSPF or ISIS metric), Maximum Bandwidth
+   (interface speed by default), Maximum Reservable Bandwidth, Unreserved
+   Bandwidth for each 0-7 priority and Admin Group (ISIS) or Resource
+   Class/Color (OSPF).
+
+   Note that BANDIWDTH is specified in IEEE floating point format and express
+   in Bytes/second.
+
+.. index::  link-param delay (0-16777215) [min (0-16777215) | max (0-16777215)]
+.. clicmd:: link-param delay (0-16777215) [min (0-16777215) | max (0-16777215)]
+
+.. index::  link-param delay-variation (0-16777215)
+.. clicmd:: link-param delay-variation (0-16777215)
+
+.. index::  link-param packet-loss PERCENTAGE
+.. clicmd:: link-param packet-loss PERCENTAGE
+
+.. index::  link-param res-bw BANDWIDTH
+.. clicmd:: link-param res-bw BANDWIDTH
+
+.. index::  link-param ava-bw BANDWIDTH
+.. clicmd:: link-param ava-bw BANDWIDTH
+
+.. index::  link-param use-bw BANDWIDTH
+.. clicmd:: link-param use-bw BANDWIDTH
+
+   These command specifies additionnal Traffic Engineering parameters of the
+   interface in conformity to draft-ietf-ospf-te-metrics-extension-05.txt and
+   draft-ietf-isis-te-metrics-extension-03.txt. There are respectively the
+   delay, jitter, loss, available bandwidth, reservable bandwidth and utilized
+   bandwidth.
+
+   Note that BANDWIDTH is specified in IEEE floating point format and express
+   in Bytes/second.  Delays and delay variation are express in micro-second
+   (µs). Loss is specified in PERCENTAGE ranging from 0 to 50.331642% by step
+   of 0.000003.
+
+.. index:: link-param neighbor <A.B.C.D> as (0-65535)
+.. clicmd:: link-param neighbor <A.B.C.D> as (0-65535)
+
+.. index:: link-param no neighbor
+.. clicmd:: link-param no neighbor
+
+   Specifies the remote ASBR IP address and Autonomous System (AS) number
+   for InterASv2 link in OSPF (RFC5392).  Note that this option is not yet
+   supported for ISIS (RFC5316).
+
+.. _static-route-commands:
+
+Static Route Commands
+=====================
+
+Static routing is a very fundamental feature of routing technology. It
+defines static prefix and gateway.
+
+.. index:: ip route NETWORK GATEWAY
+.. clicmd:: ip route NETWORK GATEWAY
+
+   NETWORK is destination prefix with format of A.B.C.D/M. GATEWAY is gateway
+   for the prefix. When GATEWAY is A.B.C.D format. It is taken as a IPv4
+   address gateway. Otherwise it is treated as an interface name. If the
+   interface name is ``null0`` then zebra installs a blackhole route.
+
+   Some example configuration:
+
+   ::
+      ip route 10.0.0.0/8 10.0.0.2
+      ip route 10.0.0.0/8 ppp0
+      ip route 10.0.0.0/8 null0
+
+   First example defines 10.0.0.0/8 static route with gateway 10.0.0.2.
+   Second one defines the same prefix but with gateway to interface ppp0. The
+   third install a blackhole route.
+
+.. index:: ip route NETWORK NETMASK GATEWAY
+.. clicmd:: ip route NETWORK NETMASK GATEWAY
+
+   This is alternate version of above command. When NETWORK is
+   A.B.C.D format, user must define NETMASK value with A.B.C.D
+   format. GATEWAY is same option as above command.
+
+   ::
+
+      ip route 10.0.0.0 255.255.255.0 10.0.0.2
+      ip route 10.0.0.0 255.255.255.0 ppp0
+      ip route 10.0.0.0 255.255.255.0 null0
+
+
+   These statements are equivalent to those in the previous example.
+
+.. index:: ip route NETWORK GATEWAY DISTANCE
+.. clicmd:: ip route NETWORK GATEWAY DISTANCE
+
+   Installs the route with the specified distance.
+
+Multiple nexthop static route
+
+::
+
+   ip route 10.0.0.1/32 10.0.0.2
+   ip route 10.0.0.1/32 10.0.0.3
+   ip route 10.0.0.1/32 eth0
+
+
+If there is no route to 10.0.0.2 and 10.0.0.3, and interface eth0
+is reachable, then the last route is installed into the kernel.
+
+If zebra has been compiled with multipath support, and both 10.0.0.2 and
+10.0.0.3 are reachable, zebra will install a multipath route via both
+nexthops, if the platform supports this.
+
+::
+
+   zebra> show ip route
+   S>  10.0.0.1/32 [1/0] via 10.0.0.2 inactive
+       via 10.0.0.3 inactive
+     *       is directly connected, eth0
+
+
+::
+
+   ip route 10.0.0.0/8 10.0.0.2
+   ip route 10.0.0.0/8 10.0.0.3
+   ip route 10.0.0.0/8 null0 255
+
+
+This will install a multihop route via the specified next-hops if they are
+reachable, as well as a high-metric blackhole route, which can be useful to
+prevent traffic destined for a prefix to match less-specific routes (eg
+default) should the specified gateways not be reachable. Eg:
+
+::
+
+   zebra> show ip route 10.0.0.0/8
+   Routing entry for 10.0.0.0/8
+     Known via "static", distance 1, metric 0
+       10.0.0.2 inactive
+       10.0.0.3 inactive
+
+   Routing entry for 10.0.0.0/8
+     Known via "static", distance 255, metric 0
+       directly connected, Null0
+
+
+.. index:: ipv6 route NETWORK GATEWAY
+.. clicmd:: ipv6 route NETWORK GATEWAY
+
+.. index:: ipv6 route NETWORK GATEWAY DISTANCE
+.. clicmd:: ipv6 route NETWORK GATEWAY DISTANCE
+
+   These behave similarly to their ipv4 counterparts.
+
+.. index:: ipv6 route NETWORK from SRCPREFIX GATEWAY
+.. clicmd:: ipv6 route NETWORK from SRCPREFIX GATEWAY
+
+.. index:: ipv6 route NETWORK from SRCPREFIX GATEWAY DISTANCE
+.. clicmd:: ipv6 route NETWORK from SRCPREFIX GATEWAY DISTANCE
+
+   Install a static source-specific route. These routes are currently supported
+   on Linux operating systems only, and perform AND matching on packet's
+   destination and source addresses in the kernel's forwarding path. Note that
+   destination longest-prefix match is "more important" than source LPM, e.g.
+   *"2001:db8:1::/64 from 2001:db8::/48"* will win over
+   *"2001:db8::/48 from 2001:db8:1::/64"* if both match.
+
+.. index:: table TABLENO
+.. clicmd:: table TABLENO
+
+   Select the primary kernel routing table to be used. This only works
+   for kernels supporting multiple routing tables (like GNU/Linux 2.2.x
+   and later). After setting TABLENO with this command,
+   static routes defined after this are added to the specified table.
+
+.. _multicast-rib-commands:
+
+Multicast RIB Commands
+======================
+
+The Multicast RIB provides a separate table of unicast destinations which
+is used for Multicast Reverse Path Forwarding decisions. It is used with
+a multicast source's IP address, hence contains not multicast group
+addresses but unicast addresses.
+
+This table is fully separate from the default unicast table. However,
+RPF lookup can include the unicast table.
+
+WARNING: RPF lookup results are non-responsive in this version of FRR,
+i.e. multicast routing does not actively react to changes in underlying
+unicast topology!
+
+.. index:: ip multicast rpf-lookup-mode MODE
+.. clicmd:: ip multicast rpf-lookup-mode MODE
+
+.. index:: no ip multicast rpf-lookup-mode [MODE]
+.. clicmd:: no ip multicast rpf-lookup-mode [MODE]
+
+   MODE sets the method used to perform RPF lookups. Supported modes:
+
+urib-only
+   Performs the lookup on the Unicast RIB. The Multicast RIB is never used.
+
+mrib-only
+   Performs the lookup on the Multicast RIB. The Unicast RIB is never used.
+
+mrib-then-urib
+   Tries to perform the lookup on the Multicast RIB. If any route is found,
+   that route is used. Otherwise, the Unicast RIB is tried.
+
+lower-distance
+   Performs a lookup on the Multicast RIB and Unicast RIB each. The result
+   with the lower administrative distance is used;  if they're equal, the
+   Multicast RIB takes precedence.
+
+longer-prefix
+   Performs a lookup on the Multicast RIB and Unicast RIB each. The result
+   with the longer prefix length is used;  if they're equal, the
+   Multicast RIB takes precedence.
+
+   The `mrib-then-urib` setting is the default behavior if nothing is
+   configured. If this is the desired behavior, it should be explicitly
+   configured to make the configuration immune against possible changes in
+   what the default behavior is.
+
+.. warning::
+   Unreachable routes do not receive special treatment and do not cause
+   fallback to a second lookup.
+
+.. index:: show ip rpf ADDR
+.. clicmd:: show ip rpf ADDR
+
+   Performs a Multicast RPF lookup, as configured with ``ip multicast
+   rpf-lookup-mode MODE``. ADDR specifies the multicast source address to look
+   up.
+
+   ::
+
+      > show ip rpf 192.0.2.1
+      Routing entry for 192.0.2.0/24 using Unicast RIB
+
+      Known via "kernel", distance 0, metric 0, best
+      * 198.51.100.1, via eth0
+
+
+   Indicates that a multicast source lookup for 192.0.2.1 would use an
+   Unicast RIB entry for 192.0.2.0/24 with a gateway of 198.51.100.1.
+
+.. index:: show ip rpf
+.. clicmd:: show ip rpf
+
+   Prints the entire Multicast RIB. Note that this is independent of the
+   configured RPF lookup mode, the Multicast RIB may be printed yet not
+   used at all.
+
+.. index:: ip mroute PREFIX NEXTHOP [DISTANCE]
+.. clicmd:: ip mroute PREFIX NEXTHOP [DISTANCE]
+
+.. index:: no ip mroute PREFIX NEXTHOP [DISTANCE]
+.. clicmd:: no ip mroute PREFIX NEXTHOP [DISTANCE]
+
+   Adds a static route entry to the Multicast RIB. This performs exactly as the
+   ``ip route`` command, except that it inserts the route in the Multicast RIB
+   instead of the Unicast RIB.
+
+.. _zebra-route-filtering:
+
+zebra Route Filtering
+=====================
+
+Zebra supports :dfn:`prefix-list` s and :ref:`route-map` s to match routes
+received from other FRR components. The permit/deny facilities provided by
+these commands can be used to filter which routes zebra will install in the
+kernel.
+
+.. index:: ip protocol PROTOCOL route-map ROUTEMAP
+.. clicmd:: ip protocol PROTOCOL route-map ROUTEMAP
+
+   Apply a route-map filter to routes for the specified protocol. PROTOCOL can
+   be **any** or one of
+
+   - system,
+   - kernel,
+   - connected,
+   - static,
+   - rip,
+   - ripng,
+   - ospf,
+   - ospf6,
+   - isis,
+   - bgp,
+   - hsls.
+
+.. index:: set src ADDRESS
+.. clicmd:: set src ADDRESS
+
+   Within a route-map, set the preferred source address for matching routes
+   when installing in the kernel.
+
+
+The following creates a prefix-list that matches all addresses, a route-map
+that sets the preferred source address, and applies the route-map to all
+*rip* routes.
+
+::
+
+   ip prefix-list ANY permit 0.0.0.0/0 le 32
+   route-map RM1 permit 10
+        match ip address prefix-list ANY
+        set src 10.0.0.1
+
+   ip protocol rip route-map RM1
+
+
+.. _zebra-fib-push-interface:
+
+zebra FIB push interface
+========================
+
+Zebra supports a 'FIB push' interface that allows an external
+component to learn the forwarding information computed by the FRR
+routing suite. This is a loadable module that needs to be enabled
+at startup as described in :ref:`loadable-module-support`.
+
+In FRR, the Routing Information Base (RIB) resides inside
+zebra. Routing protocols communicate their best routes to zebra, and
+zebra computes the best route across protocols for each prefix. This
+latter information makes up the Forwarding Information Base
+(FIB). Zebra feeds the FIB to the kernel, which allows the IP stack in
+the kernel to forward packets according to the routes computed by
+FRR. The kernel FIB is updated in an OS-specific way. For example,
+the `netlink` interface is used on Linux, and route sockets are
+used on FreeBSD.
+
+The FIB push interface aims to provide a cross-platform mechanism to
+support scenarios where the router has a forwarding path that is
+distinct from the kernel, commonly a hardware-based fast path. In
+these cases, the FIB needs to be maintained reliably in the fast path
+as well. We refer to the component that programs the forwarding plane
+(directly or indirectly) as the Forwarding Plane Manager or FPM.
+
+The FIB push interface comprises of a TCP connection between zebra and
+the FPM. The connection is initiated by zebra -- that is, the FPM acts
+as the TCP server.
+
+The relevant zebra code kicks in when zebra is configured with the
+:option:`--enable-fpm` flag. Zebra periodically attempts to connect to
+the well-known FPM port. Once the connection is up, zebra starts
+sending messages containing routes over the socket to the FPM. Zebra
+sends a complete copy of the forwarding table to the FPM, including
+routes that it may have picked up from the kernel. The existing
+interaction of zebra with the kernel remains unchanged -- that is, the
+kernel continues to receive FIB updates as before.
+
+The encapsulation header for the messages exchanged with the FPM is
+defined by the file :file:`fpm/fpm.h` in the frr tree. The routes
+themselves are encoded in netlink or protobuf format, with netlink
+being the default.
+
+Protobuf is one of a number of new serialization formats wherein the
+message schema is expressed in a purpose-built language. Code for
+encoding/decoding to/from the wire format is generated from the
+schema. Protobuf messages can be extended easily while maintaining
+backward-compatibility with older code. Protobuf has the following
+advantages over netlink:
+
+- Code for serialization/deserialization is generated automatically. This
+  reduces the likelihood of bugs, allows third-party programs to be integrated
+  quickly, and makes it easy to add fields.
+- The message format is not tied to an OS (Linux), and can be evolved
+  independently.
+
+As mentioned before, zebra encodes routes sent to the FPM in netlink
+format by default. The format can be controlled via the FPM module's
+load-time option to zebra, which currently takes the values `netlink`
+and `protobuf`.
+
+The zebra FPM interface uses replace semantics. That is, if a 'route
+add' message for a prefix is followed by another 'route add' message,
+the information in the second message is complete by itself, and
+replaces the information sent in the first message.
+
+If the connection to the FPM goes down for some reason, zebra sends
+the FPM a complete copy of the forwarding table(s) when it reconnects.
+
+zebra Terminal Mode Commands
+============================
+
+.. index:: show ip route
+.. clicmd:: show ip route
+
+   Display current routes which zebra holds in its database.
+
+::
+
+    Router# show ip route
+    Codes: K - kernel route, C - connected, S - static, R - RIP,
+     B - BGP * - FIB route.
+
+    K* 0.0.0.0/0        203.181.89.241
+    S  0.0.0.0/0        203.181.89.1
+    C* 127.0.0.0/8      lo
+    C* 203.181.89.240/28      eth0
+
+
+.. index:: show ipv6 route
+.. clicmd:: show ipv6 route
+
+.. index:: show interface
+.. clicmd:: show interface
+
+.. index:: show ip prefix-list [NAME]
+.. clicmd:: show ip prefix-list [NAME]
+
+.. index:: show route-map [NAME]
+.. clicmd:: show route-map [NAME]
+
+.. index:: show ip protocol
+.. clicmd:: show ip protocol
+
+.. index:: show ipforward
+.. clicmd:: show ipforward
+
+   Display whether the host's IP forwarding function is enabled or not.
+   Almost any UNIX kernel can be configured with IP forwarding disabled.
+   If so, the box can't work as a router.
+
+.. index:: show ipv6forward
+.. clicmd:: show ipv6forward
+
+   Display whether the host's IP v6 forwarding is enabled or not.
+
+.. index:: show zebra
+.. clicmd:: show zebra
+
+   Display various statistics related to the installation and deletion
+   of routes, neighbor updates, and LSP's into the kernel.
+
+.. index:: show zebra fpm stats
+.. clicmd:: show zebra fpm stats
+
+   Display statistics related to the zebra code that interacts with the
+   optional Forwarding Plane Manager (FPM) component.
+
+.. index:: clear zebra fpm stats
+.. clicmd:: clear zebra fpm stats
+
+   Reset statistics related to the zebra code that interacts with the
+   optional Forwarding Plane Manager (FPM) component.
+
diff --git a/doc/vnc.texi b/doc/vnc.texi
deleted file mode 100644 (file)
index 6193d3c..0000000
+++ /dev/null
@@ -1,1593 +0,0 @@
-@c -*-texinfo-*-
-@c This is part of the Frr Manual.
-@c @value{COPYRIGHT_STR}
-@c See file frr.texi for copying conditions.
-
-@node VNC and VNC-GW
-@chapter VNC and VNC-GW
-This chapter describes how to use
-Virtual Network Control (@acronym{VNC}) services,
-including Network Virtualization Authority (@acronym{NVA}) and 
-VNC Gateway (@acronym{VNC-GW}) functions.
-Background information on NVAs, 
-Network Virtualization Edges (@acronym{NVE}s), underlay networks (@acronym{UN}s),
-and virtual networks (@acronym{VN}s) is available from the  
-@url{https://datatracker.ietf.org/wg/nvo3,IETF Network Virtualization Overlays (@acronym{NVO3}) Working Group}.
-VNC Gateways (@acronym{VNC-GW}s) support the import/export of routing
-information between VNC and customer edge routers (@acronym{CE}s)
-operating within a VN.  Both IP/Layer 3 (L3) VNs, and IP with
-Ethernet/Layer 2 (L2) VNs are supported.
-
-BGP, with IP VPNs and Tunnel Encapsulation, is used to distribute VN
-information between NVAs. BGP based IP VPN support is defined in
-@cite{RFC4364, BGP/MPLS IP Virtual Private Networks (VPNs)}, and
-@cite{RFC4659, BGP-MPLS IP Virtual Private Network (VPN) Extension for
-IPv6 VPN }.  Encapsulation information is provided via
-the Tunnel Encapsulation Attribute, @cite{RFC5512, The BGP
-Encapsulation Subsequent Address Family Identifier (SAFI) and the BGP
-Tunnel Encapsulation Attribute}, are supported.
-
-The protocol that is used to communicate routing and Ethernet / Layer 2
-(L2) forwarding information between NVAs and NVEs is referred to as the
-Remote Forwarder Protocol (RFP). @code{OpenFlow} is an example
-RFP.  Specific RFP implementations may choose to implement either a
-@code{hard-state} or @code{soft-state} prefix and address registration
-model.  To support a @code{soft-state} refresh model, a @var{lifetime}
-in seconds is associated with all registrations and responses.
-
-The chapter also provides sample configurations for basic example scenarios.  
-
-@menu
-* Configuring VNC Services::
-* Manual Address Control::
-* Other VNC-Related Commands::
-* Example VNC and VNC-GW Configurations::
-* Release Notes::
-@end menu
-
-@node Configuring VNC Services
-@section Configuring VNC
-
-Virtual Network Control (@acronym{VNC}) service configuration commands
-appear in the @code{router bgp} section of the BGPD configuration file
-(@pxref{BGP Configuration Examples}). The commands are broken down into
-the following areas:
-
-@menu
-* General VNC Configuration::
-* RFP Related Configuration::
-* VNC Defaults Configuration::
-* VNC NVE Group Configuration::
-* VNC L2 Group Configuration::
-* Configuring Redistribution of Routes from Other Routing Protocols::
-* Configuring Export of Routes to Other Routing Protocols::
-@end menu
-
-@code{General VNC} configuration applies to general VNC operation and is
-primarily used to control the method used to advertise tunnel
-information.  
-
-@code{Remote Forwarder Protocol (RFP)} configuration relates to the
-protocol used between NVAs and NVEs.  
-
-@code{VNC Defaults} provides default parameters for registered NVEs.
-
-@code{VNC NVE Group} provides for configuration of a specific set of 
-registered NVEs and overrides default parameters.
-
-@code{Redistribution} and @code{Export} control VNC-GW operation, i.e.,
-the  import/export of routing
-information between VNC and customer edge routers (@acronym{CE}s)
-operating within a VN.
-
-@node General VNC Configuration
-@subsection General VNC Configuration
-
-@deffn {VNC} {vnc advertise-un-method encap-attr} {}
-Advertise NVE underlay-network IP addresses using
-the UN address sub-TLV of the Tunnel Encapsulation attribute
-(@code{encap-attr}). The default is @code{encap-attr}. 
-@end deffn
-
-@node RFP Related Configuration
-@subsection RFP Related Configuration 
-
-The protocol that is used to communicate routing and Ethernet / L2
-forwarding information between NVAs and NVEs is referred to as the
-Remote Forwarder Protocol (RFP).  Currently, only a simple example RFP
-is included in Frr.  Developers may use this example as a starting
-point to integrate Frr with an RFP of their choosing, e.g.,
-@code{OpenFlow}.  The example code includes the following sample
-configuration: 
-
-@deffn {RFP} {rfp example-config-value @var{VALUE}} 
-This is a simple example configuration parameter included as part of the
-RFP example code.  @code{VALUE} must be in the range of 0 to 4294967295.
-@end deffn
-
-@node VNC Defaults Configuration
-@subsection VNC Defaults Configuration
-
-The VNC Defaults section allows the user to specify default values for
-configuration parameters for all registered NVEs.
-Default values are overridden by @ref{VNC NVE Group Configuration}. 
-
-@deffn {VNC} {vnc defaults} {}
-Enter VNC configuration mode for specifying VNC default behaviors.  Use
-@code{exit-vnc} to leave VNC configuration mode.  @code{vnc
-defaults} is optional.
-
-@example
-vnc defaults
-  ... various VNC defaults
-exit-vnc
-@end example
-@end deffn
-
-These are the statements that can appear between @code{vnc defaults}
-and @code{exit-vnc}.
-
-@deffn {VNC} {rt import @var{rt-list}} {}
-@deffnx {VNC} {rt export @var{rt-list}} {}
-@deffnx {VNC} {rt both @var{rt-list}} {}
-
-Specify default route target import and export lists.  @var{rt-list} is a
-space-separated list of route targets, each element of which is
-in one of the following forms:
-@itemize
-@item @var{IPv4-address}:@var{two-byte-integer}
-@item @var{four-byte-autonomous-system-number}:@var{two-byte-integer}
-@item @var{two-byte-autonomous-system-number}:@var{four-byte-integer}
-@end itemize
-
-If no default import RT list is specified, then the default import RT
-list is empty.
-If no default export RT list is specified, then the default export RT
-list is empty.
-
-A complete definition of these parameters is
-given below (@pxref{VNC NVE Group Configuration}).
-
-@end deffn
-
-@deffn {VNC} {rd @var{route-distinguisher}}
-
-Specify the default route distinguisher (RD) for routes advertised via BGP
-VPNs.  The route distinguisher must be in one of four forms:
-@itemize
-@item @var{IPv4-address}:@var{two-byte-integer}
-@item @var{four-byte-autonomous-system-number}:@var{two-byte-integer}
-@item @var{two-byte-autonomous-system-number}:@var{four-byte-integer}
-@item auto:vn:@var{two-byte-integer}
-@end itemize
-
-If RD is specified in the defaults section, the default RD
-value is @var{two-byte-autonomous-system-number=0}:@var{four-byte-integer=0}.
-
-A complete definition of this parameter is
-given below (@pxref{VNC NVE Group Configuration}).
-@end deffn
-
-@deffn {VNC} {l2rd @var{nve-id-value}}
-Set the value used to distinguish NVEs connected to the same logical
-Ethernet segment (i.e., L2VPN).
-
-A complete definition of this parameter is
-given below (@pxref{VNC NVE Group Configuration}).
-@end deffn
-
-@deffn {VNC} {response-lifetime @var{lifetime}|infinite} {}
-Specify the default lifetime to be included in RFP
-response messages sent to NVEs.
-
-A complete definition of this parameter is
-given below (@pxref{VNC NVE Group Configuration}).
-
-@end deffn
-
-@deffn {VNC} {export bgp|zebra route-map MAP-NAME}
-Specify that the named route-map should be applied to routes
-being exported to bgp or zebra.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra no route-map}
-Specify that no route-map should be applied to routes
-being exported to bgp or zebra.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME}
-Specify that the named prefix-list filter should be applied to
-routes being exported to bgp or zebra.
-Prefix-lists for ipv4 and ipv6 are independent of each other.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra no ipv4|ipv6 prefix-list}
-Specify that no prefix-list filter should be applied to
-routes being exported to bgp or zebra.
-@end deffn
-
-@deffn {VNC} {exit-vnc} {}
-Exit VNC configuration mode.
-@end deffn
-
-@c The following example @code{vnc defaults} defines a route target import-export
-@c list for the route targets 1000:1 and 1000:2; a default route
-@c distinguisher, 4444:10; and a default response lifetime of 500
-@c seconds.
-@c 
-@c @example
-@c vnc defaults
-@c     rt both 1000:1 1000:2
-@c     rd 4444:10
-@c     response-lifetime 500
-@c exit-vnc
-@c @end example
-
-@node VNC NVE Group Configuration
-@subsection VNC NVE Group Configuration
-
-A NVE Group corresponds to a specific set of NVEs.  A Client NVE is
-assigned to an NVE Group based on whether there is a match for either
-its virtual or underlay network address against the VN and/or UN address
-prefixes specified in the NVE Group definition.  When an NVE Group
-definition specifies both VN and UN address prefixes, then an NVE must
-match both prefixes in order to be assigned to the NVE Group.  In the
-event that multiple NVE Groups match based on VN and/or UN addresses,
-the NVE is assigned to the first NVE Group listed in the configuration.  
-If an NVE is not assigned to an NVE Group, its messages will be ignored.
-
-Configuration values specified for an NVE group apply to all
-member NVEs and override configuration values specified in the VNC
-Defaults section.
-
-@strong{At least one @code{nve-group} is mandatory for useful VNC
-operation.}
-
-@deffn {VNC} {vnc nve-group @var{name}} {}
-Enter VNC configuration mode for defining the NVE group @var{name}.  
-Use @code{exit} or @code{exit-vnc} to exit group configuration mode.
-
-@example
-vnc nve-group group1
-  ... configuration commands
-exit-vnc
-@end example
-@end deffn
-
-@deffn {VNC} {no vnc nve-group @var{name}} {}
-Delete the NVE group named @var{name}.
-@end deffn
-
-The following statements are valid in an NVE group definition:
-
-@deffn {VNC} {l2rd @var{nve-id-value}}
-Set the value used to distinguish NVEs connected to the same physical
-Ethernet segment (i.e., at the same location)@footnote{The nve-id is
-carried in the route
-distinguisher.  It is the second octet of the eight-octet route
-distinguisher generated for Ethernet / L2 advertisements.
-The first octet is a constant 0xFF, and the third through eighth
-octets are set to the L2 ethernet address being advertised.}
-
-The nve-id subfield may be specified as either a literal value
-in the range 1-255, or it may be specified as @code{auto:vn}, which
-means to use the least-significant octet of the originating
-NVE's VN address.
-@end deffn
-
-@deffn {VNC} {prefix vn|un A.B.C.D/M|X:X::X:X/M} {}
-@anchor{prefix}
-Specify the matching prefix for this NVE group by either virtual-network address
-(@code{vn}) or underlay-network address (@code{un}). Either or both virtual-network
-and underlay-network prefixes may be specified.  Subsequent virtual-network or
-underlay-network values within a @code{vnc nve-group} @code{exit-vnc}
-block override their respective previous values.
-
-These prefixes are used only for determining assignments of NVEs
-to NVE Groups.
-@end deffn
-
-@deffn {VNC} {rd @var{route-distinguisher}}
-Specify the route distinguisher for routes advertised via BGP
-VPNs.  The route distinguisher must be in one of these forms:
-@itemize
-@item @var{IPv4-address}:@var{two-byte-integer}
-@item @var{four-byte-autonomous-system-number}:@var{two-byte-integer}
-@item @var{two-byte-autonomous-system-number}:@var{four-byte-integer}
-@item auto:vn:@var{two-byte-integer}
-@end itemize
-
-Routes originated by NVEs in the NVE group will use
-the group's specified @var{route-distinguisher} when they are
-advertised via BGP. 
-If the @code{auto} form is specified, it means that a matching NVE has
-its RD set to
-@var{rd_type=IP=1}:@var{IPv4-address=VN-address}:@var{two-byte-integer},
-for IPv4 VN addresses and
-@var{rd_type=IP=1}:@var{IPv4-address=Last-four-bytes-of-VN-address}:@var{two-byte-integer},
-for IPv6 VN addresses.
-
-If the NVE group definition does not specify a @var{route-distinguisher},
-then the default @var{route-distinguisher} is used.
-If neither a group nor a default @var{route-distinguisher} is
-configured, then the advertised RD is set to
-@var{two-byte-autonomous-system-number=0}:@var{four-byte-integer=0}.
-@end deffn
-
-@deffn {VNC} {response-lifetime @var{lifetime}|infinite} {}
-Specify the response lifetime, in seconds, to be included in RFP
-response messages sent to NVEs.  If the value
-``infinite'' is given, an infinite lifetime will be used.
-
-Note that this parameter is not the same as the lifetime supplied by
-NVEs in RFP registration messages. This parameter does not affect
-the lifetime value attached to routes sent by this server via BGP.
-
-If the NVE group definition does not specify a @var{response-lifetime},
-the default @var{response-lifetime} will be used.
-If neither a group nor a default @var{response-lifetime} is configured,
-the value 3600 will be used.  The maximum response lifetime is 2147483647.
-@end deffn
-
-@deffn {VNC} {rt export @var{rt-list}} {}
-@deffnx {VNC} {rt import @var{rt-list}} {}
-@deffnx {VNC} {rt both @var{rt-list}} {}
-Specify route target import and export lists.  @var{rt-list} is a
-space-separated list of route targets, each element of which is
-in one of the following forms:
-@itemize
-@item @var{IPv4-address}:@var{two-byte-integer}
-@item @var{four-byte-autonomous-system-number}:@var{two-byte-integer}
-@item @var{two-byte-autonomous-system-number}:@var{four-byte-integer}
-@end itemize
-
-The first form, @code{rt export}, specifies an @var{export rt-list}.
-The @var{export rt-list} will be attached to routes originated by
-NVEs in the NVE group when they are advertised via BGP. 
-If the NVE group definition does not specify an @var{export rt-list},
-then the default @var{export rt-list} is used.
-If neither a group nor a default @var{export rt-list} is configured,
-then no RT list will be sent; in turn, these routes will probably
-not be processed
-by receiving NVAs.
-
-The second form, @code{rt import} specifies an @var{import rt-list},
-which is a filter for incoming routes.
-In order to be made available to NVEs in the group,
-incoming BGP VPN @w{SAFI} routes must have
-RT lists that have at least one route target in common with the
-group's @var{import rt-list}.
-
-If the NVE group definition does not specify an import filter,
-then the default @var{import rt-list} is used.
-If neither a group nor a default @var{import rt-list} is configured,
-there can be no RT intersections when receiving BGP routes and
-therefore no incoming BGP routes will be processed for the group.
-
-The third, @code{rt both}, is a shorthand way of specifying both
-lists simultaneously, and is equivalent to @code{rt export @var{rt-list}}
-followed by @code{rt import @var{rt-list}}.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra route-map MAP-NAME}
-Specify that the named route-map should be applied to routes
-being exported to bgp or zebra. 
-This paramter is used in conjunction with 
-@ref{Configuring Export of Routes to Other Routing Protocols}.
-This item is optional.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra no route-map}
-Specify that no route-map should be applied to routes
-being exported to bgp or zebra. 
-This paramter is used in conjunction with 
-@ref{Configuring Export of Routes to Other Routing Protocols}.
-This item is optional.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME}
-Specify that the named prefix-list filter should be applied to
-routes being exported to bgp or zebra.
-Prefix-lists for ipv4 and ipv6 are independent of each other. 
-This paramter is used in conjunction with 
-@ref{Configuring Export of Routes to Other Routing Protocols}.
-This item is optional.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra no ipv4|ipv6 prefix-list}
-Specify that no prefix-list filter should be applied to
-routes being exported to bgp or zebra. 
-This paramter is used in conjunction with 
-@ref{Configuring Export of Routes to Other Routing Protocols}.
-This item is optional.
-@end deffn
-
-@c The following example shows two @code{vnc nve-group} definitions.  The first one,
-@c ``group1'', applies to the IPV4 virtual-network route prefix 172.16/16.  It
-@c sets the response lifetime to 200 seconds.  It defines a route target
-@c import-export filter for the route targets 1000:1 and 1000:2
-@c 
-@c The second @code{vnc nve-group} definition, ``group2'', applies to the IPV6
-@c underlay-network route prefix 10.0.2/24.  It defines the same response
-@c lifetime and import-export filter as ``group1''.
-@c 
-@c @example
-@c vnc nve-group group1
-@c     prefix vn 172.16/16
-@c     response-lifetime 200
-@c     rt both 1000:1 1000:2
-@c exit-vnc
-@c 
-@c vnc nve-group group2
-@c     prefix un 10.0.2/24
-@c     response-lifetime 200
-@c     rt both 1000:1 1000:2
-@c exit-vnc
-@c @end example
-
-@node VNC L2 Group Configuration
-@subsection VNC L2 Group Configuration
-
-The route targets advertised with prefixes and addresses registered by
-an NVE are determined based on the NVE's associated VNC NVE Group
-Configuration, @pxref{VNC NVE Group Configuration}.  Layer 2 (L2) Groups
-are used to override the route targets for an NVE's Ethernet
-registrations based on the Logical Network Identifier and label value.
-A Logical Network Identifier is used to uniquely identify a logical
-Ethernet segment and is conceptually similar to the Ethernet Segment
-Identifier defined in @cite{RFC7432, BGP MPLS-Based Ethernet VPN}.  Both
-the Logical Network Identifier and Label are passed to VNC via RFP
-prefix and address registration.
-
-Note that a corresponding NVE group configuration must be present, and
-that other NVE associated configuration information, notably RD, is
-not impacted by L2 Group Configuration.
-
-@deffn {VNC} {vnc l2-group @var{name}} {}
-Enter VNC configuration mode for defining the L2 group @var{name}.  
-Use @code{exit} or @code{exit-vnc} to exit group configuration mode.
-
-@example
-vnc l2-group group1
-  ... configuration commands
-exit-vnc
-@end example
-@end deffn
-
-@deffn {VNC} {no vnc l2-group @var{name}} {}
-Delete the L2 group named @var{name}.
-@end deffn
-
-The following statements are valid in a L2 group definition:
-
-@deffn {VNC} {logical-network-id @var{VALUE}}
-Define the Logical Network Identifier with a value in the range of
-0-4294967295 that identifies the logical Ethernet segment. 
-@end deffn
-
-@deffn {VNC} {labels @var{label-list}}
-@deffnx {VNC} {no labels @var{label-list}}
-Add or remove labels associated with the group.  @var{label-list} is a
-space separated list of label values in the range of 0-1048575.
-@end deffn
-
-@deffn {VNC} {rt import @var{rt-target}} {}
-@deffnx {VNC} {rt export @var{rt-target}} {}
-@deffnx {VNC} {rt both @var{rt-target}} {}
-Specify the route target import and export value associated with the
-group. A complete definition of these parameters is given above,
-@pxref{VNC NVE Group Configuration}.
-@end deffn
-
-
-@node Configuring Redistribution of Routes from Other Routing Protocols
-@subsection Configuring Redistribution of Routes from Other Routing Protocols
-
-Routes from other protocols (including BGP) can be provided to VNC (both
-for RFP and for redistribution via BGP)
-from three sources: the zebra kernel routing process;
-directly from the main (default) unicast BGP RIB; or directly
-from a designated BGP unicast exterior routing RIB instance.
-
-The protocol named in the @code{vnc redistribute} command indicates
-the route source:
-@code{bgp-direct} routes come directly from the main (default)
-unicast BGP RIB and are available for RFP and are redistributed via BGP;
-@code{bgp-direct-to-nve-groups} routes come directly from a designated
-BGP unicast routing RIB and are made available only to RFP;
-and routes from other protocols come from the zebra kernel
-routing process.
-Note that the zebra process does not need to be active if
-only @code{bgp-direct} or @code{bgp-direct-to-nve-groups} routes are used.
-
-@subsubsection @code{zebra} routes
-
-Routes originating from protocols other than BGP must be obtained
-via the zebra routing process.
-Redistribution of these routes into VNC does not support policy mechanisms
-such as prefix-lists or route-maps.
-
-@subsubsection @code{bgp-direct} routes
-
-@code{bgp-direct} redistribution supports policy via
-prefix lists and route-maps. This policy is applied to incoming
-original unicast routes before the redistribution translations
-(described below) are performed.
-
-Redistribution of @code{bgp-direct} routes is performed in one of three
-possible modes: @code{plain}, @code{nve-group}, or @code{resolve-nve}.
-The default mode is @code{plain}.
-These modes indicate the kind of translations applied to routes before
-they are added to the VNC RIB.
-
-In @code{plain} mode, the route's next hop is unchanged and the RD is set
-based on the next hop.
-For @code{bgp-direct} redistribution, the following translations are performed:
-@itemize @bullet
-@item
-The VN address is set to the original unicast route's next hop address.
-@item
-The UN address is NOT set. (VN->UN mapping will occur via
-ENCAP route or attribute, based on @code{vnc advertise-un-method}
-setting, generated by the RFP registration of the actual NVE) 
-@item
-The RD is set to as if auto:vn:0 were specified (i.e.,
-@var{rd_type=IP=1}:@var{IPv4-address=VN-address}:@var{two-byte-integer=0})
-@item
-The RT list is included in the extended community list copied from the
-original unicast route (i.e., it must be set in the original unicast route).
-@end itemize
-
-
-
-In @code{nve-group} mode, routes are registered with VNC as
-if they came from an NVE in the nve-group designated in the
-@code{vnc redistribute nve-group} command. The following
-translations are performed:
-
-@itemize @bullet
-@item
-The next hop/VN address is set to the VN prefix configured for the
-redistribute nve-group.
-@item
-The UN address is set to the UN prefix configured for the
-redistribute nve-group.
-@item
-The RD is set to the RD configured for the redistribute nve-group.
-@item
-The RT list is set to the RT list configured for the redistribute nve-group.
-If @code{bgp-direct} routes are being redistributed, 
-any extended communities present in the original unicast route
-will also be included.
-@end itemize
-
-
-In @code{resolve-nve} mode, the next hop of the original BGP route is
-typically the address of an NVE connected router (CE) connected by one or
-more NVEs.
-Each of the connected NVEs will register, via RFP, a VNC host route
-to the CE.
-This mode may be though of as a mechanism to proxy RFP registrations
-of BGP unicast routes on behalf of registering NVEs.
-
-Multiple copies of the BGP route, one per matching NVE host route, will be
-added to VNC.
-In other words, for a given BGP unicast route, each instance of a
-RFP-registered host route to the unicast route's next hop will result
-in an instance of an imported VNC route.
-Each such imported VNC route will have a prefix equal to the original
-BGP unicast route's prefix, and a next hop equal to the next hop of the
-matching RFP-registered host route.
-If there is no RFP-registered host route to the next hop of the BGP unicast
-route, no corresponding VNC route will be imported.
-
-The following translations are applied:
-
-@itemize @bullet
-@item
-The Next Hop is set to the next hop of the NVE route (i.e., the
-VN address of the NVE).
-
-@item
-The extended community list in the new route is set to the 
-union of:
-@itemize @minus
-@item
-Any extended communities in the original BGP route
-@item
-Any extended communities in the NVE route
-@item
-An added route-origin extended community with the next hop of the
-original BGP route
-is added to the new route.
-The value of the local administrator field defaults 5226 but may
-be configured by the user via the @code{roo-ec-local-admin} parameter.
-@end itemize
-
-@item
-The Tunnel Encapsulation attribute is set to the value of the Tunnel
-Encapsulation attribute of the NVE route, if any.
-
-@end itemize
-
-@subsubsection @code{bgp-direct-to-nve-groups} routes
-
-Unicast routes from the main or a designated instance of BGP
-may be redistributed to VNC as bgp-direct-to-nve-groups routes. These
-routes are NOT announced via BGP,
-but they are made available for local RFP lookup in response to
-queries from NVEs.
-
-A non-main/default BGP instance is configured using the
-@code{bgp multiple-instance} and @code{router bgp AS view NAME}
-commands as described elsewhere in this document.
-
-In order for a route in the unicast BGP RIB to be made
-available to a querying NVE, there must already be, available to
-that NVE, an (interior) VNC route matching the next hop address
-of the unicast route.
-When the unicast route is provided to the NVE, its next hop 
-is replaced by the next hop of the corresponding
-NVE. If there are multiple longest-prefix-match VNC routes,
-the unicast route will be replicated for each.
-
-There is currently no policy (prefix-list or route-map) support
-for @code{bgp-direct-to-nve-groups} routes.
-
-@subsubsection Redistribution Command Syntax
-
-@deffn {VNC} {vnc redistribute ipv4|ipv6 bgp|bgp-direct|ipv6 bgp-direct-to-nve-groups|connected|kernel|ospf|rip|static} {}
-@deffnx {VNC} {vnc redistribute ipv4|ipv6 bgp-direct-to-nve-groups view @var{VIEWNAME}} {}
-@deffnx {VNC} {no vnc redistribute ipv4|ipv6 bgp|bgp-direct|bgp-direct-to-nve-groups|connected|kernel|ospf|rip|static} {}
-Import (or do not import) prefixes from another routing
-protocols. Specify both the address family to import (@code{ipv4} or
-@code{ipv6}) and the protocol (@code{bgp}, @code{bgp-direct},
-@code{bgp-direct-to-nve-groups}, @code{connected},
-@code{kernel}, @code{ospf}, @code{rip}, or @code{static}).  Repeat
-this statement as needed for each combination of address family and
-routing protocol.
-Prefixes from protocol @code{bgp-direct} are imported from unicast BGP
-in the same bgpd process.
-Prefixes from all other protocols (including @code{bgp}) are imported
-via the @code{zebra} kernel routing process.
-@end deffn
-
-@deffn {VNC} {vnc redistribute mode plain|nve-group|resolve-nve}
-Redistribute routes from other protocols into VNC using the
-specified mode.
-Not all combinations of modes and protocols are supported.
-@end deffn
-
-@deffn {VNC} {vnc redistribute nve-group @var{group-name}} {}
-@deffnx {VNC} {no vnc redistribute nve-group @var{group-name}} {}
-When using @code{nve-group} mode,
-assign (or do not assign) the NVE group @var{group-name} to routes
-redistributed from another routing protocol.  @var{group-name}
-must be configured using @code{vnc nve-group}.
-
-The VN and UN prefixes of the nve-group must both be configured,
-and each prefix must be specified as a full-length (/32 for IPv4,
-/128 for IPv6) prefix.
-@end deffn
-
-@deffn {VNC} {vnc redistribute lifetime @var{lifetime}|infinite} {}
-Assign a registration lifetime, either @var{lifetime} seconds or
-@code{infinite}, to prefixes redistributed from other routing
-protocols as if they had been received via RFP registration messages
-from an NVE.  @var{lifetime} can be any integer between 1 and
-4294967295, inclusive. 
-@end deffn
-
-@deffn {VNC} {vnc redistribute resolve-nve roo-ec-local-admin @var{0-65536}}
-Assign a value to the local-administrator subfield used in the
-Route Origin extended community that is assigned to routes exported 
-under the @code{resolve-nve} mode. The default value is @var{5226}.
-@end deffn
-
-The following four @code{prefix-list} and @code{route-map} commands
-may be specified in the context of an nve-group or not.
-If they are specified in the context of an nve-group, they
-apply only if the redistribution mode is @code{nve-group},
-and then only for routes being redistributed from
-@code{bgp-direct}.
-If they are specified outside the context of an nve-group, then
-they apply only for redistribution modes @code{plain} and @code{resolve-nve},
-and then only for routes being redistributed from @code{bgp-direct}.
-
-@deffn {VNC} {vnc redistribute bgp-direct (ipv4|ipv6) prefix-list @var{LIST-NAME}}
-When redistributing @code{bgp-direct} routes,
-specifies that the named prefix-list should be applied.
-@end deffn
-
-@deffn {VNC} {vnc redistribute bgp-direct no (ipv4|ipv6) prefix-list}
-When redistributing @code{bgp-direct} routes,
-specifies that no prefix-list should be applied.
-@end deffn
-
-@deffn {VNC} {vnc redistribute bgp-direct route-map  @var{MAP-NAME}}
-When redistributing @code{bgp-direct} routes,
-specifies that the named route-map should be applied.
-@end deffn
-
-@deffn {VNC} {vnc redistribute bgp-direct no route-map}
-When redistributing @code{bgp-direct} routes,
-specifies that no route-map should be applied.
-@end deffn
-
-@node Configuring Export of Routes to Other Routing Protocols
-@subsection Configuring Export of Routes to Other Routing Protocols
-
-Routes from VNC (both for RFP and for redistribution via BGP) can be
-provided to other protocols, either via zebra or directly to BGP.
-
-It is important to note that when exporting routes to other protocols,
-the downstream protocol must also be configured to import the routes.
-For example, when VNC routes are exported to unicast BGP, the BGP
-configuration must include a corresponding @code{redistribute vnc-direct}
-statement.
-
-@deffn {VNC} {export bgp|zebra mode none|group-nve|registering-nve|ce}
-Specify how routes should be exported to bgp or zebra.
-If the mode is @code{none}, routes are not exported.
-If the mode is @code{group-nve}, routes are exported according
-to nve-group or vrf-policy group configuration (@pxref{VNC NVE Group Configuration}): if a group is configured to
-allow export, then each prefix visible to the group is exported
-with next hops set to the currently-registered NVEs.
-If the mode is @code{registering-nve}, then all VNC routes are
-exported with their original next hops.
-If the mode is @code{ce}, only VNC routes that have an NVE connected CE Router
-encoded in a Route Origin Extended Community are exported.
-This extended community must have an administrative value that
-matches the configured @code{roo-ec-local-admin} value.
-The next hop of the exported route is set to the encoded
-NVE connected CE Router.
-
-The default for both bgp and zebra is mode @code{none}.
-@end deffn
-
-@deffn {VNC} {vnc export bgp|zebra group-nve group @var{group-name}}
-@deffnx {VNC} {vnc export bgp|zebra group-nve no group @var{group-name}}
-When export mode is @code{group-nve},
-export (or do not export) prefixes from the specified nve-group or
-vrf-policy group
-to unicast BGP or to zebra.
-Repeat this statement as needed for each nve-group to be exported.
-Each VNC prefix that is exported will result in N exported routes to the
-prefix, each with a next hop corresponding to one of the N NVEs currently
-associated with the nve-group.
-@end deffn
-
-@deffn {VNC} export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME
-When export mode is @code{ce} or @code{registering-nve},
-specifies that the named prefix-list should be applied to routes
-being exported to bgp or zebra.
-Prefix-lists for ipv4 and ipv6 are independent of each other.
-@end deffn
-
-@deffn {VNC} export bgp|zebra no ipv4|ipv6 prefix-list
-When export mode is @code{ce} or @code{registering-nve},
-specifies that no prefix-list should be applied to routes
-being exported to bgp or zebra.
-@end deffn
-
-@deffn {VNC} export bgp|zebra route-map MAP-NAME
-When export mode is @code{ce} or @code{registering-nve},
-specifies that the named route-map should be applied to routes
-being exported to bgp or zebra.
-@end deffn
-
-@deffn {VNC} export bgp|zebra no route-map
-When export mode is @code{ce} or @code{registering-nve},
-specifies that no route-map should be applied to routes
-being exported to bgp or zebra.
-@end deffn
-
-When the export mode is @code{group-nve}, policy for exported
-routes is specified per-NVE-group or vrf-policy group inside a @code{nve-group} @var{RFG-NAME} block
-via the following commands(@pxref{VNC NVE Group Configuration}):
-
-@deffn {VNC} {export bgp|zebra route-map MAP-NAME}
-This command is valid inside a @code{nve-group} @var{RFG-NAME} block.
-It specifies that the named route-map should be applied to routes
-being exported to bgp or zebra.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra no route-map}
-This command is valid inside a @code{nve-group} @var{RFG-NAME} block.
-It specifies that no route-map should be applied to routes
-being exported to bgp or zebra.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra ipv4|ipv6 prefix-list LIST-NAME}
-This command is valid inside a @code{nve-group} @var{RFG-NAME} block.
-It specifies that the named prefix-list filter should be applied to
-routes being exported to bgp or zebra.
-Prefix-lists for ipv4 and ipv6 are independent of each other.
-@end deffn
-
-@deffn {VNC} {export bgp|zebra no ipv4|ipv6 prefix-list}
-This command is valid inside a @code{nve-group} @var{RFG-NAME} block.
-It specifies that no prefix-list filter should be applied to
-routes being exported to bgp or zebra.
-@end deffn
-
-@node Manual Address Control
-@section Manual Address Control
-
-The commands in this section can be used to augment normal dynamic VNC.
-The @code{add vnc} commands can be used to manually add IP prefix or
-Ethernet MAC address forwarding information.  The @code{clear vnc}
-commands can be used to remove manually and dynamically added
-information.
-
-@deffn {Command} {add vnc prefix (A.B.C.D/M|X:X::X:X/M) vn (A.B.C.D|X:X::X:X) un (A.B.C.D|X:X::X:X) [cost <0-255>] [lifetime (infinite|<1-4294967295>)] [local-next-hop (A.B.C.D|X:X::X:X) [local-cost <0-255>]]} {}
-Register an IP prefix on behalf of the NVE identified by the VN and UN
-addresses.  The @code{cost} parameter provides the administrative
-preference of the forwarding information for remote advertisement.  If
-omitted, it defaults to 255 (lowest preference).  The @code{lifetime}
-parameter identifies the period, in seconds, that the information
-remains valid.  If omitted, it defaults to @var{infinite}.  The optional
-@code{local-next-hop} parameter is used to configure a nexthop to be
-used by an NVE to reach the prefix via a locally connected CE router.
-This information remains local to the NVA, i.e., not passed to other
-NVAs, and is only passed to registered NVEs. When specified, it is also
-possible to provide a @code{local-cost} parameter to provide a
-forwarding preference.  If omitted, it defaults to 255 (lowest
-preference).
-@end deffn
-
-
-@deffn {Command} {add vnc mac xx:xx:xx:xx:xx:xx virtual-network-identifier <1-4294967295> vn (A.B.C.D|X:X::X:X) un (A.B.C.D|X:X::X:X) [prefix (A.B.C.D/M|X:X::X:X/M)] [cost <0-255>] [lifetime (infinite|<1-4294967295>)]} {}
-Register a MAC address for a logical Ethernet (L2VPN) on behalf of the
-NVE identified by the VN and UN addresses.
-The optional @code{prefix} parameter is to support enable IP address
-mediation for the given prefix.   The @code{cost} parameter provides the administrative
-preference of the forwarding information.  If omitted, it defaults to
-255.  The @code{lifetime} parameter identifies the period, in seconds,
-that the information remains valid.  If omitted, it defaults to
-@var{infinite}. 
-@end deffn
-
-@deffn {Command} {clear vnc prefix (*|A.B.C.D/M|X:X::X:X/M) (*|[(vn|un) (A.B.C.D|X:X::X:X|*) [(un|vn) (A.B.C.D|X:X::X:X|*)] [mac xx:xx:xx:xx:xx:xx] [local-next-hop (A.B.C.D|X:X::X:X)])} {}
-Delete the information identified by prefix, VN address, and UN address.
-Any or all of these parameters may be wilcarded to (potentially) match
-more than one registration.
-The optional @code{mac} parameter specifies a layer-2 MAC address
-that must match the registration(s) to be deleted.
-The optional @code{local-next-hop} parameter is used to
-delete specific local nexthop information.
-@end deffn
-
-@deffn {Command} {clear vnc mac (*|xx:xx:xx:xx:xx:xx) virtual-network-identifier (*|<1-4294967295>) (*|[(vn|un) (A.B.C.D|X:X::X:X|*) [(un|vn) (A.B.C.D|X:X::X:X|*)] [prefix (*|A.B.C.D/M|X:X::X:X/M)])} {}
-Delete mac forwarding information.
-Any or all of these parameters may be wilcarded to (potentially) match
-more than one registration.
-The default value for the @code{prefix} parameter is the wildcard value @var{*}.
-@end deffn
-
-@deffn {Command} {clear vnc nve (*|((vn|un) (A.B.C.D|X:X::X:X) [(un|vn) (A.B.C.D|X:X::X:X)])) } {}
-Delete prefixes associated with the NVE specified by the given VN and UN
-addresses.
-It is permissible to specify only one of VN or UN, in which case
-any matching registration will be deleted.
-It is also permissible to specify @code{*} in lieu of any VN or UN
-address, in which case all registrations will match.
-@end deffn
-
-@node Other VNC-Related Commands
-@section Other VNC-Related Commands
-
-Note: VNC-Related configuration can be obtained via the @code{show
-running-configuration} command when in @code{enable} mode.
-
-The following commands are used to clear and display 
-Virtual Network Control related information:
-
-@deffn {COMMAND} {clear vnc counters} {}
-Reset the counter values stored by the NVA. Counter
-values can be seen using the @code{show vnc} commands listed above. This
-command is only available in @code{enable} mode.
-@end deffn
-
-@deffn {Command} {show vnc summary} {}
-Print counter values and other general information 
-about the NVA. Counter values can be reset 
-using the @code{clear vnc counters} command listed below.
-@end deffn
-
-@deffn {Command} {show vnc nves} {}
-@deffnx {Command} {show vnc nves vn|un @var{address}} {}
-Display the NVA's current clients. Specifying @var{address}
-limits the output to the NVEs whose addresses match @var{address}.
-The time since the NVA last communicated with the NVE, per-NVE
-summary counters and each NVE's addresses will be displayed.
-@end deffn
-
-@deffn {Command} {show vnc queries} {}
-@deffnx {Command} {show vnc queries @var{prefix}} {}
-Display active Query information.  Queries remain valid for the default
-Response Lifetime (@pxref{VNC Defaults Configuration}) or NVE-group
-Response Lifetime (@pxref{VNC NVE Group Configuration}).  Specifying
-@var{prefix} limits the output to Query Targets that fall within
-@var{prefix}.
-
-Query information is provided for each querying NVE, and includes the
-Query Target and the time remaining before the information is removed.
-@end deffn
-
-@deffn {Command} {show vnc registrations [all|local|remote|holddown|imported]} {}
-@deffnx {Command} {show vnc registrations [all|local|remote|holddown|imported] @var{prefix}} {}
-Display local, remote, holddown, and/or imported registration information.
-Local registrations are routes received via RFP, which are present in the
-NVA Registrations Cache.
-Remote registrations are routes received via BGP (VPN SAFIs), which
-are present in the NVE-group import tables.
-Holddown registrations are local and remote routes that have been
-withdrawn but whose holddown timeouts have not yet elapsed.
-Imported information represents routes that are imported into NVA and
-are made available to querying NVEs.  Depending on configuration,
-imported routes may also be advertised via BGP.
-Specifying @var{prefix} limits the output to the registered prefixes that
-fall within @var{prefix}.
-
-Registration information includes the registered prefix, the registering
-NVE addresses, the registered administrative cost, the registration
-lifetime and the time since the information was registered or, in the
-case of Holddown registrations, the amount of time remaining before the
-information is removed.
-@end deffn
-
-@deffn {Command} {show vnc responses [active|removed]} {}
-@deffnx {Command} {show vnc responses [active|removed] @var{prefix}} {}
-Display all, active and/or removed response information which are
-present in the NVA Responses Cache. Responses remain valid for the
-default Response Lifetime (@pxref{VNC Defaults Configuration}) or
-NVE-group Response Lifetime (@pxref{VNC NVE Group Configuration}.)
-When Removal Responses are enabled (@pxref{General VNC Configuration}),
-such responses are listed for the Response Lifetime.  Specifying
-@var{prefix} limits the output to the addresses that fall within
-@var{prefix}.
-
-Response information is provided for each querying NVE, and includes
-the response prefix, the prefix-associated registering NVE addresses,
-the administrative cost, the provided response lifetime and the time
-remaining before the information is to be removed or will become inactive.
-@end deffn
-
-@deffn {Command} {show memory vnc} {}
-Print the number of memory items allocated by the NVA.
-@end deffn
-
-@node Example VNC and VNC-GW Configurations
-@section Example VNC and VNC-GW Configurations
-
-@menu
-* Mesh NVA Configuration::
-* Mesh NVA and VNC-GW Configuration::
-* VNC with Frr Route Reflector Configuration::
-* VNC with Commercial Route Reflector Configuration::
-* VNC with Redundant Route Reflectors Configuration::
-@c * Interfacing VNC to an IGP::
-@end menu
-
-@node  Mesh NVA Configuration
-@subsection  Mesh NVA Configuration
-
-This example includes three NVAs, nine NVEs, and two NVE groups. Note
-that while not shown, a single physical device may support multiple
-logical NVEs.  @ref{fig:fig-vnc-mesh} shows @code{NVA 1}
-(192.168.1.100), @code{NVA 2} (192.168.1.101), and @code{NVA 3}
-(192.168.1.102), which are connected in a full mesh.  Each is a
-member of the autonomous system 64512.  Each NVA provides VNC
-services to three NVE clients in the 172.16.0.0/16 virtual-network
-address range.  The 172.16.0.0/16 address range is partitioned into
-two NVE groups, @code{group1} (172.16.0.0/17) and @code{group2}
-(172.16.128.0/17).
-
-Each NVE belongs to either NVE group @code{group1} or NVE group
-@code{group2}.  The NVEs @code{NVE 1}, @code{NVE 2}, @code{NVE
-4}, @code{NVE 7}, and @code{NVE 8} are members of the NVE group
-@code{group1}.  The NVEs @code{NVE 3}, @code{NVE 5}, @code{NVE
-6}, and @code{NVE 9} are members of the NVE group @code{group2}.
-
-Each NVA advertises NVE underlay-network IP addresses using the
-Tunnel Encapsulation Attribute.
-
-@float Figure,fig:fig-vnc-mesh
-@center @image{fig-vnc-mesh,400pt,,Three-way Mesh}
-@caption{A three-way full mesh with three NVEs per NVA}
-@end float
-
-@file{bgpd.conf} for @code{NVA 1} (192.168.1.100)
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.100
-
-    neighbor 192.168.1.101  remote-as 64512
-    neighbor 192.168.1.102  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.101 activate
-        neighbor 192.168.1.102 activate
-    exit-address-family
-
-    vnc defaults
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-
-    vnc nve-group group1
-        prefix vn 172.16.0.0/17
-        rt both 1000:1 
-    exit-vnc
-
-    vnc nve-group group2
-        prefix vn 172.16.128.0/17
-        rt both 1000:2
-    exit-vnc
-
-exit
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 2} (192.168.1.101):
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.101
-
-    neighbor 192.168.1.100  remote-as 64512
-    neighbor 192.168.1.102  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-        neighbor 192.168.1.102 activate
-    exit-address-family
-
-    vnc nve-group group1
-        prefix vn 172.16.0.0/17
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-exit
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 3} (192.168.1.102):
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.102
-
-    neighbor 192.168.1.101  remote-as 64512
-    neighbor 192.168.1.102  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-        neighbor 192.168.1.101 activate
-    exit-address-family
-
-    vnc defaults
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-
-    vnc nve-group group1
-        prefix vn 172.16.128.0/17
-    exit-vnc
-exit
-@end verbatim
-
-@node Mesh NVA and VNC-GW Configuration
-@subsection Mesh NVA and VNC-GW Configuration
-
-This example includes two NVAs, each with two associated NVEs, and two
-VNC-GWs, each supporting two CE routers physically attached to the four
-NVEs.  Note that this example is showing a more complex configuration
-where VNC-GW is separated from normal NVA functions; it is equally
-possible to simplify the configuration and combine NVA and VNC-GW
-functions in a single frr instance.
-
-@float Figure,fig:fig-vnc-gw
-@center @image{fig-vnc-gw,400pt,,Frr VNC Gateway}
-@caption{Meshed NVEs and VNC-GWs}
-@end float
-
-As shown in @ref{fig:fig-vnc-gw}, NVAs and VNC-GWs are connected in a
-full iBGP mesh.  The VNC-GWs each have two CEs configured as
-route-reflector clients.  Each client provides BGP updates with unicast
-routes that the VNC-GW reflects to the other client.  The VNC-GW also
-imports these unicast routes into VPN routes to be shared with the other
-VNC-GW and the two NVAs.  This route importation is controlled with the
-@code{vnc redistribute} statements shown in the configuration.
-Similarly, registrations sent by NVEs via RFP to the NVAs are exported
-by the VNC-GWs to the route-reflector clients as unicast routes.  RFP
-registrations exported this way have a next-hop address of the CE behind
-the connected (registering) NVE.  Exporting VNC routes as IPv4 unicast
-is enabled with the @code{vnc export} command below.
-
-The configuration for @code{VNC-GW 1} is shown below.
-@verbatim
-router bgp 64512
- bgp router-id 192.168.1.101
- bgp cluster-id 1.2.3.4
- neighbor 192.168.1.102 remote-as 64512
- neighbor 192.168.1.103 remote-as 64512
- neighbor 192.168.1.104 remote-as 64512
- neighbor 172.16.1.2 remote-as 64512
- neighbor 172.16.2.2 remote-as 64512
- !
- address-family ipv4 unicast
-  redistribute vnc-direct
-  no neighbor 192.168.1.102 activate
-  no neighbor 192.168.1.103 activate
-  no neighbor 192.168.1.104 activate
-  neighbor 172.16.1.2 route-reflector-client
-  neighbor 172.16.2.2 route-reflector-client
- exit-address-family
- !
- address-family ipv4 vpn
-   neighbor 192.168.1.102 activate
-   neighbor 192.168.1.103 activate
-   neighbor 192.168.1.104 activate
- exit-address-family
- vnc export bgp mode ce
- vnc redistribute mode resolve-nve
- vnc redistribute ipv4 bgp-direct
- exit
-@end verbatim
-
-Note that in the VNC-GW configuration, the neighboring VNC-GW and
-NVAs each have a statement disabling the IPv4 unicast address family.
-IPv4 unicast is on by default and this prevents the other VNC-GW and
-NVAs from learning unicast routes advertised by the route-reflector clients.
-
-Configuration for @code{NVA 2}:
-@verbatim
-router bgp 64512
- bgp router-id 192.168.1.104
- neighbor 192.168.1.101 remote-as 64512
- neighbor 192.168.1.102 remote-as 64512
- neighbor 192.168.1.103 remote-as 64512
- !
- address-family ipv4 unicast
-  no neighbor 192.168.1.101 activate
-  no neighbor 192.168.1.102 activate
-  no neighbor 192.168.1.103 activate
- exit-address-family
- !
- address-family ipv4 vpn
-   neighbor 192.168.1.101 activate
-   neighbor 192.168.1.102 activate
-   neighbor 192.168.1.103 activate
- exit-address-family
- !
- vnc defaults
-  response-lifetime 3600
-  exit-vnc
- vnc nve-group nve1
-  prefix vn 172.16.1.1/32
-  response-lifetime 3600
-  rt both 1000:1 1000:2
-  exit-vnc
- vnc nve-group nve2
-  prefix vn 172.16.2.1/32
-  response-lifetime 3600
-  rt both 1000:1 1000:2
-  exit-vnc
- exit
-@end verbatim
-
-@c TBD make this its own example:
-@c 
-@c @float Figure,fig:fig-vnc-gw-rr
-@c @center @image{fig-vnc-gw-rr,400pt,,Frr VNC Gateway with RR}
-@c @end float
-@c An NVA can also import unicast routes from BGP without advertising the
-@c imported routes as VPN routes.  Such imported routes, while not
-@c distributed to other NVAs or VNC-GWs, are are available to NVEs via
-@c RFP query messages sent to the NVA. @ref{fig:fig-vnc-gw-rr}
-@c shows an example topology where unicast routes are imported into NVAs
-@c from a Route Reflector.  (@pxref{Route Reflector} for route reflector
-@c configuration details.)  The following three lines can be added to the
-@c @code{NVA 1} and @code{NVA 2} configurations to import routes into VNC
-@c for local VNC use:
-@c 
-@c @verbatim
-@c  neighbor 192.168.1.105 remote-as 64512
-@c  vnc redistribute mode plain
-@c  vnc redistribute ipv4 bgp-direct-to-nve-groups
-@c @end verbatim
-
-@node VNC with Frr Route Reflector Configuration
-@subsection VNC with Frr Route Reflector Configuration
-A route reflector eliminates the need for a fully meshed NVA
-network by acting as the hub between NVAs.
-@ref{fig:fig-vnc-frr-route-reflector} shows BGP route reflector
-@code{BGP Route Reflector 1} (192.168.1.100) as a route reflector for
-NVAs @code{NVA 2}(192.168.1.101) and @code{NVA 3}
-(192.168.1.102).
-
-@float Figure,fig:fig-vnc-frr-route-reflector
-@center @image{fig-vnc-frr-route-reflector,400pt,,Frr Route Reflector}
-@caption{Two NVAs and a BGP Route Reflector} 
-@end float
-
-@code{NVA 2} and @code{NVA 3} 
-advertise NVE underlay-network IP addresses using the Tunnel Encapsulation Attribute.
-@code{BGP Route Reflector 1} ``reflects'' advertisements from
-@code{NVA 2} to @code{NVA 3} and vice versa.
-
-As in the example of @ref{Mesh NVA Configuration}, there are two NVE groups.
-The 172.16.0.0/16 address range is partitioned into two NVE groups,
-@code{group1} (172.16.0.0/17) and @code{group2} (172.16.128.0/17).
-The NVE @code{NVE 4}, @code{NVE 7}, and @code{NVE 8} are
-members of the NVE group @code{group1}.  The NVEs @code{NVE 5},
-@code{NVE 6}, and @code{NVE 9} are members of the NVE group
-@code{group2}.
-
-@file{bgpd.conf} for @code{BGP Route Reflector 1} on 192.168.1.100:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.100
-
-    neighbor 192.168.1.101 remote-as 64512
-    neighbor 192.168.1.101 port 7179
-    neighbor 192.168.1.101 description iBGP-client-192-168-1-101
-
-    neighbor 192.168.1.102 remote-as 64512
-    neighbor 192.168.1.102 port 7179
-    neighbor 192.168.1.102 description iBGP-client-192-168-1-102
-
-    address-family ipv4 unicast
-        neighbor 192.168.1.101 route-reflector-client
-        neighbor 192.168.1.102 route-reflector-client
-    exit-address-family
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.101 activate
-        neighbor 192.168.1.102 activate
-
-        neighbor 192.168.1.101 route-reflector-client
-        neighbor 192.168.1.102 route-reflector-client
-    exit-address-family
-
-exit
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 2} on 192.168.1.101:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.101
-
-    neighbor 192.168.1.100  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-    exit-address-family
-
-    vnc nve-group group1
-        prefix vn 172.16.0.0/17
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-exit
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 2} on 192.168.1.102:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.102
-
-    neighbor 192.168.1.100  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-    exit-address-family
-
-    vnc defaults
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-
-    vnc nve-group group1
-        prefix vn 172.16.128.0/17
-    exit-vnc
-exit
-@end verbatim
-
-While not shown, an NVA can also be configured as a route reflector.
-
-@node VNC with Commercial Route Reflector Configuration
-@subsection VNC with Commercial Route Reflector Configuration
-This example is identical to @ref{VNC with Frr Route Reflector
-Configuration} with the exception that the route reflector is a
-commercial router.  Only the
-VNC-relevant configuration is provided. 
-
-@float Figure,fig:fig-vnc-commercial-route-reflector
-@center @image{fig-vnc-commercial-route-reflector,400pt,,Commercial Route Reflector}
-@caption{Two NVAs with a commercial route reflector}
-@end float
-
-@file{bgpd.conf} for BGP route reflector @code{Commercial Router} on 192.168.1.104:
-@verbatim
-version 8.5R1.13;
-routing-options {
-    rib inet.0 {
-        static {
-            route 172.16.0.0/16 next-hop 192.168.1.104;
-        }
-    }
-    autonomous-system 64512;
-    resolution {
-        rib inet.3 {
-            resolution-ribs inet.0;
-        }
-        rib bgp.l3vpn.0 {
-            resolution-ribs inet.0;
-        }
-    }
-}
-protocols {
-    bgp {
-        advertise-inactive;
-        family inet {
-            labeled-unicast;
-        }
-       group 1 {
-            type internal;
-            advertise-inactive;
-            advertise-peer-as;
-            import h;
-            family inet {
-                unicast;
-            }
-            family inet-vpn {
-                unicast;
-            }
-            cluster 192.168.1.104;
-            neighbor 192.168.1.101;
-            neighbor 192.168.1.102;
-        }
-    }
-}
-policy-options {
-    policy-statement h {
-        from protocol bgp;
-        then {
-            as-path-prepend 64512;
-            accept;
-        }
-    }
-}
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 2} on 192.168.1.101:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.101
-
-    neighbor 192.168.1.100  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-    exit-address-family
-
-    vnc nve-group group1
-        prefix vn 172.16.0.0/17
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-exit
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 3} on 192.168.1.102:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.102
-
-    neighbor 192.168.1.100  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-    exit-address-family
-
-    vnc defaults
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-
-    vnc nve-group group1
-        prefix vn 172.16.128.0/17
-    exit-vnc
-exit
-@end verbatim
-
-@node VNC with Redundant Route Reflectors Configuration
-@subsection VNC with Redundant Route Reflectors Configuration
-This example combines the previous two (@ref{VNC with Frr Route
-Reflector Configuration} and @ref{VNC with Commercial Route Reflector
-Configuration}) into a redundant route reflector configuration.  BGP
-route reflectors @code{BGP Route Reflector 1} and @code{Commercial Router}
-are the route reflectors for NVAs @code{NVA 2} and
-@code{NVA 3}.  The two NVAs have connections to both
-route reflectors.
-
-@float Figure,fig:fig-vnc-redundant-route-reflectors
-@center @image{fig-vnc-redundant-route-reflectors,400pt,,Redundant Route Reflectors}
-@caption{Frr-based NVA with redundant route reflectors}
-@end float
-
-@file{bgpd.conf} for @code{Bgpd Route Reflector 1} on 192.168.1.100:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.100
-    bgp cluster-id 192.168.1.100
-
-    neighbor 192.168.1.104 remote-as 64512
-
-    neighbor 192.168.1.101 remote-as 64512
-    neighbor 192.168.1.101 description iBGP-client-192-168-1-101
-    neighbor 192.168.1.101 route-reflector-client
-
-    neighbor 192.168.1.102 remote-as 64512
-    neighbor 192.168.1.102 description iBGP-client-192-168-1-102
-    neighbor 192.168.1.102 route-reflector-client
-
-    address-family ipv4 vpn
-       neighbor 192.168.1.101 activate
-       neighbor 192.168.1.102 activate
-       neighbor 192.168.1.104 activate
-
-       neighbor 192.168.1.101 route-reflector-client
-       neighbor 192.168.1.102 route-reflector-client
-    exit-address-family
-exit
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 2} on 192.168.1.101:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.101
-
-    neighbor 192.168.1.100  remote-as 64512
-    neighbor 192.168.1.104  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-        neighbor 192.168.1.104 activate
-    exit-address-family
-
-    vnc nve-group group1
-        prefix vn 172.16.0.0/17
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-exit
-@end verbatim
-
-@file{bgpd.conf} for @code{NVA 3} on 192.168.1.102:
-@verbatim
-router bgp 64512
-
-    bgp router-id 192.168.1.102
-
-    neighbor 192.168.1.100  remote-as 64512
-    neighbor 192.168.1.104  remote-as 64512
-
-    address-family ipv4 vpn
-        neighbor 192.168.1.100 activate
-        neighbor 192.168.1.104 activate
-    exit-address-family
-
-    vnc defaults
-        rd 64512:1
-        response-lifetime 200
-        rt both 1000:1 1000:2
-    exit-vnc
-
-    vnc nve-group group1
-        prefix vn 172.16.128.0/17
-    exit-vnc
-exit
-@end verbatim
-
-@file{bgpd.conf} for the Commercial Router route reflector on
-192.168.1.104:
-@verbatim
-routing-options {
-    rib inet.0 {
-        static {
-            route 172.16.0.0/16 next-hop 192.168.1.104;
-        }
-    }
-    autonomous-system 64512;
-    resolution {
-        rib inet.3 {
-            resolution-ribs inet.0;
-        }
-        rib bgp.l3vpn.0 {
-            resolution-ribs inet.0;
-        }
-    }
-}
-protocols {
-    bgp {
-        advertise-inactive;
-        family inet {
-            labeled-unicast;
-        }
-       group 1 {
-            type internal;
-            advertise-inactive;
-            advertise-peer-as;
-            import h;
-            family inet {
-                unicast;
-            }
-            family inet-vpn {
-                unicast;
-            }
-            cluster 192.168.1.104;
-            neighbor 192.168.1.101;
-            neighbor 192.168.1.102;
-        }
-
-       group 2 {
-            type internal;
-            advertise-inactive;
-            advertise-peer-as;
-            import h;
-            family inet {
-                unicast;
-            }
-            family inet-vpn {
-                unicast;
-            }
-            neighbor 192.168.1.100;
-        }
-
-    }
-}
-policy-options {
-    policy-statement h {
-        from protocol bgp;
-        then {
-            as-path-prepend 64512;
-            accept;
-        }
-    }
-}
-@end verbatim
-
-@node Release Notes
-@section Release Notes
-
-@c A paragraph that introduces our release notes.
-
-@c outer list, one item per VNC release, items preceded by bullet
-@itemize @bullet 
-@item
-
-@c @item
-@end itemize
-
-@evenheading @thispage@|@|@thistitle
-@oddheading @thischapter@|@|@thispage
-@everyfooting 
-
diff --git a/doc/vtysh.1.in b/doc/vtysh.1.in
deleted file mode 100644 (file)
index ba8f3df..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-.TH VTYSH 1 "27 July 2006" "@PACKAGE_FULLNAME@ VTY shell" "Version @PACKAGE_VERSION@"
-.SH NAME
-vtysh \- a integrated shell for @PACKAGE_FULLNAME@.
-.SH SYNOPSIS
-.B vtysh
-[
-.B \-b
-]
-.br
-.B vtysh
-[
-.B \-E
-] [
-.B \-d
-.I daemon
-]
-] [
-.B \-c
-.I command
-]
-.SH DESCRIPTION
-.B vtysh
-is a integrated shell for
-.B @PACKAGE_FULLNAME@
-routing engine.
-.SH OPTIONS
-Options available for the
-.B vtysh
-command:
-.IP "\fB\-b, \-\-boot\fP"
-Execute boot startup configuration. It makes sense only if integrated config
-file is in use (not default in @PACKAGE_FULLNAME@). See Info file
-\fB@PACKAGE_NAME@\fR for more info.
-.IP "\fB\-c, \-\-command \fIcommand\fP"
-Specify command to be executed under batch mode. It behaves like -c option in
-any other shell -
-.I command
-is executed and
-.B vtysh
-exits.
-
-It's useful for gathering info from @PACKAGE_FULLNAME@ daemons or reconfiguring
-daemons from inside shell scripts, etc.
-Note that multiple commands may be executed by using more than one
--c option and/or embedding linefeed characters inside the
-.I command
-string.
-.IP "\fB\-d, \-\-daemon \fIdaemon_name\fP"
-Specify which daemon to connect to.  By default,
-.B vtysh
-attempts to connect to all @PACKAGE_FULLNAME@ daemons running on the system.  With this
-flag, one can specify a single daemon to connect to instead.  For example,
-specifying '-d ospfd' will connect only to ospfd.  This can be particularly
-useful inside scripts with -c where the command is targeted for a single daemon.
-.IP "\fB\-e, \-\-execute \fIcommand\fP"
-Alias for -c. It's here only for compatibility with Zebra routing software and
-older Frr versions. This will be removed in future.
-.IP "\fB\-E, \-\-echo\fP"
-When the -c option is being used, this flag will cause the standard
-.B vtysh
-prompt and command to be echoed prior to displaying the results.
-This is particularly useful to separate the results
-when executing multiple commands.
-.IP "\fB\-h, \-\-help\fP"
-Display a usage message on standard output and exit.
-.SH ENVIRONMENT VARIABLES
-.IP "\fBVTYSH_PAGER\fR"
-This should be the name of the pager to use. Default is \fBmore\fR.
-.SH FILES
-.TP
-.BI @CFG_SYSCONF@/vtysh.conf
-The default location of the 
-.B vtysh
-config file.
-.TP
-.BI @CFG_SYSCONF@/frr.conf
-The default location of the integrated @PACKAGE_FULLNAME@ routing engine config file
-if integrated config file is in use (not default).
-.TP
-.BI ${HOME}/.history_frr
-Location of history of commands entered via cli
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR zebra (8)
-.SH BUGS
-.B vtysh
-eats bugs for breakfast. If you have food for the maintainers try 
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/doc/vtysh.texi b/doc/vtysh.texi
deleted file mode 100644 (file)
index de681c8..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-@node VTY shell
-@chapter VTY shell
-
-@menu
-* Integrated configuration mode::
-@end menu
-
-@command{vtysh} provides a combined frontend to all Frr daemons in a
-single combined session.  It is enabled by default at build time, but can
-be disabled through the @option{--disable-vtysh} option to
-@command{./configure}.
-
-@command{vtysh} has a configuration file, @file{vtysh.conf}.  The location
-of that file cannot be changed from @file{@value{INSTALL_PREFIX_ETC}} since
-it contains options controlling authentication behavior.  This file will
-also not be written by configuration-save commands, it is intended to be
-updated manually by an administrator with an external editor.
-
-@quotation Warning
-This also means the @command{hostname} and @command{banner motd} commands
-(which both do have effect for vtysh) need to be manually updated in
-@file{vtysh.conf}.
-@end quotation
-
-@section Permissions and setup requirements
-
-@command{vtysh} connects to running daemons through Unix sockets located in
-@file{@value{INSTALL_PREFIX_STATE}}.  Running vtysh thus requires access to
-that directory, plus membership in the @emph{@value{INSTALL_VTY_GROUP}}
-group (which is the group that the daemons will change ownership of their
-sockets to).
-
-To restrict access to Frr configuration, make sure no unauthorized users
-are members of the @emph{@value{INSTALL_VTY_GROUP}} group.
-
-@subsection PAM support (experimental)
-
-vtysh has working (but rather useless) PAM support.  It will perform
-an "authenticate" PAM call using @emph{@value{PACKAGE_NAME}} as service
-name. No other (accounting, session, password change) calls will be
-performed by vtysh.
-
-Users using vtysh still need to have appropriate access to the daemons'
-VTY sockets, usually by being member of the @emph{@value{INSTALL_VTY_GROUP}}
-group.  If they have this membership, PAM support is useless since they can
-connect to daemons and issue commands using some other tool.  Alternatively,
-the @command{vtysh} binary could be made SGID (set group ID) to the
-@emph{@value{INSTALL_VTY_GROUP}} group.  @strong{No security guarantees are
-made for this configuration}.
-
-@deffn {Command} {username @var{username} nopassword} {}
-
-If PAM support is enabled at build-time, this command allows disabling the
-use of PAM on a per-user basis.  If vtysh finds that an user is trying to
-use vtysh and a "nopassword" entry is found, no calls to PAM will be made
-at all.
-
-@end deffn
-
-@node Integrated configuration mode
-@section Integrated configuration mode
-
-Integrated configuration mode uses a single configuration file,
-@file{frr.conf}, for all daemons.  This replaces the individual files like
-@file{zebra.conf} or @file{bgpd.conf}.
-
-@file{frr.conf} is located in @file{@value{INSTALL_PREFIX_ETC}}.  All
-daemons check for the existence of this file at startup, and if it exists
-will not load their individual configuration files.  Instead,
-@command{vtysh -b} must be invoked to process @file{frr.conf} and apply
-its settings to the individual daemons.
-
-@quotation Warning
-@command{vtysh -b} must also be executed after restarting any daemon.
-@end quotation
-
-@subsection Configuration saving, file ownership and permissions
-
-The @file{frr.conf} file is not written by any of the daemons; instead
-@command{vtysh} contains the neccessary logic to collect configuration from
-all of the daemons, combine it and write it out.
-
-@quotation Warning
-Daemons must be running for @command{vtysh} to be able to collect their
-configuration.  Any configuration from non-running daemons is permanently
-lost after doing a configuration save.
-@end quotation
-
-Since the @command{vtysh} command may be running as ordinary user on the
-system, configuration writes will be tried through @command{watchfrr},
-using the @command{write integrated} command internally.  Since
-@command{watchfrr} is running as superuser, @command{vtysh} is able to
-ensure correct ownership and permissions on @file{frr.conf}.
-
-If @command{watchfrr} is not running or the configuration write fails,
-@command{vtysh} will attempt to directly write to the file.  This is likely
-to fail if running as unprivileged user;  alternatively it may leave the
-file with incorrect owner or permissions.
-
-Writing the configuration can be triggered directly by invoking
-@command{vtysh -w}.  This may be useful for scripting.  Note this command
-should be run as either the superuser or the Frr user.
-
-We recommend you do not mix the use of the two types of files. Further, it
-is better not to use the integrated frr.conf file, as any syntax error in
-it can lead to /all/ of your daemons being unable to start up. Per daemon
-files are more robust as impact of errors in configuration are limited to
-the daemon in whose file the error is made.
-
-@deffn {Command} {service integrated-vtysh-config} {}
-@deffnx {Command} {no service integrated-vtysh-config} {}
-
-Control whether integrated @file{frr.conf} file is written when
-'write file' is issued.
-
-These commands need to be placed in @file{vtysh.conf} to have any effect.
-Note that since @file{vtysh.conf} is not written by Frr itself, they
-therefore need to be manually placed in that file.
-
-This command has 3 states:
-@itemize @bullet
-@item
-@command{service integrated-vtysh-config}
-
-@command{vtysh} will always write @file{frr.conf}.
-
-@item
-@command{no service integrated-vtysh-config}
-
-@command{vtysh} will never write @file{frr.conf}; instead it will ask
-daemons to write their individual configuration files.
-
-@item
-Neither option present (default)
-
-@command{vtysh} will check whether @file{frr.conf} exists.  If it does,
-configuration writes will update that file.  Otherwise, writes are performed
-through the individual daemons.
-@end itemize
-
-This command is primarily intended for packaging/distribution purposes, to
-preset one of the two operating modes and ensure consistent operation across
-installations.
-@end deffn
-
-@deffn {Command} {write integrated} {}
-
-Unconditionally (regardless of @command{service integrated-vtysh-config}
-setting) write out integrated @file{frr.conf} file through
-@command{watchfrr}.  If @command{watchfrr} is not running, this command
-is unavailable.
-
-@end deffn
-
-@section Caveats
-
-Configuration changes made while some daemon is not running will be invisible
-to that daemon.  The daemon will start up with its saved configuration
-(either in its individual configuration file, or in @file{frr.conf}).
-This is particularly troublesome for route-maps and prefix lists, which would
-otherwise be synchronized between daemons.
diff --git a/doc/watchfrr.8.in b/doc/watchfrr.8.in
deleted file mode 100644 (file)
index 782ac7b..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-.\" This file was originally generated by help2man 1.36.
-.TH WATCHFRR 8 "July 2010"
-.SH NAME
-watchfrr \- a program to monitor the status of frr daemons
-.SH SYNOPSIS
-.B watchfrr
-.RI [ option ...]
-.IR daemon ...
-.br
-.B watchfrr
-.BR \-h " | " \-v
-.SH DESCRIPTION
-.B watchfrr
-is a watchdog program that monitors the status of supplied frr
-.IR daemon s
-and tries to restart them in case they become unresponsive or shut down.
-.PP
-To determine whether a daemon is running, it tries to connect to the
-daemon's VTY UNIX stream socket, and send echo commands to ensure the
-daemon responds. When the daemon crashes, EOF is received from the socket,
-so that watchfrr can react immediately.
-.PP
-In order to avoid restarting the daemons in quick succession, you can
-supply the
-.B \-m
-and
-.B \-M
-options to set the minimum and maximum delay between the restart commands.
-The minimum restart delay is recalculated each time a restart is attempted.
-If the time since the last restart attempt exceeds twice the value of
-.BR  \-M ,
-the restart delay is set to the value of
-.BR \-m ,
-otherwise the interval is doubled (but capped at the value of
-.BR \-M ).
-.SH OPTIONS
-The following 3 options specify scripts that
-.B watchfrr
-uses to perform start/stop/restart actions.  These options are mandatory
-unless the
-.B --dry
-option is used:
-.TP
-.BI \-s " command" "\fR, \fB\-\-start\-command " command
-Supply a Bourne shell
-.I command
-to start a single daemon. The command string should contain the '%s'
-placeholder to be substituted with the daemon name.
-.TP
-.BI \-k " command" "\fR, \fB\-\-kill\-command " command
-Supply a Bourne shell
-.I command
-to stop a single daemon. The command string should contain the '%s'
-placeholder to be substituted with the daemon name.
-.TP
-.BI \-r " command" "\fR, \fB\-\-restart " command
-Supply a Bourne shell
-.I command
-to restart a single daemon. The command string should contain the '%s'
-placeholder to be substituted with the daemon name.
-.PP
-Other options:
-.TP
-.BI \-\-dry
-Run watchfrr in "dry-run" mode, only monitoring the specified daemons but not
-performing any start/stop/restart actions.
-.TP
-.BR \-d ", " \-\-daemon
-Run in daemon mode. When supplied, error messages are sent to Syslog
-instead of standard output (stdout).
-.TP
-.BI \-S " directory" "\fR, \fB\-\-statedir " directory
-Set the VTY socket
-.I directory
-(the default value is "/var/run/frr").
-.TP
-.BI \-l " level" "\fR, \fB\-\-loglevel " level
-Set the logging
-.I level
-(the default value is "6"). The value should range from 0 (LOG_EMERG) to 7
-(LOG_DEBUG), but higher number can be supplied if extra debugging messages
-are required.
-.TP
-.BI \-\-min\-restart\-interval " number
-Set the minimum
-.I number
-of seconds to wait between invocations of the daemon restart commands (the
-default value is "60").
-.TP
-.BI \-\-max\-restart\-interval " number
-Set the maximum
-.I number
-of seconds to wait between invocations of the daemon restart commands (the
-default value is "600").
-.TP
-.BI \-i " number" "\fR, \fB\-\-interval " number
-Set the status polling interval in seconds (the default value is "5").
-.TP
-.BI \-t " number" "\fR, \fB\-\-timeout " number
-Set the unresponsiveness timeout in seconds (the default value is "10").
-.TP
-.BI \-T " number" "\fR, \fB\-\-restart\-timeout " number
-Set the restart (kill) timeout in seconds (the default value is "20"). If
-any background jobs are still running after this period has elapsed, they
-will be killed.
-.TP
-.BI \-p " filename" "\fR, \fB\-\-pid\-file " filename
-Set the process identifier
-.I filename
-(the default value is "/var/run/frr/watchfrr.pid").
-.TP
-.BI \-b " string" "\fR, \fB\-\-blank\-string " string
-When the supplied
-.I string
-is found in any of the command line option arguments (i.e.,
-.BR \-r ,
-.BR \-s ,
-or
-.BR \-k ),
-replace it with a space.
-.IP
-This is an ugly hack to circumvent problems with passing the command line
-arguments containing embedded spaces.
-.TP
-.BR \-v ", " \-\-version
-Display the version information and exit.
-.TP
-.BR \-h ", " \-\-help
-Display the usage information and exit.
-.SH PREVIOUS OPTIONS
-Prior versions of \fBwatchfrr\fR supported some additional options that no
-longer exist:
-.IP
-.BR \-a ,\  \-A ,\  \-e ,\  \-R ,\  \-z
-.PP
-The \fB-a\fR, \fB-A\fR and \fB-R\fR options were used to select alternate
-monitoring modes that offered different patterns of restarting daemons.  The
-"correct" mode (phased restart) is now the default. The \fB-e\fR and \fB-z\fR
-options used to disable some monitoring aspects, watchfrr now always has all
-monitoring features enabled.
-.PP
-Removing these options should result in correct operation, if it does not
-please file a bug report.
-.SH SEE ALSO
-.BR zebra (8),
-.BR bgpd (8),
-.BR isisd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR ripd (8),
-.BR ripngd (8)
-.PP
-See the project homepage at <@PACKAGE_URL@>.
-.SH AUTHORS
-Copyright 2004 Andrew J. Schorr
diff --git a/doc/zebra.8.in b/doc/zebra.8.in
deleted file mode 100644 (file)
index 3e1d10e..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-.TH ZEBRA 8 "25 November 2004" "Zebra daemon" "Version @PACKAGE_VERSION@"
-.SH NAME
-zebra \- a routing manager for use with associated @PACKAGE_FULLNAME@ components.
-.SH SYNOPSIS
-.B zebra
-[
-.B \-bdhklrv
-] [
-.B \-f
-.I config-file
-] [
-.B \-i
-.I pid-file
-] [
-.B \-P
-.I port-number
-] [
-.B \-A
-.I vty-address
-] [
-.B \-u
-.I user
-] [
-.B \-g
-.I group
-] [
-.B \-M
-.I module:options
-] [
-.B \-z
-.I socketpath
-]
-.SH DESCRIPTION
-.B zebra 
-is a routing manager that implements the 
-.B zebra
-route engine.
-.B zebra 
-supports RIPv1, RIPv2, RIPng, OSPF, OSPF6, IS-IS, BGP4+, and BGP4-.
-.SH OPTIONS
-Options available for the
-.B zebra
-command:
-.TP
-\fB\-b\fR, \fB\-\-batch\fR
-Runs in batch mode, \fBzebra\fR parses its config and exits.
-.TP
-\fB\-d\fR, \fB\-\-daemon\fR
-Runs in daemon mode, forking and exiting from tty.
-.TP
-\fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR
-Specifies the config file to use for startup. If not specified this
-option will default to \fB\fI@CFG_SYSCONF@/zebra.conf\fR.
-.TP
-\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
-Specify the group to run as. Default is \fI@enable_group@\fR.
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-A brief message.
-.TP
-\fB\-i\fR, \fB\-\-pid_file \fR\fIpid-file\fR
-When zebra starts its process identifier is written to
-\fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
-restart zebra.  The default is \fB\fI@CFG_STATE@/zebra.pid\fR.
-.TP
-\fB\-k\fR, \fB\-\-keep_kernel\fR
-On startup, don't delete self inserted routes.
-.TP
-\fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
-Specify the port that the zebra VTY will listen on. This defaults to
-2601, as specified in \fB\fI/etc/services\fR.
-.TP
-\fB\-A\fR, \fB\-\-vty_addr \fR\fIvty-address\fR
-Specify the address that the zebra VTY will listen on. Default is all
-interfaces.
-.TP
-\fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user to run as. Default is \fI@enable_user@\fR.
-.TP
-\fB\-r\fR, \fB\-\-retain\fR 
-When the program terminates, retain routes added by \fBzebra\fR.
-.TP
-\fB\-s\fR, \fB\-\-nl-bufsize \fR\fInetlink-buffer-size\fR
-Set netlink receive buffer size. There are cases where zebra daemon can't
-handle flood of netlink messages from kernel. If you ever see "recvmsg overrun"
-messages in zebra log, you are in trouble.
-
-Solution is to increase receive buffer of netlink socket. Note that kernel
-< 2.6.14 doesn't allow to increase it over maximum value defined in
-\fI/proc/sys/net/core/rmem_max\fR. If you want to do it, you have to increase
-maximum before starting zebra.
-
-Note that this affects Linux only.
-.TP
-\fB\-n\fR, \fB\-\-vrfwnetns \fR\fIEnable namespace VRF\fR
-Enable namespace VRF backend. By default, the VRF backend relies on VRF-lite
-support from Linux devices. This option permits discovering using Linux named
-Netns and map it to FRR VRF contexts.
-.TP
-\fB\-M\fR, \fB\-\-module \fR\fImodule:options\fR
-Load a module at startup.  May be specified more than once.
-The \fBsnmp\fR and \fBfpm\fR modules may be
-available for \fBzebra\fR, if the package was built with SNMP and FPM support
-respectively.  The \fBfpm\fR module takes an additional colon-separated
-argument specifying the encapsulation, either \fBnetlink\fR or \fBprotobuf\fR.
-It should thus be loaded with \fB-M fpm:netlink\fR or \fB-M fpm:protobuf\fR.
-.TP
-\fB\-z\fR, \fB\-\-socket \fR\fIsocketpath\fR
-Use the specified path to open the zebra API socket on.
-The default is \fB\fI@CFG_STATE@/zserv.api\fR.  This option must be given with
-the same value to all FRR protocol daemons.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version and exit.
-.SH FILES
-.TP
-.BI @CFG_SBIN@/zebra
-The default location of the 
-.B zebra
-binary.
-.TP
-.BI @CFG_SYSCONF@/zebra.conf
-The default location of the 
-.B zebra
-config file.
-.TP
-.BI $(PWD)/zebra.log 
-If the 
-.B zebra
-process is config'd to output logs to a file, then you will find this
-file in the directory where you started \fBzebra\fR.
-.SH WARNING
-This man page is intended to be a quick reference for command line
-options. The definitive document is the Info file \fB@PACKAGE_NAME@\fR.
-.SH DIAGNOSTICS
-The zebra process may log to standard output, to a VTY, to a log
-file, or through syslog to the system logs. \fBzebra\fR supports many
-debugging options, see the Info file, or the source for details.
-.SH "SEE ALSO"
-.BR bgpd (8),
-.BR ripd (8),
-.BR ripngd (8),
-.BR ospfd (8),
-.BR ospf6d (8),
-.BR isisd (8),
-.BR nhrpd (8),
-.BR vtysh (1)
-.SH BUGS
-.B zebra
-eats bugs for breakfast. If you have food for the maintainers try
-.BI @PACKAGE_BUGREPORT@
-.SH AUTHORS
-See
-.BI http://www.zebra.org
-and
-.BI @PACKAGE_URL@
-or the Info file for an accurate list of authors.
-
diff --git a/docker/.gitignore b/docker/.gitignore
new file mode 100644 (file)
index 0000000..e9beab5
--- /dev/null
@@ -0,0 +1,2 @@
+src.tar
+pkgs/
diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile
new file mode 100644 (file)
index 0000000..e186fdc
--- /dev/null
@@ -0,0 +1,30 @@
+FROM alpine:3.7 as source-builder
+ARG commit
+RUN apk add --no-cache abuild acct alpine-sdk attr autoconf automake bash \
+    binutils binutils-libs bison bsd-compat-headers build-base \
+    c-ares c-ares-dev ca-certificates cryptsetup-libs curl \
+    device-mapper-libs expat fakeroot flex fortify-headers g++ gcc gdbm \
+    git gmp isl json-c json-c-dev kmod lddtree libacl libatomic libattr \
+    libblkid libburn libbz2 libc-dev libcap libcurl libedit libffi libgcc \
+    libgomp libisoburn libisofs libltdl libressl libssh2 \
+    libstdc++ libtool libuuid linux-headers lzip lzo m4 make mkinitfs mpc1 \
+    mpfr3 mtools musl-dev ncurses-libs ncurses-terminfo ncurses-terminfo-base \
+    patch pax-utils pcre perl pkgconf python2 python2-dev readline \
+    readline-dev sqlite-libs squashfs-tools sudo tar texinfo xorriso xz-libs \
+    groff gzip bc py-sphinx
+RUN mkdir -p /src
+ADD src.tar /src
+RUN (cd /src && \
+       ./bootstrap.sh && \
+       ./configure \
+               --enable-numeric-version \
+               --with-pkg-extra-version=_git$commit && \
+       make dist)
+FROM alpine:3.7 as alpine-builder
+RUN apk add --no-cache abuild alpine-sdk && mkdir -p /pkgs/apk
+ADD alpine-build.sh /usr/bin/
+ADD builder /etc/sudoers.d
+COPY --from=source-builder /src/*.tar.gz /src/alpine/APKBUILD /dist/
+RUN adduser -D -G abuild builder && chown -R builder /dist /pkgs
+USER builder
+RUN /usr/bin/alpine-build.sh
diff --git a/docker/alpine/alpine-build.sh b/docker/alpine/alpine-build.sh
new file mode 100755 (executable)
index 0000000..d4c0311
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+cd /dist
+
+sudo apk --update add alpine-conf
+sudo setup-apkcache /var/cache/apk
+abuild-keygen -a -n
+abuild checksum
+abuild -r -P /pkgs/apk
diff --git a/docker/alpine/build.sh b/docker/alpine/build.sh
new file mode 100755 (executable)
index 0000000..357ea12
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+set -v
+set -x
+
+##
+# commit must be converted to decimal
+##
+c=`git rev-parse --short=10 HEAD`
+commit=`printf '%u\n' 0x$c`
+git archive --format=tar $c > docker/alpine/src.tar
+(cd docker/alpine && \
+       docker build --build-arg commit=$commit --rm --force-rm -t \
+               frr:alpine-$c . && \
+       rm -f src.tar)
+
+id=`docker create frr:alpine-$c`
+docker cp ${id}:/pkgs/ docker
+docker rm $id
+docker rmi frr:alpine-$c
diff --git a/docker/alpine/builder b/docker/alpine/builder
new file mode 100644 (file)
index 0000000..a950b8a
--- /dev/null
@@ -0,0 +1 @@
+builder ALL=(ALL) NOPASSWD:ALL
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h
new file mode 100644 (file)
index 0000000..bc66880
--- /dev/null
@@ -0,0 +1,74 @@
+#ifndef __LINUX_FIB_RULES_H
+#define __LINUX_FIB_RULES_H
+
+#include <linux/types.h>
+#include <linux/rtnetlink.h>
+
+/* rule is permanent, and cannot be deleted */
+#define FIB_RULE_PERMANENT     0x00000001
+#define FIB_RULE_INVERT                0x00000002
+#define FIB_RULE_UNRESOLVED    0x00000004
+#define FIB_RULE_IIF_DETACHED  0x00000008
+#define FIB_RULE_DEV_DETACHED  FIB_RULE_IIF_DETACHED
+#define FIB_RULE_OIF_DETACHED  0x00000010
+
+/* try to find source address in routing lookups */
+#define FIB_RULE_FIND_SADDR    0x00010000
+
+struct fib_rule_hdr {
+       __u8            family;
+       __u8            dst_len;
+       __u8            src_len;
+       __u8            tos;
+
+       __u8            table;
+       __u8            res1;   /* reserved */
+       __u8            res2;   /* reserved */
+       __u8            action;
+
+       __u32           flags;
+};
+
+enum {
+       FRA_UNSPEC,
+       FRA_DST,        /* destination address */
+       FRA_SRC,        /* source address */
+       FRA_IIFNAME,    /* interface name */
+#define FRA_IFNAME     FRA_IIFNAME
+       FRA_GOTO,       /* target to jump to (FR_ACT_GOTO) */
+       FRA_UNUSED2,
+       FRA_PRIORITY,   /* priority/preference */
+       FRA_UNUSED3,
+       FRA_UNUSED4,
+       FRA_UNUSED5,
+       FRA_FWMARK,     /* mark */
+       FRA_FLOW,       /* flow/class id */
+       FRA_UNUSED6,
+       FRA_SUPPRESS_IFGROUP,
+       FRA_SUPPRESS_PREFIXLEN,
+       FRA_TABLE,      /* Extended table id */
+       FRA_FWMASK,     /* mask for netfilter mark */
+       FRA_OIFNAME,
+       FRA_PAD,
+       FRA_L3MDEV,     /* iif or oif is l3mdev goto its table */
+       __FRA_MAX
+};
+
+#define FRA_MAX (__FRA_MAX - 1)
+
+enum {
+       FR_ACT_UNSPEC,
+       FR_ACT_TO_TBL,          /* Pass to fixed table */
+       FR_ACT_GOTO,            /* Jump to another rule */
+       FR_ACT_NOP,             /* No operation */
+       FR_ACT_RES3,
+       FR_ACT_RES4,
+       FR_ACT_BLACKHOLE,       /* Drop without notification */
+       FR_ACT_UNREACHABLE,     /* Drop with ENETUNREACH */
+       FR_ACT_PROHIBIT,        /* Drop with EACCES */
+       __FR_ACT_MAX,
+};
+
+#define FR_ACT_MAX (__FR_ACT_MAX - 1)
+
+#endif
index 7a12b2ffae990410842e78cdeee675b5f0b17c78..db5ed06c61e85880c8a6010c6513aeb5e326cc94 100644 (file)
@@ -7,4 +7,5 @@ noinst_HEADERS += \
        include/linux/rtnetlink.h \
        include/linux/socket.h \
        include/linux/net_namespace.h \
+       include/linux/fib_rules.h \
        # end
index 72e6d4bdb99693ba8f837f461a70140bbba4181a..a6e1a55a9f52c1585013bcf98aba72be3ed1a49e 100644 (file)
@@ -47,6 +47,7 @@
 #include "isisd/isis_spf.h"
 #include "isisd/isis_events.h"
 #include "isisd/isis_mt.h"
+#include "isisd/isis_tlvs.h"
 
 extern struct isis *isis;
 
@@ -78,6 +79,7 @@ struct isis_adjacency *isis_new_adj(const u_char *id, const u_char *snpa,
        adj->level = level;
        adj->flaps = 0;
        adj->last_flap = time(NULL);
+       adj->threeway_state = ISIS_THREEWAY_DOWN;
        if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
                listnode_add(circuit->u.bc.adjdb[level - 1], adj);
                adj->dischanges[level - 1] = 0;
@@ -161,6 +163,51 @@ static const char *adj_state2string(int state)
        return NULL; /* not reached */
 }
 
+void isis_adj_process_threeway(struct isis_adjacency *adj,
+                              struct isis_threeway_adj *tw_adj,
+                              enum isis_adj_usage adj_usage)
+{
+       enum isis_threeway_state next_tw_state = ISIS_THREEWAY_DOWN;
+
+       if (tw_adj && !adj->circuit->disable_threeway_adj) {
+               if (tw_adj->state == ISIS_THREEWAY_DOWN) {
+                       next_tw_state = ISIS_THREEWAY_INITIALIZING;
+               } else if (tw_adj->state == ISIS_THREEWAY_INITIALIZING) {
+                       next_tw_state = ISIS_THREEWAY_UP;
+               } else if (tw_adj->state == ISIS_THREEWAY_UP) {
+                       if (adj->threeway_state == ISIS_THREEWAY_DOWN)
+                               next_tw_state = ISIS_THREEWAY_DOWN;
+                       else
+                               next_tw_state = ISIS_THREEWAY_UP;
+               }
+       } else {
+               next_tw_state = ISIS_THREEWAY_UP;
+       }
+
+       if (next_tw_state != adj->threeway_state) {
+               if (isis->debugs & DEBUG_ADJ_PACKETS) {
+                       zlog_info("ISIS-Adj (%s): Threeway state change %s to %s",
+                                 adj->circuit->area->area_tag,
+                                 isis_threeway_state_name(adj->threeway_state),
+                                 isis_threeway_state_name(next_tw_state));
+               }
+       }
+
+       if (next_tw_state == ISIS_THREEWAY_DOWN) {
+               isis_adj_state_change(adj, ISIS_ADJ_DOWN, "Neighbor restarted");
+               return;
+       }
+
+       if (next_tw_state == ISIS_THREEWAY_UP) {
+               if (adj->adj_state != ISIS_ADJ_UP) {
+                       isis_adj_state_change(adj, ISIS_ADJ_UP, NULL);
+                       adj->adj_usage = adj_usage;
+               }
+       }
+
+       adj->threeway_state = next_tw_state;
+}
+
 void isis_adj_state_change(struct isis_adjacency *adj,
                           enum isis_adj_state new_state, const char *reason)
 {
index 98bb9838fa5170fb9f4fef3c150b7668ca2fecb7..2c3bd19af8563571ea8090cee1b34f8ec0065169 100644 (file)
@@ -25,6 +25,8 @@
 #ifndef _ZEBRA_ISIS_ADJACENCY_H
 #define _ZEBRA_ISIS_ADJACENCY_H
 
+#include "isisd/isis_tlvs.h"
+
 enum isis_adj_usage {
        ISIS_ADJ_NONE,
        ISIS_ADJ_LEVEL1,
@@ -91,6 +93,8 @@ struct isis_adjacency {
        u_int16_t hold_time;            /* entryRemainingTime */
        u_int32_t last_upd;
        u_int32_t last_flap;      /* last time the adj flapped */
+       enum isis_threeway_state threeway_state;
+       uint32_t ext_circuit_id;
        int flaps;                    /* number of adjacency flaps  */
        struct thread *t_expire;      /* expire after hold_time  */
        struct isis_circuit *circuit; /* back pointer */
@@ -98,12 +102,17 @@ struct isis_adjacency {
        unsigned int mt_count; /* Number of entries in mt_set */
 };
 
+struct isis_threeway_adj;
+
 struct isis_adjacency *isis_adj_lookup(const u_char *sysid, struct list *adjdb);
 struct isis_adjacency *isis_adj_lookup_snpa(const u_char *ssnpa,
                                            struct list *adjdb);
 struct isis_adjacency *isis_new_adj(const u_char *id, const u_char *snpa,
                                    int level, struct isis_circuit *circuit);
 void isis_delete_adj(void *adj);
+void isis_adj_process_threeway(struct isis_adjacency *adj,
+                              struct isis_threeway_adj *tw_adj,
+                              enum isis_adj_usage adj_usage);
 void isis_adj_state_change(struct isis_adjacency *adj,
                           enum isis_adj_state state, const char *reason);
 void isis_adj_print(struct isis_adjacency *adj);
index 0493c125bdd32670343b74959d3cbd5cf1c7224a..872bc5bc72f2395e9e7a42800e9fe6e4d281788f 100644 (file)
@@ -216,7 +216,8 @@ end:
 
 int isis_recv_pdu_bcast(struct isis_circuit *circuit, u_char *ssnpa)
 {
-       int bytesread = 0, bytestoread, offset, one = 1;
+       int bytesread = 0, bytestoread, offset, one = 1, err = ISIS_OK;
+       u_char *buff_ptr;
        struct bpf_hdr *bpf_hdr;
 
        assert(circuit->fd > 0);
@@ -230,25 +231,33 @@ int isis_recv_pdu_bcast(struct isis_circuit *circuit, u_char *ssnpa)
        }
        if (bytesread < 0) {
                zlog_warn("isis_recv_pdu_bcast(): read() failed: %s",
-                         safe_strerror(errno));
+                               safe_strerror(errno));
                return ISIS_WARNING;
        }
 
        if (bytesread == 0)
                return ISIS_WARNING;
 
-       bpf_hdr = (struct bpf_hdr *)readbuff;
+       buff_ptr = readbuff;
+       while (buff_ptr < readbuff + bytesread) {
+               bpf_hdr = (struct bpf_hdr *) buff_ptr;
+               assert(bpf_hdr->bh_caplen == bpf_hdr->bh_datalen);
+               offset = bpf_hdr->bh_hdrlen + LLC_LEN + ETHER_HDR_LEN;
 
-       assert(bpf_hdr->bh_caplen == bpf_hdr->bh_datalen);
+               /* then we lose the BPF, LLC and ethernet headers */
+               stream_write(circuit->rcv_stream, buff_ptr + offset,
+                            bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN);
+               stream_set_getp(circuit->rcv_stream, 0);
 
-       offset = bpf_hdr->bh_hdrlen + LLC_LEN + ETHER_HDR_LEN;
+               memcpy(ssnpa, buff_ptr + bpf_hdr->bh_hdrlen + ETHER_ADDR_LEN,
+               ETHER_ADDR_LEN);
 
-       /* then we lose the BPF, LLC and ethernet headers */
-       stream_write(circuit->rcv_stream, readbuff + offset,
-                    bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN);
-       stream_set_getp(circuit->rcv_stream, 0);
+               err = isis_handle_pdu(circuit, ssnpa);
+               stream_reset(circuit->rcv_stream);
+               buff_ptr += BPF_WORDALIGN(bpf_hdr->bh_hdrlen +
+                                               bpf_hdr->bh_datalen);
+       }
 
-       memcpy(ssnpa, readbuff + bpf_hdr->bh_hdrlen + ETH_ALEN, ETH_ALEN);
 
        if (ioctl(circuit->fd, BIOCFLUSH, &one) < 0)
                zlog_warn("Flushing failed: %s", safe_strerror(errno));
index 75d43976372acd983ed6dba5ce4b400cae1f3e7e..2c443c71f702ca8f1e8648f630a5c7e2a22b3cc3 100644 (file)
@@ -234,8 +234,8 @@ void isis_circuit_add_addr(struct isis_circuit *circuit,
 
 #ifdef EXTREME_DEBUG
                prefix2str(connected->address, buf, sizeof(buf));
-               zlog_debug("Added IP address %s to circuit %d", buf,
-                          circuit->circuit_id);
+               zlog_debug("Added IP address %s to circuit %s", buf,
+                          circuit->interface->name);
 #endif /* EXTREME_DEBUG */
        }
        if (connected->address->family == AF_INET6) {
@@ -265,8 +265,8 @@ void isis_circuit_add_addr(struct isis_circuit *circuit,
 
 #ifdef EXTREME_DEBUG
                prefix2str(connected->address, buf, sizeof(buf));
-               zlog_debug("Added IPv6 address %s to circuit %d", buf,
-                          circuit->circuit_id);
+               zlog_debug("Added IPv6 address %s to circuit %s", buf,
+                          circuit->interface->name);
 #endif /* EXTREME_DEBUG */
        }
        return;
@@ -300,9 +300,9 @@ void isis_circuit_del_addr(struct isis_circuit *circuit,
                } else {
                        prefix2str(connected->address, buf, sizeof(buf));
                        zlog_warn(
-                               "Nonexistant ip address %s removal attempt from \
-                      circuit %d",
-                               buf, circuit->circuit_id);
+                               "Nonexistent ip address %s removal attempt from \
+                      circuit %s",
+                               buf, circuit->interface->name);
                        zlog_warn("Current ip addresses on %s:",
                                  circuit->interface->name);
                        for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, node,
@@ -349,9 +349,9 @@ void isis_circuit_del_addr(struct isis_circuit *circuit,
                if (!found) {
                        prefix2str(connected->address, buf, sizeof(buf));
                        zlog_warn(
-                               "Nonexitant ip address %s removal attempt from \
-                     circuit %d",
-                               buf, circuit->circuit_id);
+                               "Nonexistent ip address %s removal attempt from \
+                     circuit %s",
+                               buf, circuit->interface->name);
                        zlog_warn("Current ip addresses on %s:",
                                  circuit->interface->name);
                        for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_link, node,
@@ -377,17 +377,15 @@ void isis_circuit_del_addr(struct isis_circuit *circuit,
        return;
 }
 
-static uint8_t isis_circuit_id_gen(struct interface *ifp)
+static uint8_t isis_circuit_id_gen(struct isis *isis, struct interface *ifp)
 {
        /* Circuit ids MUST be unique for any broadcast circuits. Otherwise,
         * Pseudo-Node LSPs cannot be generated correctly.
         *
-        * Currently, allocate one circuit ID for any circuit, limiting the
-        * total
+        * Currently, allocate one circuit ID for any circuit, limiting the total
         * numer of circuits IS-IS can run on to 255.
         *
-        * We should revisit this when implementing 3-way adjacencies for p2p,
-        * since
+        * We should revisit this when implementing 3-way adjacencies for p2p, since
         * we then have extended interface IDs available.
         */
        uint8_t id = ifp->ifindex;
@@ -405,6 +403,7 @@ static uint8_t isis_circuit_id_gen(struct interface *ifp)
                return 0;
        }
 
+       _ISIS_SET_FLAG(isis->circuit_ids_used, id);
        return id;
 }
 
@@ -413,11 +412,7 @@ void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp)
        struct listnode *node, *nnode;
        struct connected *conn;
 
-       circuit->circuit_id = isis_circuit_id_gen(ifp);
-       _ISIS_SET_FLAG(isis->circuit_ids_used, circuit->circuit_id);
-
        isis_circuit_if_bind(circuit, ifp);
-       /*  isis_circuit_update_addrs (circuit, ifp); */
 
        if (if_is_broadcast(ifp)) {
                if (circuit->circ_type_config == CIRCUIT_T_P2P)
@@ -442,8 +437,6 @@ void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp)
 
        for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, conn))
                isis_circuit_add_addr(circuit, conn);
-
-       return;
 }
 
 void isis_circuit_if_del(struct isis_circuit *circuit, struct interface *ifp)
@@ -460,26 +453,19 @@ void isis_circuit_if_del(struct isis_circuit *circuit, struct interface *ifp)
        if (circuit->ip_addrs) {
                assert(listcount(circuit->ip_addrs) == 0);
                list_delete_and_null(&circuit->ip_addrs);
-               circuit->ip_addrs = NULL;
        }
 
        if (circuit->ipv6_link) {
                assert(listcount(circuit->ipv6_link) == 0);
                list_delete_and_null(&circuit->ipv6_link);
-               circuit->ipv6_link = NULL;
        }
 
        if (circuit->ipv6_non_link) {
                assert(listcount(circuit->ipv6_non_link) == 0);
                list_delete_and_null(&circuit->ipv6_non_link);
-               circuit->ipv6_non_link = NULL;
        }
 
        circuit->circ_type = CIRCUIT_T_UNKNOWN;
-       _ISIS_CLEAR_FLAG(isis->circuit_ids_used, circuit->circuit_id);
-       circuit->circuit_id = 0;
-
-       return;
 }
 
 void isis_circuit_if_bind(struct isis_circuit *circuit, struct interface *ifp)
@@ -593,6 +579,12 @@ int isis_circuit_up(struct isis_circuit *circuit)
        }
 
        if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
+               circuit->circuit_id = isis_circuit_id_gen(isis, circuit->interface);
+               if (!circuit->circuit_id) {
+                       zlog_err("There are already 255 broadcast circuits active!");
+                       return ISIS_ERROR;
+               }
+
                /*
                 * Get the Hardware Address
                 */
@@ -737,6 +729,9 @@ void isis_circuit_down(struct isis_circuit *circuit)
                THREAD_TIMER_OFF(circuit->u.bc.t_refresh_pseudo_lsp[1]);
                circuit->lsp_regenerate_pending[0] = 0;
                circuit->lsp_regenerate_pending[1] = 0;
+
+               _ISIS_CLEAR_FLAG(isis->circuit_ids_used, circuit->circuit_id);
+               circuit->circuit_id = 0;
        } else if (circuit->circ_type == CIRCUIT_T_P2P) {
                isis_delete_adj(circuit->u.p2p.neighbor);
                circuit->u.p2p.neighbor = NULL;
@@ -1046,6 +1041,11 @@ int isis_interface_config_write(struct vty *vty)
                                write++;
                        }
 
+                       if (circuit->disable_threeway_adj) {
+                               vty_out(vty, " no isis three-way-handshake\n");
+                               write++;
+                       }
+
                        /* ISIS - Hello interval */
                        if (circuit->hello_interval[0]
                            == circuit->hello_interval[1]) {
index 0d392036e944b44a37b8ea0aebceda35a65af761..246279c6f3dca75c49c2e85462d7a24306c2a713 100644 (file)
@@ -32,8 +32,6 @@
 #include "isis_constants.h"
 #include "isis_common.h"
 
-#define CIRCUIT_MAX 255
-
 struct isis_lsp;
 
 struct password {
@@ -69,7 +67,7 @@ struct isis_p2p_info {
 
 struct isis_circuit {
        int state;
-       u_char circuit_id;         /* l1/l2 p2p/bcast CircuitID */
+       u_char circuit_id;           /* l1/l2 bcast CircuitID */
        struct isis_area *area;      /* back pointer to the area */
        struct interface *interface; /* interface info from z */
        int fd;                      /* IS-IS l1/2 socket */
@@ -82,9 +80,8 @@ struct isis_circuit {
        struct thread *t_send_csnp[2];
        struct thread *t_send_psnp[2];
        struct thread *t_send_lsp;
-       struct list *lsp_queue; /* LSPs to be txed (both levels) */
-       struct isis_lsp_hash
-               *lsp_hash; /* Hashtable synchronized with lsp_queue */
+       struct list *lsp_queue; /* LSPs to be txed (both levels) */
+       struct isis_lsp_hash *lsp_hash; /* Hashtable synchronized with lsp_queue */
        time_t lsp_queue_last_push[2]; /* timestamp used to enforce transmit
                                        * interval;
                                        * for scalability, use one timestamp per
@@ -135,6 +132,7 @@ struct isis_circuit {
        u_int16_t upadjcount[2];
 #define ISIS_CIRCUIT_FLAPPED_AFTER_SPF 0x01
        u_char flags;
+       bool disable_threeway_adj;
        /*
         * Counters as in 10589--11.2.5.9
         */
index a283260d92aa590d93896f1d8e1d9fc423506afe..10870d5c50210c222d8ea40b9107ab540b28ef9f 100644 (file)
@@ -86,13 +86,6 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
                case IF_UP_FROM_Z:
                        circuit = isis_circuit_new();
                        isis_circuit_if_add(circuit, (struct interface *)arg);
-                       if (!circuit->circuit_id) {
-                               isis_circuit_if_del(circuit,
-                                                   (struct interface *)arg);
-                               isis_circuit_del(circuit);
-                               circuit = NULL;
-                               break;
-                       }
                        listnode_add(isis->init_circ_list, circuit);
                        circuit->state = C_STATE_INIT;
                        break;
@@ -143,8 +136,6 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
                        break;
                case IF_UP_FROM_Z:
                        isis_circuit_if_add(circuit, (struct interface *)arg);
-                       if (!circuit->circuit_id)
-                               break;
                        if (isis_circuit_up(circuit) != ISIS_OK) {
                                zlog_err(
                                        "Could not bring up %s because of invalid config.",
index 55888bd38953b1894e85c0e774160988e1e34e44..b2ba8b3932bf95c7eaef13a171a947cf4e7d029a 100644 (file)
@@ -1034,7 +1034,8 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
                        break;
                case CIRCUIT_T_P2P: {
                        struct isis_adjacency *nei = circuit->u.p2p.neighbor;
-                       if (nei && (level & nei->circuit_t)) {
+                       if (nei && nei->adj_state == ISIS_ADJ_UP
+                           && (level & nei->circuit_t)) {
                                uint8_t ne_id[7];
                                memcpy(ne_id, nei->sysid, ISIS_SYS_ID_LEN);
                                LSP_PSEUDO_ID(ne_id) = 0;
@@ -1875,15 +1876,12 @@ int lsp_tick(struct thread *thread)
                                        if (!circuit->lsp_queue)
                                                continue;
 
-                                       if (now
-                                                   - circuit->lsp_queue_last_push
-                                                             [level]
+                                       if (now - circuit->lsp_queue_last_push[level]
                                            < MIN_LSP_RETRANS_INTERVAL) {
                                                continue;
                                        }
 
-                                       circuit->lsp_queue_last_push[level] =
-                                               now;
+                                       circuit->lsp_queue_last_push[level] = now;
 
                                        for (ALL_LIST_ELEMENTS_RO(
                                                     lsp_list, lspnode, lsp)) {
index 20c39a624f395acb2dff5ce0a03342933e3e002c..ebcf197a3730f240af737b205c1ef38b53191e47 100644 (file)
@@ -120,6 +120,32 @@ struct iih_info {
 
 static int process_p2p_hello(struct iih_info *iih)
 {
+       struct isis_threeway_adj *tw_adj = iih->tlvs->threeway_adj;
+       if (tw_adj) {
+               if (tw_adj->state > ISIS_THREEWAY_DOWN) {
+                       if (isis->debugs & DEBUG_ADJ_PACKETS) {
+                               zlog_debug("ISIS-Adj (%s): Rcvd P2P IIH from (%s) with invalid three-way state: %d\n",
+                                          iih->circuit->area->area_tag,
+                                          iih->circuit->interface->name,
+                                          tw_adj->state);
+                       }
+                       return ISIS_WARNING;
+               }
+
+               if (tw_adj->neighbor_set
+                   && (memcmp(tw_adj->neighbor_id, isis->sysid, ISIS_SYS_ID_LEN)
+                       || tw_adj->neighbor_circuit_id != (uint32_t) iih->circuit->idx)) {
+
+                       if (isis->debugs & DEBUG_ADJ_PACKETS) {
+                               zlog_debug("ISIS-Adj (%s): Rcvd P2P IIH from (%s) which lists IS/Circuit different from us as neighbor.\n",
+                                          iih->circuit->area->area_tag,
+                                          iih->circuit->interface->name);
+                       }
+
+                       return ISIS_WARNING;
+               }
+       }
+
        /*
         * My interpertation of the ISO, if no adj exists we will create one for
         * the circuit
@@ -155,6 +181,9 @@ static int process_p2p_hello(struct iih_info *iih)
                adj->sys_type = ISIS_SYSTYPE_UNKNOWN;
        }
 
+       if (tw_adj && adj->threeway_state == ISIS_THREEWAY_DOWN)
+               adj->ext_circuit_id = tw_adj->local_circuit_id;
+
        /* 8.2.6 Monitoring point-to-point adjacencies */
        adj->hold_time = iih->holdtime;
        adj->last_upd = time(NULL);
@@ -183,14 +212,10 @@ static int process_p2p_hello(struct iih_info *iih)
                        switch (iih->circ_type) {
                        case IS_LEVEL_1:
                        case IS_LEVEL_1_AND_2:
-                               if (adj->adj_state != ISIS_ADJ_UP) {
-                                       /* (4) adj state up */
-                                       isis_adj_state_change(adj, ISIS_ADJ_UP,
-                                                             NULL);
-                                       /* (5) adj usage level 1 */
-                                       adj->adj_usage = ISIS_ADJ_LEVEL1;
-                               } else if (adj->adj_usage == ISIS_ADJ_LEVEL1) {
-                                       ; /* accept */
+                               if (adj->adj_state != ISIS_ADJ_UP
+                                   || adj->adj_usage == ISIS_ADJ_LEVEL1) {
+                                       isis_adj_process_threeway(adj, tw_adj,
+                                                                 ISIS_ADJ_LEVEL1);
                                }
                                break;
                        case IS_LEVEL_2:
@@ -213,14 +238,10 @@ static int process_p2p_hello(struct iih_info *iih)
                if (iih->circuit->area->is_type == IS_LEVEL_1_AND_2) {
                        switch (iih->circ_type) {
                        case IS_LEVEL_1:
-                               if (adj->adj_state != ISIS_ADJ_UP) {
-                                       /* (6) adj state up */
-                                       isis_adj_state_change(adj, ISIS_ADJ_UP,
-                                                             NULL);
-                                       /* (7) adj usage level 1 */
-                                       adj->adj_usage = ISIS_ADJ_LEVEL1;
-                               } else if (adj->adj_usage == ISIS_ADJ_LEVEL1) {
-                                       ; /* accept */
+                               if (adj->adj_state != ISIS_ADJ_UP
+                                   || adj->adj_usage == ISIS_ADJ_LEVEL1) {
+                                       isis_adj_process_threeway(adj, tw_adj,
+                                                                 ISIS_ADJ_LEVEL1);
                                } else if ((adj->adj_usage
                                            == ISIS_ADJ_LEVEL1AND2)
                                           || (adj->adj_usage
@@ -232,12 +253,10 @@ static int process_p2p_hello(struct iih_info *iih)
                                }
                                break;
                        case IS_LEVEL_2:
-                               if (adj->adj_state != ISIS_ADJ_UP) {
-                                       /* (6) adj state up */
-                                       isis_adj_state_change(adj, ISIS_ADJ_UP,
-                                                             NULL);
-                                       /* (9) adj usage level 2 */
-                                       adj->adj_usage = ISIS_ADJ_LEVEL2;
+                               if (adj->adj_state != ISIS_ADJ_UP
+                                   || adj->adj_usage == ISIS_ADJ_LEVEL2) {
+                                       isis_adj_process_threeway(adj, tw_adj,
+                                                                 ISIS_ADJ_LEVEL2);
                                } else if ((adj->adj_usage == ISIS_ADJ_LEVEL1)
                                           || (adj->adj_usage
                                               == ISIS_ADJ_LEVEL1AND2)) {
@@ -245,17 +264,13 @@ static int process_p2p_hello(struct iih_info *iih)
                                        isis_adj_state_change(adj,
                                                              ISIS_ADJ_DOWN,
                                                              "Wrong System");
-                               } else if (adj->adj_usage == ISIS_ADJ_LEVEL2) {
-                                       ; /* Accept */
                                }
                                break;
                        case IS_LEVEL_1_AND_2:
-                               if (adj->adj_state != ISIS_ADJ_UP) {
-                                       /* (6) adj state up */
-                                       isis_adj_state_change(adj, ISIS_ADJ_UP,
-                                                             NULL);
-                                       /* (10) adj usage level 1 */
-                                       adj->adj_usage = ISIS_ADJ_LEVEL1AND2;
+                               if (adj->adj_state != ISIS_ADJ_UP
+                                   || adj->adj_usage == ISIS_ADJ_LEVEL1AND2) {
+                                       isis_adj_process_threeway(adj, tw_adj,
+                                                                 ISIS_ADJ_LEVEL1AND2);
                                } else if ((adj->adj_usage == ISIS_ADJ_LEVEL1)
                                           || (adj->adj_usage
                                               == ISIS_ADJ_LEVEL2)) {
@@ -263,9 +278,6 @@ static int process_p2p_hello(struct iih_info *iih)
                                        isis_adj_state_change(adj,
                                                              ISIS_ADJ_DOWN,
                                                              "Wrong System");
-                               } else if (adj->adj_usage
-                                          == ISIS_ADJ_LEVEL1AND2) {
-                                       ; /* Accept */
                                }
                                break;
                        }
@@ -292,20 +304,16 @@ static int process_p2p_hello(struct iih_info *iih)
                                break;
                        case IS_LEVEL_1_AND_2:
                        case IS_LEVEL_2:
-                               if (adj->adj_state != ISIS_ADJ_UP) {
-                                       /* (7) adj state up */
-                                       isis_adj_state_change(adj, ISIS_ADJ_UP,
-                                                             NULL);
-                                       /* (8) adj usage level 2 */
-                                       adj->adj_usage = ISIS_ADJ_LEVEL2;
+                               if (adj->adj_state != ISIS_ADJ_UP
+                                   || adj->adj_usage == ISIS_ADJ_LEVEL2) {
+                                       isis_adj_process_threeway(adj, tw_adj,
+                                                                 ISIS_ADJ_LEVEL2);
                                } else if (adj->adj_usage
                                           == ISIS_ADJ_LEVEL1AND2) {
                                        /* (6) down - wrong system */
                                        isis_adj_state_change(adj,
                                                              ISIS_ADJ_DOWN,
                                                              "Wrong System");
-                               } else if (adj->adj_usage == ISIS_ADJ_LEVEL2) {
-                                       ; /* Accept */
                                }
                                break;
                        }
@@ -350,12 +358,10 @@ static int process_p2p_hello(struct iih_info *iih)
                                break;
                        case IS_LEVEL_1_AND_2:
                        case IS_LEVEL_2:
-                               if (adj->adj_state != ISIS_ADJ_UP) {
-                                       /* (8) adj state up */
-                                       isis_adj_state_change(adj, ISIS_ADJ_UP,
-                                                             NULL);
-                                       /* (9) adj usage level 2 */
-                                       adj->adj_usage = ISIS_ADJ_LEVEL2;
+                               if (adj->adj_state != ISIS_ADJ_UP
+                                   || adj->adj_usage == ISIS_ADJ_LEVEL2) {
+                                       isis_adj_process_threeway(adj, tw_adj,
+                                                                 ISIS_ADJ_LEVEL2);
                                } else if (adj->adj_usage == ISIS_ADJ_LEVEL1) {
                                        /* (7) down - wrong system */
                                        isis_adj_state_change(adj,
@@ -374,8 +380,6 @@ static int process_p2p_hello(struct iih_info *iih)
                                                        adj, ISIS_ADJ_DOWN,
                                                        "Area Mismatch");
                                        }
-                               } else if (adj->adj_usage == ISIS_ADJ_LEVEL2) {
-                                       ; /* Accept */
                                }
                                break;
                        }
@@ -415,7 +419,7 @@ static int process_p2p_hello(struct iih_info *iih)
        if (isis->debugs & DEBUG_ADJ_PACKETS) {
                zlog_debug(
                        "ISIS-Adj (%s): Rcvd P2P IIH from (%s), cir type %s,"
-                       " cir id %02d, length %d",
+                       " cir id %hhu, length %" PRIu16,
                        iih->circuit->area->area_tag,
                        iih->circuit->interface->name,
                        circuit_t2string(iih->circuit->is_type),
@@ -1184,8 +1188,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
                     entry = entry->next) {
                        zlog_debug(
                                "ISIS-Snp (%s):         %cSNP entry %s, seq 0x%08" PRIx32
-                               ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
-                               "s",
+                               ", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 "s",
                                circuit->area->area_tag, typechar,
                                rawlspid_print(entry->id), entry->seqno,
                                entry->checksum, entry->rem_lifetime);
@@ -1244,12 +1247,10 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
                                               ISIS_SYS_ID_LEN + 1);
                                        LSP_FRAGMENT(lspid) = 0;
                                        lsp0 = lsp_search(
-                                               lspid,
-                                               circuit->area
-                                                       ->lspdb[level - 1]);
+                                                 lspid,
+                                                 circuit->area->lspdb[level - 1]);
                                        if (!lsp0) {
-                                               zlog_debug(
-                                                       "Got lsp frag in snp, while zero not in database");
+                                               zlog_debug("Got lsp frag in snp, while zero not in database");
                                                continue;
                                        }
                                }
@@ -1336,7 +1337,7 @@ static int pdu_size(uint8_t pdu_type, uint8_t *size)
  * PDU Dispatcher
  */
 
-static int isis_handle_pdu(struct isis_circuit *circuit, u_char *ssnpa)
+int isis_handle_pdu(struct isis_circuit *circuit, u_char *ssnpa)
 {
        int retval = ISIS_OK;
 
@@ -1459,8 +1460,10 @@ int isis_receive(struct thread *thread)
 
        retval = circuit->rx(circuit, ssnpa);
 
+#if ISIS_METHOD != ISIS_METHOD_BPF
        if (retval == ISIS_OK)
                retval = isis_handle_pdu(circuit, ssnpa);
+#endif //ISIS_METHOD != ISIS_METHOD_BPF
 
        /*
         * prepare for next packet.
@@ -1555,9 +1558,25 @@ int send_hello(struct isis_circuit *circuit, int level)
 
        isis_tlvs_add_area_addresses(tlvs, circuit->area->area_addrs);
 
-       if (circuit->circ_type == CIRCUIT_T_BROADCAST)
+       if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
                isis_tlvs_add_lan_neighbors(
                        tlvs, circuit->u.bc.lan_neighs[level - 1]);
+       } else if (circuit->circ_type == CIRCUIT_T_P2P
+                  && !circuit->disable_threeway_adj) {
+               uint32_t ext_circuit_id = circuit->idx;
+               if (circuit->u.p2p.neighbor) {
+                       isis_tlvs_add_threeway_adj(tlvs,
+                                       circuit->u.p2p.neighbor->threeway_state,
+                                       ext_circuit_id,
+                                       circuit->u.p2p.neighbor->sysid,
+                                       circuit->u.p2p.neighbor->ext_circuit_id);
+               } else {
+                       isis_tlvs_add_threeway_adj(tlvs,
+                                       ISIS_THREEWAY_DOWN,
+                                       ext_circuit_id,
+                                       NULL, 0);
+               }
+       }
 
        isis_tlvs_set_protocols_supported(tlvs, &circuit->nlpids);
 
index 7096761879394591f830f7554d30f6d6707ed5ca..2d9100c10b118b80276bd107ebe35e5abdc90ca2 100644 (file)
@@ -215,5 +215,5 @@ int send_l2_psnp(struct thread *thread);
 int send_lsp(struct thread *thread);
 void fill_fixed_hdr(uint8_t pdu_type, struct stream *stream);
 int send_hello(struct isis_circuit *circuit, int level);
-
+int isis_handle_pdu(struct isis_circuit *circuit, u_char *ssnpa);
 #endif /* _ZEBRA_ISIS_PDU_H */
index 198cf35e686a7e03de78165f257880cdbbe5ebce..48fcf449c761dffa9063dbc02a89202e1c4d1863 100644 (file)
@@ -254,8 +254,8 @@ void isis_redist_add(int type, struct prefix *p, u_char distance,
        char debug_buf[BUFSIZ];
        prefix2str(p, debug_buf, sizeof(debug_buf));
 
-       zlog_debug("%s: New route %s from %s.", __func__, debug_buf,
-                  zebra_route_string(type));
+       zlog_debug("%s: New route %s from %s: distance %d.", __func__,
+                  debug_buf, zebra_route_string(type), distance);
 
        if (!ei_table) {
                zlog_warn("%s: External information table not initialized.",
index b9605018ed506675f8569af1ef78dd507e50f14e..ad769f98869a9d0ce60b6cde29b0a98f4cd7b6e6 100644 (file)
@@ -100,26 +100,6 @@ static int nexthoplookup(struct list *nexthops, struct in_addr *ip,
        return 0;
 }
 
-#ifdef EXTREME_DEBUG
-static void nexthop_print(struct isis_nexthop *nh)
-{
-       u_char buf[BUFSIZ];
-
-       inet_ntop(AF_INET, &nh->ip, (char *)buf, BUFSIZ);
-
-       zlog_debug("      %s %u", buf, nh->ifindex);
-}
-
-static void nexthops_print(struct list *nhs)
-{
-       struct listnode *node;
-       struct isis_nexthop *nh;
-
-       for (ALL_LIST_ELEMENTS_RO(nhs, node, nh))
-               nexthop_print(nh);
-}
-#endif /* EXTREME_DEBUG */
-
 static struct isis_nexthop6 *isis_nexthop6_new(struct in6_addr *ip6,
                                               ifindex_t ifindex)
 {
@@ -184,26 +164,6 @@ static int nexthop6lookup(struct list *nexthops6, struct in6_addr *ip6,
        return 0;
 }
 
-#ifdef EXTREME_DEBUG
-static void nexthop6_print(struct isis_nexthop6 *nh6)
-{
-       u_char buf[BUFSIZ];
-
-       inet_ntop(AF_INET6, &nh6->ip6, (char *)buf, BUFSIZ);
-
-       zlog_debug("      %s %u", buf, nh6->ifindex);
-}
-
-static void nexthops6_print(struct list *nhs6)
-{
-       struct listnode *node;
-       struct isis_nexthop6 *nh6;
-
-       for (ALL_LIST_ELEMENTS_RO(nhs6, node, nh6))
-               nexthop6_print(nh6);
-}
-#endif /* EXTREME_DEBUG */
-
 static void adjinfo2nexthop(struct list *nexthops, struct isis_adjacency *adj)
 {
        struct isis_nexthop *nh;
index 0eabcb7e47a468a087bac0a95bc633ee7706cf7a..dc86d4c1056715f0dfefaa1a864f607f4e6bd4cf 100644 (file)
@@ -85,10 +85,10 @@ struct isis_vertex {
                struct prefix prefix;
        } N;
 
-       u_int32_t d_N;  /* d(N) Distance from this IS      */
-       u_int16_t depth;      /* The depth in the imaginary tree */
-       struct list *Adj_N;   /* {Adj(N)} next hop or neighbor list */
-       struct list *parents; /* list of parents for ECMP */
+       u_int32_t d_N;         /* d(N) Distance from this IS      */
+       u_int16_t depth;       /* The depth in the imaginary tree */
+       struct list *Adj_N;    /* {Adj(N)} next hop or neighbor list */
+       struct list *parents;  /* list of parents for ECMP */
        uint64_t insert_counter;
 };
 
@@ -276,12 +276,11 @@ static void isis_vertex_queue_delete(struct isis_vertex_queue *queue,
 struct isis_spftree {
        struct isis_vertex_queue paths; /* the SPT */
        struct isis_vertex_queue tents; /* TENT */
-       struct isis_area *area;         /* back pointer to area */
-       unsigned int runcount;          /* number of runs since uptime */
-       time_t last_run_timestamp;      /* last run timestamp as wall time for
-                                          display */
-       time_t last_run_monotime; /* last run as monotime for scheduling */
-       time_t last_run_duration; /* last run duration in msec */
+       struct isis_area *area;    /* back pointer to area */
+       unsigned int runcount;     /* number of runs since uptime */
+       time_t last_run_timestamp; /* last run timestamp as wall time for display */
+       time_t last_run_monotime;  /* last run as monotime for scheduling */
+       time_t last_run_duration;  /* last run duration in msec */
 
        uint16_t mtid;
        int family;
@@ -335,12 +334,12 @@ static void remove_excess_adjs(struct list *adjs)
                if (comp < 0)
                        continue;
 
-               if (candidate->circuit->circuit_id > adj->circuit->circuit_id) {
+               if (candidate->circuit->idx > adj->circuit->idx) {
                        excess = node;
                        continue;
                }
 
-               if (candidate->circuit->circuit_id < adj->circuit->circuit_id)
+               if (candidate->circuit->idx < adj->circuit->idx)
                        continue;
 
                comp = memcmp(candidate->snpa, adj->snpa, ETH_ALEN);
@@ -831,10 +830,10 @@ static int isis_spf_process_lsp(struct isis_spftree *spftree,
                return ISIS_OK;
 
        /* RFC3787 section 4 SHOULD ignore overload bit in pseudo LSPs */
-       bool no_overload =
-               (pseudo_lsp || (spftree->mtid == ISIS_MT_IPV4_UNICAST
+       bool no_overload = (pseudo_lsp
+                           || (spftree->mtid == ISIS_MT_IPV4_UNICAST
                                && !ISIS_MASK_LSP_OL_BIT(lsp->hdr.lsp_bits))
-                || (mt_router_info && !mt_router_info->overload));
+                           || (mt_router_info && !mt_router_info->overload));
 
 lspfragloop:
        if (lsp->hdr.seqno == 0) {
@@ -1153,7 +1152,7 @@ static int isis_spf_preload_tent(struct isis_spftree *spftree,
                                root_sysid, parent);
                } else if (circuit->circ_type == CIRCUIT_T_P2P) {
                        adj = circuit->u.p2p.neighbor;
-                       if (!adj)
+                       if (!adj || adj->adj_state != ISIS_ADJ_UP)
                                continue;
                        if (!adj_has_mt(adj, spftree->mtid))
                                continue;
@@ -1430,8 +1429,7 @@ int isis_spf_schedule(struct isis_area *area, int level)
        /* wait configured min_spf_interval before doing the SPF */
        long timer;
        if (diff >= area->min_spf_interval[level - 1]) {
-               /* Last run is more than min interval ago, schedule immediate
-                * run */
+               /* Last run is more than min interval ago, schedule immediate run */
                timer = 0;
        } else {
                timer = area->min_spf_interval[level - 1] - diff;
@@ -1549,9 +1547,7 @@ DEFUN (show_isis_topology,
                                continue;
 
                        if (area->ip_circuits > 0 && area->spftree[level - 1]
-                           && isis_vertex_queue_count(
-                                      &area->spftree[level - 1]->paths)
-                                      > 0) {
+                           && isis_vertex_queue_count(&area->spftree[level - 1]->paths) > 0) {
                                vty_out(vty,
                                        "IS-IS paths to level-%d routers that speak IP\n",
                                        level);
@@ -1561,9 +1557,7 @@ DEFUN (show_isis_topology,
                                vty_out(vty, "\n");
                        }
                        if (area->ipv6_circuits > 0 && area->spftree6[level - 1]
-                           && isis_vertex_queue_count(
-                                      &area->spftree6[level - 1]->paths)
-                                      > 0) {
+                           && isis_vertex_queue_count(&area->spftree6[level - 1]->paths) > 0) {
                                vty_out(vty,
                                        "IS-IS paths to level-%d routers that speak IPv6\n",
                                        level);
index df0b8b62d648ec9e08d797ce5d5c6c74a99c6b8f..5de936a6ea9f3184be9135a103930e85c6143f8f 100644 (file)
@@ -549,7 +549,8 @@ void isis_link_params_update(struct isis_circuit *circuit,
                if ((SUBTLV_TYPE(mtc->rmt_ipaddr) == 0)
                    && (circuit->circ_type == CIRCUIT_T_P2P)) {
                        struct isis_adjacency *adj = circuit->u.p2p.neighbor;
-                       if (adj->ipv4_address_count) {
+                       if (adj && adj->adj_state == ISIS_ADJ_UP
+                           && adj->ipv4_address_count) {
                                set_circuitparams_rmt_ipaddr(
                                        mtc, adj->ipv4_addresses[0]);
                        }
@@ -805,8 +806,7 @@ static u_char print_subtlv_mm_delay(struct sbuf *buf, int indent,
        A = (u_int32_t)ntohl(tlv->low) & TE_EXT_ANORMAL;
        high = (u_int32_t)ntohl(tlv->high) & TE_EXT_MASK;
 
-       sbuf_push(buf, indent, "%s Min/Max Link Delay: %" PRIu32 " / %" PRIu32
-                              " (micro-sec)\n",
+       sbuf_push(buf, indent, "%s Min/Max Link Delay: %" PRIu32 " / %" PRIu32 " (micro-sec)\n",
                  A ? "Anomalous" : "Normal", low, high);
 
        return (SUBTLV_HDR_SIZE + SUBTLV_DEF_SIZE);
@@ -913,8 +913,8 @@ static u_char print_unknown_tlv(struct sbuf *buf, int indent,
 }
 
 /* Main Show function */
-void mpls_te_print_detail(struct sbuf *buf, int indent, uint8_t *subtlvs,
-                         uint8_t subtlv_len)
+void mpls_te_print_detail(struct sbuf *buf, int indent,
+                         uint8_t *subtlvs, uint8_t subtlv_len)
 {
        struct subtlv_header *tlvh = (struct subtlv_header *)subtlvs;
        uint16_t sum = 0;
@@ -922,8 +922,7 @@ void mpls_te_print_detail(struct sbuf *buf, int indent, uint8_t *subtlvs,
        for (; sum < subtlv_len; tlvh = SUBTLV_HDR_NEXT(tlvh)) {
                switch (tlvh->type) {
                case TE_SUBTLV_ADMIN_GRP:
-                       sum += print_subtlv_admin_grp(
-                               buf, indent,
+                       sum += print_subtlv_admin_grp(buf, indent,
                                (struct te_subtlv_admin_grp *)tlvh);
                        break;
                case TE_SUBTLV_LLRI:
@@ -931,31 +930,27 @@ void mpls_te_print_detail(struct sbuf *buf, int indent, uint8_t *subtlvs,
                                                 (struct te_subtlv_llri *)tlvh);
                        break;
                case TE_SUBTLV_LOCAL_IPADDR:
-                       sum += print_subtlv_local_ipaddr(
-                               buf, indent,
+                       sum += print_subtlv_local_ipaddr(buf, indent,
                                (struct te_subtlv_local_ipaddr *)tlvh);
                        break;
                case TE_SUBTLV_RMT_IPADDR:
-                       sum += print_subtlv_rmt_ipaddr(
-                               buf, indent,
+                       sum += print_subtlv_rmt_ipaddr(buf, indent,
                                (struct te_subtlv_rmt_ipaddr *)tlvh);
                        break;
                case TE_SUBTLV_MAX_BW:
-                       sum += print_subtlv_max_bw(
-                               buf, indent, (struct te_subtlv_max_bw *)tlvh);
+                       sum += print_subtlv_max_bw(buf, indent,
+                               (struct te_subtlv_max_bw *)tlvh);
                        break;
                case TE_SUBTLV_MAX_RSV_BW:
-                       sum += print_subtlv_max_rsv_bw(
-                               buf, indent,
+                       sum += print_subtlv_max_rsv_bw(buf, indent,
                                (struct te_subtlv_max_rsv_bw *)tlvh);
                        break;
                case TE_SUBTLV_UNRSV_BW:
-                       sum += print_subtlv_unrsv_bw(
-                               buf, indent, (struct te_subtlv_unrsv_bw *)tlvh);
+                       sum += print_subtlv_unrsv_bw(buf, indent,
+                               (struct te_subtlv_unrsv_bw *)tlvh);
                        break;
                case TE_SUBTLV_TE_METRIC:
-                       sum += print_subtlv_te_metric(
-                               buf, indent,
+                       sum += print_subtlv_te_metric(buf, indent,
                                (struct te_subtlv_te_metric *)tlvh);
                        break;
                case TE_SUBTLV_RAS:
@@ -967,33 +962,32 @@ void mpls_te_print_detail(struct sbuf *buf, int indent, uint8_t *subtlvs,
                                                (struct te_subtlv_rip *)tlvh);
                        break;
                case TE_SUBTLV_AV_DELAY:
-                       sum += print_subtlv_av_delay(
-                               buf, indent, (struct te_subtlv_av_delay *)tlvh);
+                       sum += print_subtlv_av_delay(buf, indent,
+                               (struct te_subtlv_av_delay *)tlvh);
                        break;
                case TE_SUBTLV_MM_DELAY:
-                       sum += print_subtlv_mm_delay(
-                               buf, indent, (struct te_subtlv_mm_delay *)tlvh);
+                       sum += print_subtlv_mm_delay(buf, indent,
+                               (struct te_subtlv_mm_delay *)tlvh);
                        break;
                case TE_SUBTLV_DELAY_VAR:
-                       sum += print_subtlv_delay_var(
-                               buf, indent,
+                       sum += print_subtlv_delay_var(buf, indent,
                                (struct te_subtlv_delay_var *)tlvh);
                        break;
                case TE_SUBTLV_PKT_LOSS:
-                       sum += print_subtlv_pkt_loss(
-                               buf, indent, (struct te_subtlv_pkt_loss *)tlvh);
+                       sum += print_subtlv_pkt_loss(buf, indent,
+                               (struct te_subtlv_pkt_loss *)tlvh);
                        break;
                case TE_SUBTLV_RES_BW:
-                       sum += print_subtlv_res_bw(
-                               buf, indent, (struct te_subtlv_res_bw *)tlvh);
+                       sum += print_subtlv_res_bw(buf, indent,
+                               (struct te_subtlv_res_bw *)tlvh);
                        break;
                case TE_SUBTLV_AVA_BW:
-                       sum += print_subtlv_ava_bw(
-                               buf, indent, (struct te_subtlv_ava_bw *)tlvh);
+                       sum += print_subtlv_ava_bw(buf, indent,
+                               (struct te_subtlv_ava_bw *)tlvh);
                        break;
                case TE_SUBTLV_USE_BW:
-                       sum += print_subtlv_use_bw(
-                               buf, indent, (struct te_subtlv_use_bw *)tlvh);
+                       sum += print_subtlv_use_bw(buf, indent,
+                               (struct te_subtlv_use_bw *)tlvh);
                        break;
                default:
                        sum += print_unknown_tlv(buf, indent, tlvh);
index 8e0fd74b730d37b07e1bb803c9929157e0358dd7..66a19e150fa35e7504f64ad2a8e0ad93e24c2604 100644 (file)
@@ -161,11 +161,9 @@ static int unpack_subtlv_ipv6_source_prefix(enum isis_tlv_context context,
        sbuf_push(log, indent, "Unpacking IPv6 Source Prefix Sub-TLV...\n");
 
        if (tlv_len < 1) {
-               sbuf_push(
-                       log, indent,
-                       "Not enough data left. (expected 1 or more bytes, got %" PRIu8
-                       ")\n",
-                       tlv_len);
+               sbuf_push(log, indent,
+                         "Not enough data left. (expected 1 or more bytes, got %" PRIu8 ")\n",
+                         tlv_len);
                return 1;
        }
 
@@ -625,11 +623,10 @@ static int unpack_item_extended_reach(uint16_t mtid, uint8_t len,
                  (mtid == ISIS_MT_IPV4_UNICAST) ? "extended" : "mt");
 
        if (len < 11) {
-               sbuf_push(
-                       log, indent,
-                       "Not enough data left. (expected 11 or more bytes, got %" PRIu8
-                       ")\n",
-                       len);
+               sbuf_push(log, indent,
+                         "Not enough data left. (expected 11 or more bytes, got %"
+                         PRIu8 ")\n",
+                         len);
                goto out;
        }
 
@@ -977,7 +974,8 @@ static void format_item_mt_router_info(uint16_t mtid, struct isis_item *i,
        struct isis_mt_router_info *info = (struct isis_mt_router_info *)i;
 
        sbuf_push(buf, indent, "MT Router Info: %s%s%s\n",
-                 isis_mtid2str(info->mtid), info->overload ? " Overload" : "",
+                 isis_mtid2str(info->mtid),
+                 info->overload ? " Overload" : "",
                  info->attached ? " Attached" : "");
 }
 
@@ -1126,8 +1124,8 @@ static void format_item_extended_ip_reach(uint16_t mtid, struct isis_item *i,
 
        sbuf_push(buf, indent, "%s IP Reachability: %s (Metric: %u)%s",
                  (mtid == ISIS_MT_IPV4_UNICAST) ? "Extended" : "MT",
-                 prefix2str(&r->prefix, prefixbuf, sizeof(prefixbuf)),
-                 r->metric, r->down ? " Down" : "");
+                 prefix2str(&r->prefix, prefixbuf, sizeof(prefixbuf)), r->metric,
+                 r->down ? " Down" : "");
        if (mtid != ISIS_MT_IPV4_UNICAST)
                sbuf_push(buf, 0, " %s", isis_mtid2str(mtid));
        sbuf_push(buf, 0, "\n");
@@ -1180,11 +1178,9 @@ static int unpack_item_extended_ip_reach(uint16_t mtid, uint8_t len,
 
        consume = 5;
        if (len < consume) {
-               sbuf_push(
-                       log, indent,
-                       "Not enough data left. (expected 5 or more bytes, got %" PRIu8
-                       ")\n",
-                       len);
+               sbuf_push(log, indent,
+                         "Not enough data left. (expected 5 or more bytes, got %" PRIu8 ")\n",
+                         len);
                goto out;
        }
 
@@ -1203,10 +1199,9 @@ static int unpack_item_extended_ip_reach(uint16_t mtid, uint8_t len,
 
        consume += PSIZE(rv->prefix.prefixlen);
        if (len < consume) {
-               sbuf_push(
-                       log, indent,
-                       "Expected %u bytes of prefix, but only %u bytes available.\n",
-                       PSIZE(rv->prefix.prefixlen), len - 5);
+               sbuf_push(log, indent,
+                         "Expected %u bytes of prefix, but only %u bytes available.\n",
+                         PSIZE(rv->prefix.prefixlen), len - 5);
                goto out;
        }
        stream_get(&rv->prefix.prefix.s_addr, s, PSIZE(rv->prefix.prefixlen));
@@ -1221,26 +1216,23 @@ static int unpack_item_extended_ip_reach(uint16_t mtid, uint8_t len,
        if (control & ISIS_EXTENDED_IP_REACH_SUBTLV) {
                consume += 1;
                if (len < consume) {
-                       sbuf_push(
-                               log, indent,
-                               "Expected 1 byte of subtlv len, but no more data present.\n");
+                       sbuf_push(log, indent,
+                                 "Expected 1 byte of subtlv len, but no more data present.\n");
                        goto out;
                }
                subtlv_len = stream_getc(s);
 
                if (!subtlv_len) {
-                       sbuf_push(
-                               log, indent + 2,
-                               "  WARNING: subtlv bit is set, but there are no subtlvs.\n");
+                       sbuf_push(log, indent + 2,
+                                 "  WARNING: subtlv bit is set, but there are no subtlvs.\n");
                }
                consume += subtlv_len;
                if (len < consume) {
-                       sbuf_push(
-                               log, indent,
-                               "Expected %" PRIu8
-                               " bytes of subtlvs, but only %u bytes available.\n",
-                               subtlv_len,
-                               len - 6 - PSIZE(rv->prefix.prefixlen));
+                       sbuf_push(log, indent,
+                                 "Expected %" PRIu8
+                                 " bytes of subtlvs, but only %u bytes available.\n",
+                                 subtlv_len,
+                                 len - 6 - PSIZE(rv->prefix.prefixlen));
                        goto out;
                }
                sbuf_push(log, indent, "Skipping %" PRIu8 " bytes of subvls",
@@ -1337,6 +1329,119 @@ static int unpack_tlv_dynamic_hostname(enum isis_tlv_context context,
        return 0;
 }
 
+/* Functions related to TLV 240 P2P Three-Way Adjacency */
+
+const char *isis_threeway_state_name(enum isis_threeway_state state)
+{
+       switch (state) {
+       case ISIS_THREEWAY_DOWN:
+               return "Down";
+       case ISIS_THREEWAY_INITIALIZING:
+               return "Initializing";
+       case ISIS_THREEWAY_UP:
+               return "Up";
+       default:
+               return "Invalid!";
+       }
+}
+
+static struct isis_threeway_adj *copy_tlv_threeway_adj(
+                               const struct isis_threeway_adj *threeway_adj)
+{
+       if (!threeway_adj)
+               return NULL;
+
+       struct isis_threeway_adj *rv = XMALLOC(MTYPE_ISIS_TLV, sizeof(*rv));
+       memcpy(rv, threeway_adj, sizeof(*rv));
+
+       return rv;
+}
+
+static void format_tlv_threeway_adj(const struct isis_threeway_adj *threeway_adj,
+                                    struct sbuf *buf, int indent)
+{
+       if (!threeway_adj)
+               return;
+
+       sbuf_push(buf, indent, "P2P Three-Way Adjacency:\n");
+       sbuf_push(buf, indent, "  State: %s (%d)\n",
+                 isis_threeway_state_name(threeway_adj->state),
+                 threeway_adj->state);
+       sbuf_push(buf, indent, "  Extended Local Circuit ID: %" PRIu32 "\n",
+                 threeway_adj->local_circuit_id);
+       if (!threeway_adj->neighbor_set)
+               return;
+
+       sbuf_push(buf, indent, "  Neighbor System ID: %s\n",
+                 isis_format_id(threeway_adj->neighbor_id, 6));
+       sbuf_push(buf, indent, "  Neighbor Extended Circuit ID: %" PRIu32 "\n",
+                 threeway_adj->neighbor_circuit_id);
+}
+
+static void free_tlv_threeway_adj(struct isis_threeway_adj *threeway_adj)
+{
+       XFREE(MTYPE_ISIS_TLV, threeway_adj);
+}
+
+static int pack_tlv_threeway_adj(const struct isis_threeway_adj *threeway_adj,
+                                 struct stream *s)
+{
+       if (!threeway_adj)
+               return 0;
+
+       uint8_t tlv_len = (threeway_adj->neighbor_set) ? 15 : 5;
+
+       if (STREAM_WRITEABLE(s) < (unsigned)(2 + tlv_len))
+               return 1;
+
+       stream_putc(s, ISIS_TLV_THREE_WAY_ADJ);
+       stream_putc(s, tlv_len);
+       stream_putc(s, threeway_adj->state);
+       stream_putl(s, threeway_adj->local_circuit_id);
+
+       if (threeway_adj->neighbor_set) {
+               stream_put(s, threeway_adj->neighbor_id, 6);
+               stream_putl(s, threeway_adj->neighbor_circuit_id);
+       }
+
+       return 0;
+}
+
+static int unpack_tlv_threeway_adj(enum isis_tlv_context context,
+                                      uint8_t tlv_type, uint8_t tlv_len,
+                                      struct stream *s, struct sbuf *log,
+                                      void *dest, int indent)
+{
+       struct isis_tlvs *tlvs = dest;
+
+       sbuf_push(log, indent, "Unpacking P2P Three-Way Adjacency TLV...\n");
+       if (tlv_len != 5 && tlv_len != 15) {
+               sbuf_push(log, indent, "WARNING: Unexepected TLV size\n");
+               stream_forward_getp(s, tlv_len);
+               return 0;
+       }
+
+       if (tlvs->threeway_adj) {
+               sbuf_push(log, indent,
+                         "WARNING: P2P Three-Way Adjacency TLV present multiple times.\n");
+               stream_forward_getp(s, tlv_len);
+               return 0;
+       }
+
+       tlvs->threeway_adj = XCALLOC(MTYPE_ISIS_TLV, sizeof(*tlvs->threeway_adj));
+
+       tlvs->threeway_adj->state = stream_getc(s);
+       tlvs->threeway_adj->local_circuit_id = stream_getl(s);
+
+       if (tlv_len == 15) {
+               tlvs->threeway_adj->neighbor_set = true;
+               stream_get(tlvs->threeway_adj->neighbor_id, s, 6);
+               tlvs->threeway_adj->neighbor_circuit_id = stream_getl(s);
+       }
+
+       return 0;
+}
+
 /* Functions related to TLVs 236/237 IPv6/MT-IPv6 reach */
 
 static struct isis_item *copy_item_ipv6_reach(struct isis_item *i)
@@ -1361,7 +1466,8 @@ static void format_item_ipv6_reach(uint16_t mtid, struct isis_item *i,
        sbuf_push(buf, indent, "%sIPv6 Reachability: %s (Metric: %u)%s%s",
                  (mtid == ISIS_MT_IPV4_UNICAST) ? "" : "MT ",
                  prefix2str(&r->prefix, prefixbuf, sizeof(prefixbuf)),
-                 r->metric, r->down ? " Down" : "",
+                 r->metric,
+                 r->down ? " Down" : "",
                  r->external ? " External" : "");
        if (mtid != ISIS_MT_IPV4_UNICAST)
                sbuf_push(buf, 0, " %s", isis_mtid2str(mtid));
@@ -1426,11 +1532,10 @@ static int unpack_item_ipv6_reach(uint16_t mtid, uint8_t len, struct stream *s,
                  (mtid == ISIS_MT_IPV4_UNICAST) ? "" : "mt ");
        consume = 6;
        if (len < consume) {
-               sbuf_push(
-                       log, indent,
-                       "Not enough data left. (expected 6 or more bytes, got %" PRIu8
-                       ")\n",
-                       len);
+               sbuf_push(log, indent,
+                         "Not enough data left. (expected 6 or more bytes, got %"
+                         PRIu8 ")\n",
+                         len);
                goto out;
        }
 
@@ -1451,10 +1556,9 @@ static int unpack_item_ipv6_reach(uint16_t mtid, uint8_t len, struct stream *s,
 
        consume += PSIZE(rv->prefix.prefixlen);
        if (len < consume) {
-               sbuf_push(
-                       log, indent,
-                       "Expected %u bytes of prefix, but only %u bytes available.\n",
-                       PSIZE(rv->prefix.prefixlen), len - 6);
+               sbuf_push(log, indent,
+                         "Expected %u bytes of prefix, but only %u bytes available.\n",
+                         PSIZE(rv->prefix.prefixlen), len - 6);
                goto out;
        }
        stream_get(&rv->prefix.prefix.s6_addr, s, PSIZE(rv->prefix.prefixlen));
@@ -1468,26 +1572,23 @@ static int unpack_item_ipv6_reach(uint16_t mtid, uint8_t len, struct stream *s,
        if (control & ISIS_IPV6_REACH_SUBTLV) {
                consume += 1;
                if (len < consume) {
-                       sbuf_push(
-                               log, indent,
-                               "Expected 1 byte of subtlv len, but no more data persent.\n");
+                       sbuf_push(log, indent,
+                                 "Expected 1 byte of subtlv len, but no more data persent.\n");
                        goto out;
                }
                subtlv_len = stream_getc(s);
 
                if (!subtlv_len) {
-                       sbuf_push(
-                               log, indent + 2,
-                               "  WARNING: subtlv bit set, but there are no subtlvs.\n");
+                       sbuf_push(log, indent + 2,
+                                 "  WARNING: subtlv bit set, but there are no subtlvs.\n");
                }
                consume += subtlv_len;
                if (len < consume) {
-                       sbuf_push(
-                               log, indent,
-                               "Expected %" PRIu8
-                               " bytes of subtlvs, but only %u bytes available.\n",
-                               subtlv_len,
-                               len - 6 - PSIZE(rv->prefix.prefixlen));
+                       sbuf_push(log, indent,
+                                 "Expected %" PRIu8
+                                 " bytes of subtlvs, but only %u bytes available.\n",
+                                 subtlv_len,
+                                 len - 6 - PSIZE(rv->prefix.prefixlen));
                        goto out;
                }
 
@@ -1710,19 +1811,16 @@ static int pack_item(enum isis_tlv_context context, enum isis_tlv_type type,
        return 1;
 }
 
-static void add_item_to_fragment(struct isis_item *i,
-                                struct pack_order_entry *pe,
+static void add_item_to_fragment(struct isis_item *i, struct pack_order_entry *pe,
                                 struct isis_tlvs *fragment_tlvs, uint16_t mtid)
 {
        struct isis_item_list *l;
 
        if (pe->how_to_pack == ISIS_ITEMS) {
-               l = (struct isis_item_list *)(((char *)fragment_tlvs)
-                                             + pe->what_to_pack);
+               l = (struct isis_item_list *)(((char *)fragment_tlvs) + pe->what_to_pack);
        } else {
                struct isis_mt_item_list *m;
-               m = (struct isis_mt_item_list *)(((char *)fragment_tlvs)
-                                                + pe->what_to_pack);
+               m = (struct isis_mt_item_list *)(((char *)fragment_tlvs) + pe->what_to_pack);
                l = isis_get_mt_items(m, mtid);
        }
 
@@ -2082,6 +2180,8 @@ struct isis_tlvs *isis_copy_tlvs(struct isis_tlvs *tlvs)
        copy_mt_items(ISIS_CONTEXT_LSP, ISIS_TLV_MT_IPV6_REACH,
                      &tlvs->mt_ipv6_reach, &rv->mt_ipv6_reach);
 
+       rv->threeway_adj = copy_tlv_threeway_adj(tlvs->threeway_adj);
+
        return rv;
 }
 
@@ -2143,6 +2243,8 @@ static void format_tlvs(struct isis_tlvs *tlvs, struct sbuf *buf, int indent)
 
        format_mt_items(ISIS_CONTEXT_LSP, ISIS_TLV_MT_IPV6_REACH,
                        &tlvs->mt_ipv6_reach, buf, indent);
+
+       format_tlv_threeway_adj(tlvs->threeway_adj, buf, indent);
 }
 
 const char *isis_format_tlvs(struct isis_tlvs *tlvs)
@@ -2193,6 +2295,7 @@ void isis_free_tlvs(struct isis_tlvs *tlvs)
        free_items(ISIS_CONTEXT_LSP, ISIS_TLV_IPV6_REACH, &tlvs->ipv6_reach);
        free_mt_items(ISIS_CONTEXT_LSP, ISIS_TLV_MT_IPV6_REACH,
                      &tlvs->mt_ipv6_reach);
+       free_tlv_threeway_adj(tlvs->threeway_adj);
 
        XFREE(MTYPE_ISIS_TLV, tlvs);
 }
@@ -2364,6 +2467,14 @@ static int pack_tlvs(struct isis_tlvs *tlvs, struct stream *stream,
                        copy_tlv_te_router_id(tlvs->te_router_id);
        }
 
+       rv = pack_tlv_threeway_adj(tlvs->threeway_adj, stream);
+       if (rv)
+               return rv;
+       if (fragment_tlvs) {
+               fragment_tlvs->threeway_adj =
+                       copy_tlv_threeway_adj(tlvs->threeway_adj);
+       }
+
        for (size_t pack_idx = 0; pack_idx < array_size(pack_order);
             pack_idx++) {
                rv = handle_pack_entry(&pack_order[pack_idx], tlvs, stream,
@@ -2459,11 +2570,9 @@ static int unpack_tlv(enum isis_tlv_context context, size_t avail_len,
                  tlv_type, tlv_len);
 
        if (avail_len < ((size_t)tlv_len) + 2) {
-               sbuf_push(
-                       log, indent + 2,
-                       "Available data %zu too short for claimed TLV len %" PRIu8
-                       ".\n",
-                       avail_len - 2, tlv_len);
+               sbuf_push(log, indent + 2,
+                         "Available data %zu too short for claimed TLV len %" PRIu8 ".\n",
+                         avail_len - 2, tlv_len);
                return 1;
        }
 
@@ -2541,7 +2650,7 @@ int isis_unpack_tlvs(size_t avail_len, struct stream *stream,
        static const struct tlv_ops tlv_##_name_##_ops = {                     \
                .name = _desc_,                                                \
                .unpack = unpack_tlv_with_items,                               \
-                                                                               \
+                                                                              \
                .pack_item = pack_item_##_name_,                               \
                .free_item = free_item_##_name_,                               \
                .unpack_item = unpack_item_##_name_,                           \
@@ -2566,54 +2675,41 @@ TLV_OPS(te_router_id, "TLV 134 TE Router ID");
 ITEM_TLV_OPS(extended_ip_reach, "TLV 135 Extended IP Reachability");
 TLV_OPS(dynamic_hostname, "TLV 137 Dynamic Hostname");
 ITEM_TLV_OPS(mt_router_info, "TLV 229 MT Router Information");
+TLV_OPS(threeway_adj, "TLV 240 P2P Three-Way Adjacency");
 ITEM_TLV_OPS(ipv6_address, "TLV 232 IPv6 Interface Address");
 ITEM_TLV_OPS(ipv6_reach, "TLV 236 IPv6 Reachability");
 
 SUBTLV_OPS(ipv6_source_prefix, "Sub-TLV 22 IPv6 Source Prefix");
 
-static const struct tlv_ops *tlv_table[ISIS_CONTEXT_MAX][ISIS_TLV_MAX] =
-       {[ISIS_CONTEXT_LSP] =
-                {
-                                [ISIS_TLV_AREA_ADDRESSES] =
-                                        &tlv_area_address_ops,
-                                [ISIS_TLV_OLDSTYLE_REACH] =
-                                        &tlv_oldstyle_reach_ops,
-                                [ISIS_TLV_LAN_NEIGHBORS] =
-                                        &tlv_lan_neighbor_ops,
-                                [ISIS_TLV_LSP_ENTRY] = &tlv_lsp_entry_ops,
-                                [ISIS_TLV_AUTH] = &tlv_auth_ops,
-                                [ISIS_TLV_EXTENDED_REACH] =
-                                        &tlv_extended_reach_ops,
-                                [ISIS_TLV_MT_REACH] = &tlv_extended_reach_ops,
-                                [ISIS_TLV_OLDSTYLE_IP_REACH] =
-                                        &tlv_oldstyle_ip_reach_ops,
-                                [ISIS_TLV_PROTOCOLS_SUPPORTED] =
-                                        &tlv_protocols_supported_ops,
-                                [ISIS_TLV_OLDSTYLE_IP_REACH_EXT] =
-                                        &tlv_oldstyle_ip_reach_ops,
-                                [ISIS_TLV_IPV4_ADDRESS] =
-                                        &tlv_ipv4_address_ops,
-                                [ISIS_TLV_TE_ROUTER_ID] =
-                                        &tlv_te_router_id_ops,
-                                [ISIS_TLV_EXTENDED_IP_REACH] =
-                                        &tlv_extended_ip_reach_ops,
-                                [ISIS_TLV_MT_IP_REACH] =
-                                        &tlv_extended_ip_reach_ops,
-                                [ISIS_TLV_DYNAMIC_HOSTNAME] =
-                                        &tlv_dynamic_hostname_ops,
-                                [ISIS_TLV_MT_ROUTER_INFO] =
-                                        &tlv_mt_router_info_ops,
-                                [ISIS_TLV_IPV6_ADDRESS] =
-                                        &tlv_ipv6_address_ops,
-                                [ISIS_TLV_IPV6_REACH] = &tlv_ipv6_reach_ops,
-                                [ISIS_TLV_MT_IPV6_REACH] = &tlv_ipv6_reach_ops,
-                },
-        [ISIS_CONTEXT_SUBTLV_NE_REACH] = {},
-        [ISIS_CONTEXT_SUBTLV_IP_REACH] = {},
-        [ISIS_CONTEXT_SUBTLV_IPV6_REACH] = {
-                        [ISIS_SUBTLV_IPV6_SOURCE_PREFIX] =
-                                &subtlv_ipv6_source_prefix_ops,
-        }};
+static const struct tlv_ops *tlv_table[ISIS_CONTEXT_MAX][ISIS_TLV_MAX] = {
+       [ISIS_CONTEXT_LSP] = {
+               [ISIS_TLV_AREA_ADDRESSES] = &tlv_area_address_ops,
+               [ISIS_TLV_OLDSTYLE_REACH] = &tlv_oldstyle_reach_ops,
+               [ISIS_TLV_LAN_NEIGHBORS] = &tlv_lan_neighbor_ops,
+               [ISIS_TLV_LSP_ENTRY] = &tlv_lsp_entry_ops,
+               [ISIS_TLV_AUTH] = &tlv_auth_ops,
+               [ISIS_TLV_EXTENDED_REACH] = &tlv_extended_reach_ops,
+               [ISIS_TLV_MT_REACH] = &tlv_extended_reach_ops,
+               [ISIS_TLV_OLDSTYLE_IP_REACH] = &tlv_oldstyle_ip_reach_ops,
+               [ISIS_TLV_PROTOCOLS_SUPPORTED] = &tlv_protocols_supported_ops,
+               [ISIS_TLV_OLDSTYLE_IP_REACH_EXT] = &tlv_oldstyle_ip_reach_ops,
+               [ISIS_TLV_IPV4_ADDRESS] = &tlv_ipv4_address_ops,
+               [ISIS_TLV_TE_ROUTER_ID] = &tlv_te_router_id_ops,
+               [ISIS_TLV_EXTENDED_IP_REACH] = &tlv_extended_ip_reach_ops,
+               [ISIS_TLV_MT_IP_REACH] = &tlv_extended_ip_reach_ops,
+               [ISIS_TLV_DYNAMIC_HOSTNAME] = &tlv_dynamic_hostname_ops,
+               [ISIS_TLV_MT_ROUTER_INFO] = &tlv_mt_router_info_ops,
+               [ISIS_TLV_THREE_WAY_ADJ] = &tlv_threeway_adj_ops,
+               [ISIS_TLV_IPV6_ADDRESS] = &tlv_ipv6_address_ops,
+               [ISIS_TLV_IPV6_REACH] = &tlv_ipv6_reach_ops,
+               [ISIS_TLV_MT_IPV6_REACH] = &tlv_ipv6_reach_ops,
+       },
+       [ISIS_CONTEXT_SUBTLV_NE_REACH] = {},
+       [ISIS_CONTEXT_SUBTLV_IP_REACH] = {},
+       [ISIS_CONTEXT_SUBTLV_IPV6_REACH] = {
+               [ISIS_SUBTLV_IPV6_SOURCE_PREFIX] = &subtlv_ipv6_source_prefix_ops,
+       }
+};
 
 /* Accessor functions */
 
@@ -3104,6 +3200,25 @@ void isis_tlvs_add_extended_reach(struct isis_tlvs *tlvs, uint16_t mtid,
        append_item(l, (struct isis_item *)r);
 }
 
+void isis_tlvs_add_threeway_adj(struct isis_tlvs *tlvs,
+                               enum isis_threeway_state state,
+                               uint32_t local_circuit_id,
+                               const uint8_t *neighbor_id,
+                               uint32_t neighbor_circuit_id)
+{
+       assert(!tlvs->threeway_adj);
+
+       tlvs->threeway_adj = XCALLOC(MTYPE_ISIS_TLV, sizeof(*tlvs->threeway_adj));
+       tlvs->threeway_adj->state = state;
+       tlvs->threeway_adj->local_circuit_id = local_circuit_id;
+
+       if (neighbor_id) {
+               tlvs->threeway_adj->neighbor_set = true;
+               memcpy(tlvs->threeway_adj->neighbor_id, neighbor_id, 6);
+               tlvs->threeway_adj->neighbor_circuit_id = neighbor_circuit_id;
+       }
+}
+
 struct isis_mt_router_info *
 isis_tlvs_lookup_mt_router_info(struct isis_tlvs *tlvs, uint16_t mtid)
 {
index 6ade0af28c05dca80ddf00c17f6fece6ab8f056a..98edbf14e7dc0233c7511d1fd1c217f985665619 100644 (file)
@@ -103,6 +103,20 @@ struct isis_protocols_supported {
        uint8_t *protocols;
 };
 
+enum isis_threeway_state {
+       ISIS_THREEWAY_DOWN = 2,
+       ISIS_THREEWAY_INITIALIZING = 1,
+       ISIS_THREEWAY_UP = 0
+};
+
+struct isis_threeway_adj {
+       enum isis_threeway_state state;
+       uint32_t local_circuit_id;
+       bool neighbor_set;
+       uint8_t neighbor_id[6];
+       uint32_t neighbor_circuit_id;
+};
+
 struct isis_item;
 struct isis_item {
        struct isis_item *next;
@@ -190,6 +204,7 @@ struct isis_tlvs {
        char *hostname;
        struct isis_item_list ipv6_reach;
        struct isis_mt_item_list mt_ipv6_reach;
+       struct isis_threeway_adj *threeway_adj;
 };
 
 struct isis_subtlvs {
@@ -227,6 +242,7 @@ enum isis_tlv_type {
        ISIS_TLV_MT_IP_REACH = 235,
        ISIS_TLV_IPV6_REACH = 236,
        ISIS_TLV_MT_IPV6_REACH = 237,
+       ISIS_TLV_THREE_WAY_ADJ = 240,
        ISIS_TLV_MAX = 256,
 
        ISIS_SUBTLV_IPV6_SOURCE_PREFIX = 22
@@ -303,6 +319,14 @@ void isis_tlvs_add_extended_reach(struct isis_tlvs *tlvs, uint16_t mtid,
                                  uint8_t *id, uint32_t metric,
                                  uint8_t *subtlvs, uint8_t subtlv_len);
 
+const char *isis_threeway_state_name(enum isis_threeway_state state);
+
+void isis_tlvs_add_threeway_adj(struct isis_tlvs *tlvs,
+                               enum isis_threeway_state state,
+                               uint32_t local_circuit_id,
+                               const uint8_t *neighbor_id,
+                               uint32_t neighbor_circuit_id);
+
 struct isis_mt_router_info *
 isis_tlvs_lookup_mt_router_info(struct isis_tlvs *tlvs, uint16_t mtid);
 #endif
index 02e28a73fe392496809610f4a1dd1c9a73e0ce14..66d79b2e9f028e2c4b1126d47f3409b707664f4f 100644 (file)
@@ -927,6 +927,21 @@ DEFUN (no_isis_hello_padding,
        return CMD_SUCCESS;
 }
 
+DEFUN (isis_threeway_adj,
+       isis_threeway_adj_cmd,
+       "[no] isis three-way-handshake",
+       NO_STR
+       "IS-IS commands\n"
+       "Enable/Disable three-way handshake\n")
+{
+       struct isis_circuit *circuit = isis_circuit_lookup(vty);
+       if (!circuit)
+               return CMD_ERR_NO_MATCH;
+
+       circuit->disable_threeway_adj = !strcmp(argv[0]->text, "no");
+       return CMD_SUCCESS;
+}
+
 DEFUN (csnp_interval,
        csnp_interval_cmd,
        "isis csnp-interval (1-600)",
@@ -2085,6 +2100,8 @@ void isis_vty_init(void)
        install_element(INTERFACE_NODE, &isis_hello_padding_cmd);
        install_element(INTERFACE_NODE, &no_isis_hello_padding_cmd);
 
+       install_element(INTERFACE_NODE, &isis_threeway_adj_cmd);
+
        install_element(INTERFACE_NODE, &csnp_interval_cmd);
        install_element(INTERFACE_NODE, &no_csnp_interval_cmd);
        install_element(INTERFACE_NODE, &csnp_interval_l1_cmd);
index a8dcc8adaf97d9c82ccafc58474135f43d98d2c9..85d3974fa620d92bffe97d3f476b989cca9f7cb6 100644 (file)
@@ -52,9 +52,8 @@ struct isis {
        struct area_addr *man_area_addrs; /* manualAreaAddresses */
        u_int32_t debugs;                 /* bitmap for debug */
        time_t uptime;                    /* when did we start */
-       struct thread *t_dync_clean; /* dynamic hostname cache cleanup thread */
-       uint32_t circuit_ids_used
-               [8]; /* 256 bits to track circuit ids 0 through 255 */
+       struct thread *t_dync_clean;      /* dynamic hostname cache cleanup thread */
+       uint32_t circuit_ids_used[8];     /* 256 bits to track circuit ids 1 through 255 */
 
        struct route_table *ext_info[REDIST_PROTOCOL_COUNT];
 
index eee96c636f52d748ea64fdb195f8a86a006033a1..a2f4b51698ba10405f6d56e3bb5e5919b8bf9e37 100644 (file)
@@ -15,4 +15,3 @@ TAGS
 .arch-ids
 *~
 *.loT
-ldp_vty_cmds_clippy.c
index 94f401ebe6afe208235b6fec8cb1565acb1d66bc..072146dbd54877508bf76f6fa568a0ec95f7ea4a 100644 (file)
@@ -24,4 +24,3 @@ refix
 grammar_sandbox
 clippy
 defun_lex.c
-plist_clippy.c
index 6d04ad83c03f7fa65cea14ae25281469511c969b..5697c1d812b01d6baff6b181c8cafab7c9d4489a 100644 (file)
@@ -65,6 +65,7 @@ const char *node_names[] = {
        "logical-router",          // LOGICALROUTER_NODE,
        "vrf",                      // VRF_NODE,
        "interface",                // INTERFACE_NODE,
+       "nexthop-group",            // NH_GROUP_NODE,
        "zebra",                    // ZEBRA_NODE,
        "table",                    // TABLE_NODE,
        "rip",                      // RIP_NODE,
@@ -1294,6 +1295,7 @@ void cmd_exit(struct vty *vty)
        case PW_NODE:
        case LOGICALROUTER_NODE:
        case VRF_NODE:
+       case NH_GROUP_NODE:
        case ZEBRA_NODE:
        case BGP_NODE:
        case RIP_NODE:
@@ -1379,6 +1381,7 @@ DEFUN (config_end,
        case PW_NODE:
        case LOGICALROUTER_NODE:
        case VRF_NODE:
+       case NH_GROUP_NODE:
        case ZEBRA_NODE:
        case RIP_NODE:
        case RIPNG_NODE:
index 56e70abf6f256845eb75cb916f7772361f351381..95d8ee99dfa1cc1e9a7b7c4f6b561352fe60eee6 100644 (file)
@@ -73,72 +73,73 @@ struct host {
 
 /* List of CLI nodes. Please remember to update the name array in command.c. */
 enum node_type {
-       AUTH_NODE,              /* Authentication mode of vty interface. */
-       VIEW_NODE,              /* View node. Default mode of vty interface. */
-       AUTH_ENABLE_NODE,       /* Authentication mode for change enable. */
-       ENABLE_NODE,            /* Enable node. */
-       CONFIG_NODE,            /* Config node. Default mode of config file. */
-       SERVICE_NODE,           /* Service node. */
-       DEBUG_NODE,             /* Debug node. */
-       VRF_DEBUG_NODE,         /* Vrf Debug node. */
-       DEBUG_VNC_NODE,         /* Debug VNC node. */
-       AAA_NODE,               /* AAA node. */
-       KEYCHAIN_NODE,          /* Key-chain node. */
-       KEYCHAIN_KEY_NODE,      /* Key-chain key node. */
-       LOGICALROUTER_NODE,     /* Logical-Router node. */
-       VRF_NODE,               /* VRF mode node. */
-       INTERFACE_NODE,         /* Interface mode node. */
-       ZEBRA_NODE,             /* zebra connection node. */
-       TABLE_NODE,             /* rtm_table selection node. */
-       RIP_NODE,               /* RIP protocol mode node. */
-       RIPNG_NODE,             /* RIPng protocol mode node. */
-       BABEL_NODE,             /* BABEL protocol mode node. */
-       EIGRP_NODE,             /* EIGRP protocol mode node. */
-       BGP_NODE,               /* BGP protocol mode which includes BGP4+ */
-       BGP_VPNV4_NODE,         /* BGP MPLS-VPN PE exchange. */
-       BGP_VPNV6_NODE,         /* BGP MPLS-VPN PE exchange. */
-       BGP_IPV4_NODE,          /* BGP IPv4 unicast address family.  */
-       BGP_IPV4M_NODE,         /* BGP IPv4 multicast address family.  */
-       BGP_IPV4L_NODE,         /* BGP IPv4 labeled unicast address family.  */
-       BGP_IPV6_NODE,          /* BGP IPv6 address family */
-       BGP_IPV6M_NODE,         /* BGP IPv6 multicast address family. */
-       BGP_IPV6L_NODE,         /* BGP IPv6 labeled unicast address family. */
-       BGP_VRF_POLICY_NODE,    /* BGP VRF policy */
-       BGP_VNC_DEFAULTS_NODE,  /* BGP VNC nve defaults */
-       BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */
-       BGP_VNC_L2_GROUP_NODE,  /* BGP VNC L2 group */
-       RFP_DEFAULTS_NODE,      /* RFP defaults node */
-       BGP_EVPN_NODE,          /* BGP EVPN node. */
-       OSPF_NODE,              /* OSPF protocol mode */
-       OSPF6_NODE,             /* OSPF protocol for IPv6 mode */
-       LDP_NODE,               /* LDP protocol mode */
-       LDP_IPV4_NODE,          /* LDP IPv4 address family */
-       LDP_IPV6_NODE,          /* LDP IPv6 address family */
-       LDP_IPV4_IFACE_NODE,    /* LDP IPv4 Interface */
-       LDP_IPV6_IFACE_NODE,    /* LDP IPv6 Interface */
-       LDP_L2VPN_NODE,         /* LDP L2VPN node */
-       LDP_PSEUDOWIRE_NODE,    /* LDP Pseudowire node */
-       ISIS_NODE,              /* ISIS protocol mode */
-       MASC_NODE,              /* MASC for multicast.  */
-       IRDP_NODE,              /* ICMP Router Discovery Protocol mode. */
-       IP_NODE,                /* Static ip route node. */
-       ACCESS_NODE,            /* Access list node. */
-       PREFIX_NODE,            /* Prefix list node. */
-       ACCESS_IPV6_NODE,       /* Access list node. */
-       ACCESS_MAC_NODE,        /* MAC access list node*/
-       PREFIX_IPV6_NODE,       /* Prefix list node. */
-       AS_LIST_NODE,           /* AS list node. */
-       COMMUNITY_LIST_NODE,    /* Community list node. */
-       RMAP_NODE,              /* Route map node. */
-       SMUX_NODE,              /* SNMP configuration node. */
-       DUMP_NODE,              /* Packet dump node. */
-       FORWARDING_NODE,        /* IP forwarding node. */
-       PROTOCOL_NODE,          /* protocol filtering node */
-       MPLS_NODE,              /* MPLS config node */
-       PW_NODE,                /* Pseudowire config node */
-       VTY_NODE,               /* Vty node. */
-       LINK_PARAMS_NODE,       /* Link-parameters node */
-       BGP_EVPN_VNI_NODE,      /* BGP EVPN VNI */
+       AUTH_NODE,               /* Authentication mode of vty interface. */
+       VIEW_NODE,               /* View node. Default mode of vty interface. */
+       AUTH_ENABLE_NODE,       /* Authentication mode for change enable. */
+       ENABLE_NODE,             /* Enable node. */
+       CONFIG_NODE,             /* Config node. Default mode of config file. */
+       SERVICE_NODE,            /* Service node. */
+       DEBUG_NODE,              /* Debug node. */
+       VRF_DEBUG_NODE,          /* Vrf Debug node. */
+       DEBUG_VNC_NODE,          /* Debug VNC node. */
+       AAA_NODE,                /* AAA node. */
+       KEYCHAIN_NODE,           /* Key-chain node. */
+       KEYCHAIN_KEY_NODE,       /* Key-chain key node. */
+       LOGICALROUTER_NODE,      /* Logical-Router node. */
+       VRF_NODE,                /* VRF mode node. */
+       INTERFACE_NODE,          /* Interface mode node. */
+       NH_GROUP_NODE,           /* Nexthop-Group mode node. */
+       ZEBRA_NODE,              /* zebra connection node. */
+       TABLE_NODE,              /* rtm_table selection node. */
+       RIP_NODE,                /* RIP protocol mode node. */
+       RIPNG_NODE,              /* RIPng protocol mode node. */
+       BABEL_NODE,              /* BABEL protocol mode node. */
+       EIGRP_NODE,              /* EIGRP protocol mode node. */
+       BGP_NODE,                /* BGP protocol mode which includes BGP4+ */
+       BGP_VPNV4_NODE,          /* BGP MPLS-VPN PE exchange. */
+       BGP_VPNV6_NODE,          /* BGP MPLS-VPN PE exchange. */
+       BGP_IPV4_NODE,           /* BGP IPv4 unicast address family.  */
+       BGP_IPV4M_NODE,          /* BGP IPv4 multicast address family.  */
+       BGP_IPV4L_NODE,          /* BGP IPv4 labeled unicast address family.  */
+       BGP_IPV6_NODE,           /* BGP IPv6 address family */
+       BGP_IPV6M_NODE,          /* BGP IPv6 multicast address family. */
+       BGP_IPV6L_NODE,          /* BGP IPv6 labeled unicast address family. */
+       BGP_VRF_POLICY_NODE,     /* BGP VRF policy */
+       BGP_VNC_DEFAULTS_NODE,   /* BGP VNC nve defaults */
+       BGP_VNC_NVE_GROUP_NODE,  /* BGP VNC nve group */
+       BGP_VNC_L2_GROUP_NODE,   /* BGP VNC L2 group */
+       RFP_DEFAULTS_NODE,       /* RFP defaults node */
+       BGP_EVPN_NODE,           /* BGP EVPN node. */
+       OSPF_NODE,               /* OSPF protocol mode */
+       OSPF6_NODE,              /* OSPF protocol for IPv6 mode */
+       LDP_NODE,                /* LDP protocol mode */
+       LDP_IPV4_NODE,           /* LDP IPv4 address family */
+       LDP_IPV6_NODE,           /* LDP IPv6 address family */
+       LDP_IPV4_IFACE_NODE,     /* LDP IPv4 Interface */
+       LDP_IPV6_IFACE_NODE,     /* LDP IPv6 Interface */
+       LDP_L2VPN_NODE,          /* LDP L2VPN node */
+       LDP_PSEUDOWIRE_NODE,     /* LDP Pseudowire node */
+       ISIS_NODE,               /* ISIS protocol mode */
+       MASC_NODE,               /* MASC for multicast.  */
+       IRDP_NODE,               /* ICMP Router Discovery Protocol mode. */
+       IP_NODE,                 /* Static ip route node. */
+       ACCESS_NODE,             /* Access list node. */
+       PREFIX_NODE,             /* Prefix list node. */
+       ACCESS_IPV6_NODE,       /* Access list node. */
+       ACCESS_MAC_NODE,         /* MAC access list node*/
+       PREFIX_IPV6_NODE,       /* Prefix list node. */
+       AS_LIST_NODE,            /* AS list node. */
+       COMMUNITY_LIST_NODE,     /* Community list node. */
+       RMAP_NODE,               /* Route map node. */
+       SMUX_NODE,               /* SNMP configuration node. */
+       DUMP_NODE,               /* Packet dump node. */
+       FORWARDING_NODE,         /* IP forwarding node. */
+       PROTOCOL_NODE,           /* protocol filtering node */
+       MPLS_NODE,               /* MPLS config node */
+       PW_NODE,                 /* Pseudowire config node */
+       VTY_NODE,                /* Vty node. */
+       LINK_PARAMS_NODE,       /* Link-parameters node */
+       BGP_EVPN_VNI_NODE,       /* BGP EVPN VNI */
        RPKI_NODE,     /* RPKI node for configuration of RPKI cache server
                          connections.*/
        NODE_TYPE_MAX, /* maximum */
diff --git a/lib/debug.c b/lib/debug.c
new file mode 100644 (file)
index 0000000..0bacf97
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Debugging utilities.
+ * Copyright (C) 2018  Cumulus Networks, Inc.
+ * Quentin Young
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include <zebra.h>
+#include "debug.h"
+#include "command.h"
+
+static const struct debug_callbacks *callbacks;
+
+/* All code in this section should be reentrant and MT-safe */
+
+DEFUN_NOSH(debug_all, debug_all_cmd, "[no] debug all",
+          NO_STR DEBUG_STR "Toggle all debugging output\n")
+{
+       bool set = strmatch(argv[0]->text, "no");
+       uint32_t mode = DEBUG_NODE2MODE(vty->node);
+
+       if (callbacks->debug_set_all)
+               callbacks->debug_set_all(mode, set);
+       return CMD_SUCCESS;
+}
+
+/* ------------------------------------------------------------------------- */
+
+void debug_init(const struct debug_callbacks *cb)
+{
+       callbacks = cb;
+       install_element(ENABLE_NODE, &debug_all_cmd);
+       install_element(CONFIG_NODE, &debug_all_cmd);
+}
diff --git a/lib/debug.h b/lib/debug.h
new file mode 100644 (file)
index 0000000..d0fa27d
--- /dev/null
@@ -0,0 +1,234 @@
+/*
+ * Debugging utilities.
+ * Copyright (C) 2018  Cumulus Networks, Inc.
+ * Quentin Young
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef _FRRDEBUG_H
+#define _FRRDEBUG_H
+
+#include <zebra.h>
+#include "command.h"
+#include "frratomic.h"
+
+/*
+ * Debugging modes.
+ *
+ * FRR's convention is that a debug statement issued under the vty CONFIG_NODE
+ * persists to the config file, whereas the same debug statement issued from
+ * the ENABLE_NODE only persists for the current session. These are mapped to
+ * DEBUG_MODE_CONF and DEBUG_MODE_TERM respectively.
+ *
+ * They are not mutually exclusive and are placed in the MSB of the flags
+ * field in a debugging record.
+ */
+#define DEBUG_MODE_TERM 0x01000000
+#define DEBUG_MODE_CONF 0x02000000
+#define DEBUG_MODE_ALL (DEBUG_MODE_TERM | DEBUG_MODE_CONF)
+#define DEBUG_MODE_NONE 0x00000000
+#define DEBUG_OPT_ALL 0x00FFFFFF
+#define DEBUG_OPT_NONE 0x00000000
+
+
+/*
+ * Debugging record.
+ *
+ * All operations on this record exposed in this header are MT-safe.
+ *
+ * flags
+ *    A bitfield with the following format (bytes high to low)
+ *    - [0] Debugging mode field (MSB)  | Mode
+ *    - [1] Arbitrary flag field        | Option
+ *    - [2] Arbitrary flag field        | Option
+ *    - [3] Arbitrary flag field (LSB)  | Option
+ *
+ *              ALL THESE BYTES ARE YOURS - EXCEPT MODE.
+ *                      ATTEMPT NO BIT OPS THERE.
+ *
+ *    The MSB of this field determines the debug mode, Use the DEBUG_MODE*
+ *    macros to manipulate this byte.
+ *
+ *    The low 3 bytes of this field may be used to store arbitrary information.
+ *    Usually they are used to store flags that tune how detailed the logging
+ *    for a particular debug record is. Use the DEBUG_OPT* macros to manipulate
+ *    those bytes.
+ *
+ *    All operations performed on this field should be done using the macros
+ *    later in this header file. They are guaranteed to be atomic operations
+ *    with respect to this field. Using anything except the macros to
+ *    manipulate the flags field in a multithreaded environment results in
+ *    undefined behavior.
+ *
+ * desc
+ *    Human-readable description of this debugging record.
+ */
+struct debug {
+       _Atomic uint32_t flags;
+       const char *desc;
+};
+
+/*
+ * Callback set for debugging code.
+ *
+ * debug_set_all
+ *    Function pointer to call when the user requests that all debugs have a
+ *    mode set.
+ */
+struct debug_callbacks {
+       /*
+        * flags
+        *    flags to set on debug flag fields
+        *
+        * set
+        *    true: set flags
+        *    false: unset flags
+        */
+       void (*debug_set_all)(uint32_t flags, bool set);
+};
+
+/*
+ * Check if a mode is set for a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_MODE_CHECK(name, mode)                                           \
+       CHECK_FLAG_ATOMIC(&(name)->flags, (mode)&DEBUG_MODE_ALL)
+
+/*
+ * Check if an option bit is set for a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_OPT_CHECK(name, opt)                                             \
+       CHECK_FLAG_ATOMIC(&(name)->flags, (opt)&DEBUG_OPT_ALL)
+
+/*
+ * Check if bits are set for a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_FLAGS_CHECK(name, fl) CHECK_FLAG_ATOMIC(&(name)->flags, (fl))
+
+/*
+ * Set modes on a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_MODE_SET(name, mode, onoff)                                      \
+       do {                                                                   \
+               if (onoff)                                                     \
+                       SET_FLAG_ATOMIC(&(name)->flags,                        \
+                                       (mode)&DEBUG_MODE_ALL);                \
+               else                                                           \
+                       UNSET_FLAG_ATOMIC(&(name)->flags,                      \
+                                         (mode)&DEBUG_MODE_ALL);              \
+       } while (0)
+
+/* Convenience macros for specific set operations. */
+#define DEBUG_MODE_ON(name, mode) DEBUG_MODE_SET(name, mode, true)
+#define DEBUG_MODE_OFF(name, mode) DEBUG_MODE_SET(name, mode, false)
+
+/*
+ * Set options on a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_OPT_SET(name, opt, onoff)                                        \
+       do {                                                                   \
+               if (onoff)                                                     \
+                       SET_FLAG_ATOMIC(&(name)->flags, (opt)&DEBUG_OPT_ALL);  \
+               else                                                           \
+                       UNSET_FLAG_ATOMIC(&(name)->flags,                      \
+                                         (opt)&DEBUG_OPT_ALL);                \
+       } while (0)
+
+/* Convenience macros for specific set operations. */
+#define DEBUG_OPT_ON(name, opt) DEBUG_OPT_SET(name, opt, true)
+#define DEBUG_OPT_OFF(name, opt) DEBUG_OPT_SET(name, opt, true)
+
+/*
+ * Set bits on a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_FLAGS_SET(name, fl, onoff)                                       \
+       do {                                                                   \
+               if (onoff)                                                     \
+                       SET_FLAG_ATOMIC(&(name)->flags, (fl));                 \
+               else                                                           \
+                       UNSET_FLAG_ATOMIC(&(name)->flags, (fl));               \
+       } while (0)
+
+/* Convenience macros for specific set operations. */
+#define DEBUG_FLAGS_ON(name, fl) DEBUG_FLAGS_SET(&(name)->flags, (type), true)
+#define DEBUG_FLAGS_OFF(name, fl) DEBUG_FLAGS_SET(&(name)->flags, (type), false)
+
+/*
+ * Unset all modes and options on a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_CLEAR(name) RESET_FLAG_ATOMIC(&(name)->flags)
+
+/*
+ * Set all modes and options on a debug.
+ *
+ * MT-Safe
+ */
+#define DEBUG_ON(name)                                                         \
+       SET_FLAG_ATOMIC(&(name)->flags, DEBUG_MODE_ALL | DEBUG_OPT_ALL)
+
+/*
+ * Map a vty node to the correct debugging mode flags. FRR behaves such that a
+ * debug statement issued under the config node persists to the config file,
+ * whereas the same debug statement issued from the enable node only persists
+ * for the current session.
+ *
+ * MT-Safe
+ */
+#define DEBUG_NODE2MODE(vtynode)                                               \
+       (((vtynode) == CONFIG_NODE) ? DEBUG_MODE_ALL : DEBUG_MODE_TERM)
+
+/*
+ * Debug at the given level to the default logging destination.
+ *
+ * MT-Safe
+ */
+#define DEBUG(level, name, fmt, ...)                                           \
+       do {                                                                   \
+               if (DEBUG_MODE_CHECK(name, DEBUG_MODE_ALL))                    \
+                       zlog_##level(fmt, ##__VA_ARGS__);                      \
+       } while (0)
+
+/* Convenience macros for the various levels. */
+#define DEBUGE(name, fmt, ...) DEBUG(err, name, fmt, ##__VA_ARGS__)
+#define DEBUGW(name, fmt, ...) DEBUG(warn, name, fmt, ##__VA_ARGS__)
+#define DEBUGI(name, fmt, ...) DEBUG(info, name, fmt, ##__VA_ARGS__)
+#define DEBUGN(name, fmt, ...) DEBUG(notice, name, fmt, ##__VA_ARGS__)
+#define DEBUGD(name, fmt, ...) DEBUG(debug, name, fmt, ##__VA_ARGS__)
+
+/*
+ * Optional initializer for debugging. Highly recommended.
+ *
+ * This function installs common debugging commands and allows the caller to
+ * specify callbacks to take when these commands are issued, allowing the
+ * caller to respond to events such as a request to turn off all debugs.
+ *
+ * MT-Safe
+ */
+void debug_init(const struct debug_callbacks *cb);
+
+#endif /* _FRRDEBUG_H */
index 72b47ae5c32ad76a1c6bbabc17abc988d98820db..36a89168c28fc9ec8bba552dce8e2bdb96b3f0d5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Utilities and interfaces for managing POSIX threads within FRR.
- * Copyright (C) 2017  Cumulus Networks
+ * Copyright (C) 2017  Cumulus Networks, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ DEFINE_MTYPE(LIB, FRR_PTHREAD, "FRR POSIX Thread");
 DEFINE_MTYPE(LIB, PTHREAD_PRIM, "POSIX synchronization primitives");
 
 /* id for next created pthread */
-static unsigned int next_id = 0;
+static _Atomic uint32_t next_id = 0;
 
 /* default frr_pthread start/stop routine prototypes */
 static void *fpt_run(void *arg);
@@ -40,7 +40,6 @@ struct frr_pthread_attr frr_pthread_attr_default = {
        .id = 0,
        .start = fpt_run,
        .stop = fpt_halt,
-       .name = "Anonymous",
 };
 
 /* hash table to keep track of all frr_pthreads */
@@ -85,9 +84,10 @@ void frr_pthread_finish()
        pthread_mutex_unlock(&frr_pthread_hash_mtx);
 }
 
-struct frr_pthread *frr_pthread_new(struct frr_pthread_attr *attr)
+struct frr_pthread *frr_pthread_new(struct frr_pthread_attr *attr,
+                                   const char *name)
 {
-       static struct frr_pthread holder = {0};
+       static struct frr_pthread holder = {};
        struct frr_pthread *fpt = NULL;
 
        attr = attr ? attr : &frr_pthread_attr_default;
@@ -99,10 +99,14 @@ struct frr_pthread *frr_pthread_new(struct frr_pthread_attr *attr)
                if (!hash_lookup(frr_pthread_hash, &holder)) {
                        fpt = XCALLOC(MTYPE_FRR_PTHREAD,
                                      sizeof(struct frr_pthread));
+                       /* initialize mutex */
+                       pthread_mutex_init(&fpt->mtx, NULL);
                        /* create new thread master */
-                       fpt->master = thread_master_create(attr->name);
+                       fpt->master = thread_master_create(name);
                        /* set attributes */
                        fpt->attr = *attr;
+                       name = (name ? name : "Anonymous thread");
+                       fpt->name = XSTRDUP(MTYPE_FRR_PTHREAD, name);
                        if (attr == &frr_pthread_attr_default)
                                fpt->attr.id = frr_pthread_get_id();
                        /* initialize startup synchronization primitives */
@@ -126,16 +130,31 @@ void frr_pthread_destroy(struct frr_pthread *fpt)
 {
        thread_master_free(fpt->master);
 
+       pthread_mutex_destroy(&fpt->mtx);
        pthread_mutex_destroy(fpt->running_cond_mtx);
        pthread_cond_destroy(fpt->running_cond);
+       if (fpt->name)
+               XFREE(MTYPE_FRR_PTHREAD, fpt->name);
        XFREE(MTYPE_PTHREAD_PRIM, fpt->running_cond_mtx);
        XFREE(MTYPE_PTHREAD_PRIM, fpt->running_cond);
        XFREE(MTYPE_FRR_PTHREAD, fpt);
 }
 
-struct frr_pthread *frr_pthread_get(unsigned int id)
+void frr_pthread_set_name(struct frr_pthread *fpt, const char *name)
 {
-       static struct frr_pthread holder = {0};
+       pthread_mutex_lock(&fpt->mtx);
+       {
+               if (fpt->name)
+                       XFREE(MTYPE_FRR_PTHREAD, fpt->name);
+               fpt->name = XSTRDUP(MTYPE_FRR_PTHREAD, name);
+       }
+       pthread_mutex_unlock(&fpt->mtx);
+       thread_master_set_name(fpt->master, name);
+}
+
+struct frr_pthread *frr_pthread_get(uint32_t id)
+{
+       static struct frr_pthread holder = {};
        struct frr_pthread *fpt;
 
        pthread_mutex_lock(&frr_pthread_hash_mtx);
@@ -210,11 +229,13 @@ void frr_pthread_stop_all()
        pthread_mutex_unlock(&frr_pthread_hash_mtx);
 }
 
-unsigned int frr_pthread_get_id()
+uint32_t frr_pthread_get_id(void)
 {
+       _Atomic uint32_t nxid;
+       nxid = atomic_fetch_add_explicit(&next_id, 1, memory_order_seq_cst);
        /* just a sanity check, this should never happen */
-       assert(next_id <= INT_MAX - 1);
-       return next_id++;
+       assert(nxid <= (UINT32_MAX - 1));
+       return nxid;
 }
 
 void frr_pthread_yield(void)
@@ -238,6 +259,7 @@ static int fpt_dummy(struct thread *thread)
 static int fpt_finish(struct thread *thread)
 {
        struct frr_pthread *fpt = THREAD_ARG(thread);
+
        atomic_store_explicit(&fpt->running, false, memory_order_relaxed);
        return 0;
 }
index 2cc50196a897b81ca103c0c6f3c6ba56314653ae..91002dd8eff6fb052c92c5d584f1e38351cb985d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Utilities and interfaces for managing POSIX threads within FRR.
- * Copyright (C) 2017  Cumulus Networks
+ * Copyright (C) 2017  Cumulus Networks, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -32,14 +32,19 @@ struct frr_pthread;
 struct frr_pthread_attr;
 
 struct frr_pthread_attr {
-       int id;
+       _Atomic uint32_t id;
        void *(*start)(void *);
        int (*stop)(struct frr_pthread *, void **);
-       const char *name;
 };
 
 struct frr_pthread {
 
+       /*
+        * Mutex protecting this structure. Must be taken for reading some
+        * fields, denoted by a 'Requires: mtx'.
+        */
+       pthread_mutex_t mtx;
+
        /* pthread id */
        pthread_t thread;
 
@@ -73,8 +78,17 @@ struct frr_pthread {
         * Fake thread-specific storage. No constraints on usage. Helpful when
         * creating reentrant pthread implementations. Can be used to pass
         * argument to pthread entry function.
+        *
+        * Requires: mtx
         */
        void *data;
+
+       /*
+        * Human-readable thread name.
+        *
+        * Requires: mtx
+        */
+       char *name;
 };
 
 extern struct frr_pthread_attr frr_pthread_attr_default;
@@ -107,9 +121,19 @@ void frr_pthread_finish(void);
  * frr_pthread will cause them to run on that pthread.
  *
  * @param attr - the thread attributes
+ * @param name - Human-readable name
  * @return the created frr_pthread upon success, or NULL upon failure
  */
-struct frr_pthread *frr_pthread_new(struct frr_pthread_attr *attr);
+struct frr_pthread *frr_pthread_new(struct frr_pthread_attr *attr,
+                                   const char *name);
+
+/*
+ * Changes the name of the frr_pthread.
+ *
+ * @param fpt - the frr_pthread to operate on
+ * @param name - Human-readable name
+ */
+void frr_pthread_set_name(struct frr_pthread *fpt, const char *name);
 
 /*
  * Destroys an frr_pthread.
@@ -125,7 +149,7 @@ void frr_pthread_destroy(struct frr_pthread *fpt);
  *
  * @return frr_thread associated with the provided id, or NULL on error
  */
-struct frr_pthread *frr_pthread_get(unsigned int id);
+struct frr_pthread *frr_pthread_get(uint32_t id);
 
 /*
  * Creates a new pthread and binds it to a frr_pthread.
@@ -198,6 +222,6 @@ void frr_pthread_yield(void);
  *
  * @return unique identifier
  */
-unsigned int frr_pthread_get_id(void);
+uint32_t frr_pthread_get_id(void);
 
 #endif /* _FRR_PTHREAD_H */
index 4ae84c401833bd3b194dbf9c6f926579fcd81af5..689b25255d9e41428a32fc65f54475a45f7062f6 100644 (file)
@@ -46,6 +46,8 @@
 #define atomic_exchange_explicit __atomic_exchange_n
 #define atomic_fetch_add_explicit __atomic_fetch_add
 #define atomic_fetch_sub_explicit __atomic_fetch_sub
+#define atomic_fetch_and_explicit __atomic_fetch_and
+#define atomic_fetch_or_explicit __atomic_fetch_or
 
 #define atomic_compare_exchange_weak_explicit(atom, expect, desire, mem1,      \
                                              mem2)                            \
                *_expect = rval;                                               \
                ret;                                                           \
        })
+#define atomic_fetch_and_explicit(ptr, val, mem)                               \
+       ({                                                                     \
+               __sync_synchronize();                                          \
+               typeof(*ptr) rval = __sync_fetch_and_and(ptr, val);            \
+               __sync_synchronize();                                          \
+               rval;                                                          \
+       })
+#define atomic_fetch_or_explicit(ptr, val, mem)                                \
+       ({                                                                     \
+               __sync_synchronize();                                          \
+               typeof(*ptr) rval = __sync_fetch_and_or(ptr, val);             \
+               __sync_synchronize();                                          \
+               rval;                                                          \
+       })
 
 #else /* !HAVE___ATOMIC && !HAVE_STDATOMIC_H */
 #error no atomic functions...
index 98c28008dc60a36ea6ea76cdf6244a84475ba08e..44bde45add60b25cec307e2d08cd440843840f60 100644 (file)
@@ -85,4 +85,21 @@ static inline char *ipaddr2str(struct ipaddr *ip, char *buf, int size)
        }
        return buf;
 }
+
+/*
+ * Convert IPv4 address to IPv4-mapped IPv6 address which is of the
+ * form ::FFFF:<IPv4 address> (RFC 4291). This IPv6 address can then
+ * be used to represent the IPv4 address, wherever only an IPv6 address
+ * is required.
+ */
+static inline void ipv4_to_ipv4_mapped_ipv6(struct in6_addr *in6,
+                                           struct in_addr in)
+{
+       u_int32_t addr_type = htonl(0xFFFF);
+
+       memset(in6, 0, sizeof(struct in6_addr));
+       memcpy((char *)in6 + 8, &addr_type, sizeof(addr_type));
+       memcpy((char *)in6 + 12, &in, sizeof(struct in_addr));
+}
+
 #endif /* __IPADDR_H__ */
index 6330c53702a98327ac9cab6bd4a2eff3c38f8a61..74e7be7c7d76821705d9e923261f0a8bef707a9b 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -961,6 +961,9 @@ static const struct zebra_desc_table command_types[] = {
        DESC_ENTRY(ZEBRA_PW_SET),
        DESC_ENTRY(ZEBRA_PW_UNSET),
        DESC_ENTRY(ZEBRA_PW_STATUS_UPDATE),
+       DESC_ENTRY(ZEBRA_RULE_ADD),
+       DESC_ENTRY(ZEBRA_RULE_DELETE),
+       DESC_ENTRY(ZEBRA_RULE_NOTIFY_OWNER),
 };
 #undef DESC_ENTRY
 
@@ -1089,41 +1092,52 @@ void zlog_hexdump(const void *mem, unsigned int len)
        unsigned long i = 0;
        unsigned int j = 0;
        unsigned int columns = 8;
-       char buf[(len * 4) + ((len / 4) * 20) + 30];
+       /*
+        * 19 bytes for 0xADDRESS:
+        * 24 bytes for data; 2 chars plus a space per data byte
+        *  1 byte for space
+        *  8 bytes for ASCII representation
+        *  1 byte for a newline
+        * =====================
+        * 53 bytes per 8 bytes of data
+        *  1 byte for null term
+        */
+       size_t bs = ((len / 8) + 1) * 53 + 1;
+       char buf[bs];
        char *s = buf;
 
+       memset(buf, 0, sizeof(buf));
+
        for (i = 0; i < len + ((len % columns) ? (columns - len % columns) : 0);
             i++) {
                /* print offset */
                if (i % columns == 0)
-                       s += sprintf(s, "0x%016lx: ", (unsigned long)mem + i);
+                       s += snprintf(s, bs - (s - buf),
+                                     "0x%016lx: ", (unsigned long)mem + i);
 
                /* print hex data */
                if (i < len)
-                       s += sprintf(s, "%02x ", 0xFF & ((const char *)mem)[i]);
+                       s += snprintf(s, bs - (s - buf), "%02x ",
+                                     0xFF & ((const char *)mem)[i]);
 
                /* end of block, just aligning for ASCII dump */
                else
-                       s += sprintf(s, "   ");
+                       s += snprintf(s, bs - (s - buf), "   ");
 
                /* print ASCII dump */
                if (i % columns == (columns - 1)) {
                        for (j = i - (columns - 1); j <= i; j++) {
-                               if (j >= len) /* end of block, not really
-                                                printing */
-                                       s += sprintf(s, " ");
-
-                               else if (isprint((int)((const char *)mem)
-                                                        [j])) /* printable char
-                                                                 */
-                                       s += sprintf(
-                                               s, "%c",
+                               /* end of block not really printing */
+                               if (j >= len)
+                                       s += snprintf(s, bs - (s - buf), " ");
+                               else if (isprint((int)((const char *)mem)[j]))
+                                       s += snprintf(
+                                               s, bs - (s - buf), "%c",
                                                0xFF & ((const char *)mem)[j]);
-
                                else /* other char */
-                                       s += sprintf(s, ".");
+                                       s += snprintf(s, bs - (s - buf), ".");
                        }
-                       s += sprintf(s, "\n");
+                       s += snprintf(s, bs - (s - buf), "\n");
                }
        }
        zlog_debug("\n%s", buf);
index 6809a014691b902eff06e9d8625d9c5ef2d806bc..fb7ccc169e70f973114152c83170096fa8b70566 100644 (file)
@@ -143,49 +143,6 @@ struct nexthop *nexthop_new(void)
        return XCALLOC(MTYPE_NEXTHOP, sizeof(struct nexthop));
 }
 
-/* Add nexthop to the end of a nexthop list.  */
-void nexthop_add(struct nexthop **target, struct nexthop *nexthop)
-{
-       struct nexthop *last;
-
-       for (last = *target; last && last->next; last = last->next)
-               ;
-       if (last)
-               last->next = nexthop;
-       else
-               *target = nexthop;
-       nexthop->prev = last;
-}
-
-void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
-                  struct nexthop *rparent)
-{
-       struct nexthop *nexthop;
-       struct nexthop *nh1;
-
-       for (nh1 = nh; nh1; nh1 = nh1->next) {
-               nexthop = nexthop_new();
-               nexthop->vrf_id = nh1->vrf_id;
-               nexthop->ifindex = nh1->ifindex;
-               nexthop->type = nh1->type;
-               nexthop->flags = nh1->flags;
-               memcpy(&nexthop->gate, &nh1->gate, sizeof(nh1->gate));
-               memcpy(&nexthop->src, &nh1->src, sizeof(nh1->src));
-               memcpy(&nexthop->rmap_src, &nh1->rmap_src,
-                      sizeof(nh1->rmap_src));
-               nexthop->rparent = rparent;
-               if (nh1->nh_label)
-                       nexthop_add_labels(nexthop, nh1->nh_label_type,
-                                          nh1->nh_label->num_labels,
-                                          &nh1->nh_label->label[0]);
-               nexthop_add(tnh, nexthop);
-
-               if (CHECK_FLAG(nh1->flags, NEXTHOP_FLAG_RECURSIVE))
-                       copy_nexthops(&nexthop->resolved, nh1->resolved,
-                                     nexthop);
-       }
-}
-
 /* Free nexthop. */
 void nexthop_free(struct nexthop *nexthop)
 {
@@ -206,6 +163,57 @@ void nexthops_free(struct nexthop *nexthop)
        }
 }
 
+bool nexthop_same(const struct nexthop *nh1, const struct nexthop *nh2)
+{
+       if (nh1 && !nh2)
+               return false;
+
+       if (!nh1 && nh2)
+               return false;
+
+       if (nh1 == nh2)
+               return true;
+
+       if (nh1->vrf_id != nh2->vrf_id)
+               return false;
+
+       if (nh1->type != nh2->type)
+               return false;
+
+       switch (nh1->type) {
+       case NEXTHOP_TYPE_IFINDEX:
+               if (nh1->ifindex != nh2->ifindex)
+                       return false;
+               break;
+       case NEXTHOP_TYPE_IPV4:
+               if (nh1->gate.ipv4.s_addr != nh2->gate.ipv4.s_addr)
+                       return false;
+               break;
+       case NEXTHOP_TYPE_IPV4_IFINDEX:
+               if (nh1->gate.ipv4.s_addr != nh2->gate.ipv4.s_addr)
+                       return false;
+               if (nh1->ifindex != nh2->ifindex)
+                       return false;
+               break;
+       case NEXTHOP_TYPE_IPV6:
+               if (memcmp(&nh1->gate.ipv6, &nh2->gate.ipv6, 16))
+                       return false;
+               break;
+       case NEXTHOP_TYPE_IPV6_IFINDEX:
+               if (memcmp(&nh1->gate.ipv6, &nh2->gate.ipv6, 16))
+                       return false;
+               if (nh1->ifindex != nh2->ifindex)
+                       return false;
+               break;
+       case NEXTHOP_TYPE_BLACKHOLE:
+               if (nh1->bh_type != nh2->bh_type)
+                       return false;
+               break;
+       }
+
+       return true;
+}
+
 /* Update nexthop with label information. */
 void nexthop_add_labels(struct nexthop *nexthop, enum lsp_types_t type,
                        u_int8_t num_labels, mpls_label_t *label)
index 0be949688f5c81754e9343b7ad550caf80a1102f..568243d3a9b71f4ea53936a1676793df16305b15 100644 (file)
@@ -109,24 +109,8 @@ struct nexthop {
        struct mpls_label_stack *nh_label;
 };
 
-/* The following for loop allows to iterate over the nexthop
- * structure of routes.
- *
- * head:      The pointer to the first nexthop in the chain.
- *
- * nexthop:   The pointer to the current nexthop, either in the
- *            top-level chain or in a resolved chain.
- */
-#define ALL_NEXTHOPS(head, nexthop)                                            \
-       (nexthop) = (head);                                                    \
-       (nexthop);                                                             \
-       (nexthop) = nexthop_next(nexthop)
-
 struct nexthop *nexthop_new(void);
-void nexthop_add(struct nexthop **target, struct nexthop *nexthop);
 
-void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
-                  struct nexthop *rparent);
 void nexthop_free(struct nexthop *nexthop);
 void nexthops_free(struct nexthop *nexthop);
 
@@ -134,6 +118,8 @@ void nexthop_add_labels(struct nexthop *, enum lsp_types_t, u_int8_t,
                        mpls_label_t *);
 void nexthop_del_labels(struct nexthop *);
 
+extern bool nexthop_same(const struct nexthop *nh1, const struct nexthop *nh2);
+
 extern const char *nexthop_type_to_str(enum nexthop_types_t nh_type);
 extern int nexthop_same_no_recurse(const struct nexthop *next1,
                                   const struct nexthop *next2);
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c
new file mode 100644 (file)
index 0000000..e486247
--- /dev/null
@@ -0,0 +1,399 @@
+/*
+ * Nexthop Group structure definition.
+ * Copyright (C) 2018 Cumulus Networks, Inc.
+ *                    Donald Sharp
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include <zebra.h>
+
+#include <vrf.h>
+#include <nexthop.h>
+#include <nexthop_group.h>
+#include <vty.h>
+#include <command.h>
+
+#ifndef VTYSH_EXTRACT_PL
+#include "lib/nexthop_group_clippy.c"
+#endif
+
+DEFINE_MTYPE_STATIC(LIB, NEXTHOP_GROUP, "Nexthop Group")
+
+struct nexthop_group_hooks {
+       void (*new)(const char *name);
+       void (*add_nexthop)(const struct nexthop_group_cmd *nhg,
+                           const struct nexthop *nhop);
+       void (*del_nexthop)(const struct nexthop_group_cmd *nhg,
+                           const struct nexthop *nhop);
+       void (*delete)(const char *name);
+};
+
+static struct nexthop_group_hooks nhg_hooks;
+
+static inline int
+nexthop_group_cmd_compare(const struct nexthop_group_cmd *nhgc1,
+                         const struct nexthop_group_cmd *nhgc2);
+RB_GENERATE(nhgc_entry_head, nexthop_group_cmd, nhgc_entry,
+           nexthop_group_cmd_compare)
+
+struct nhgc_entry_head nhgc_entries;
+
+static inline int
+nexthop_group_cmd_compare(const struct nexthop_group_cmd *nhgc1,
+                         const struct nexthop_group_cmd *nhgc2)
+{
+       return strcmp(nhgc1->name, nhgc2->name);
+}
+
+struct nexthop *nexthop_exists(struct nexthop_group *nhg, struct nexthop *nh)
+{
+       struct nexthop *nexthop;
+
+       for (nexthop = nhg->nexthop; nexthop; nexthop = nexthop->next) {
+               if (nexthop_same(nh, nexthop))
+                       return nexthop;
+       }
+
+       return NULL;
+}
+
+struct nexthop_group *nexthop_group_new(void)
+{
+       return XCALLOC(MTYPE_NEXTHOP_GROUP, sizeof(struct nexthop_group));
+}
+
+void nexthop_group_delete(struct nexthop_group **nhg)
+{
+       XFREE(MTYPE_NEXTHOP_GROUP, *nhg);
+}
+
+/* Add nexthop to the end of a nexthop list.  */
+void nexthop_add(struct nexthop **target, struct nexthop *nexthop)
+{
+       struct nexthop *last;
+
+       for (last = *target; last && last->next; last = last->next)
+               ;
+       if (last)
+               last->next = nexthop;
+       else
+               *target = nexthop;
+       nexthop->prev = last;
+}
+
+/* Delete nexthop from a nexthop list.  */
+void nexthop_del(struct nexthop_group *nhg, struct nexthop *nh)
+{
+       struct nexthop *nexthop;
+
+       for (nexthop = nhg->nexthop; nexthop; nexthop = nexthop->next) {
+               if (nexthop_same(nh, nexthop))
+                       break;
+       }
+
+       assert(nexthop);
+
+       if (nexthop->prev)
+               nexthop->prev->next = nexthop->next;
+       else
+               nhg->nexthop = nexthop->next;
+
+       if (nexthop->next)
+               nexthop->next->prev = nexthop->prev;
+}
+
+void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
+                  struct nexthop *rparent)
+{
+       struct nexthop *nexthop;
+       struct nexthop *nh1;
+
+       for (nh1 = nh; nh1; nh1 = nh1->next) {
+               nexthop = nexthop_new();
+               nexthop->vrf_id = nh1->vrf_id;
+               nexthop->ifindex = nh1->ifindex;
+               nexthop->type = nh1->type;
+               nexthop->flags = nh1->flags;
+               memcpy(&nexthop->gate, &nh1->gate, sizeof(nh1->gate));
+               memcpy(&nexthop->src, &nh1->src, sizeof(nh1->src));
+               memcpy(&nexthop->rmap_src, &nh1->rmap_src,
+                      sizeof(nh1->rmap_src));
+               nexthop->rparent = rparent;
+               if (nh1->nh_label)
+                       nexthop_add_labels(nexthop, nh1->nh_label_type,
+                                          nh1->nh_label->num_labels,
+                                          &nh1->nh_label->label[0]);
+               nexthop_add(tnh, nexthop);
+
+               if (CHECK_FLAG(nh1->flags, NEXTHOP_FLAG_RECURSIVE))
+                       copy_nexthops(&nexthop->resolved, nh1->resolved,
+                                     nexthop);
+       }
+}
+
+static void nhgc_delete_nexthops(struct nexthop_group_cmd *nhgc)
+{
+       struct nexthop *nexthop;
+
+       nexthop = nhgc->nhg.nexthop;
+       while (nexthop) {
+               struct nexthop *next = nexthop_next(nexthop);
+
+               if (nhg_hooks.del_nexthop)
+                       nhg_hooks.del_nexthop(nhgc, nexthop);
+
+               nexthop_free(nexthop);
+
+               nexthop = next;
+       }
+}
+
+struct nexthop_group_cmd *nhgc_find(const char *name)
+{
+       struct nexthop_group_cmd find;
+
+       strlcpy(find.name, name, sizeof(find.name));
+
+       return RB_FIND(nhgc_entry_head, &nhgc_entries, &find);
+}
+
+static struct nexthop_group_cmd *nhgc_get(const char *name)
+{
+       struct nexthop_group_cmd *nhgc;
+
+       nhgc = nhgc_find(name);
+       if (!nhgc) {
+               nhgc = XCALLOC(MTYPE_TMP, sizeof(*nhgc));
+               strlcpy(nhgc->name, name, sizeof(nhgc->name));
+
+               QOBJ_REG(nhgc, nexthop_group_cmd);
+               RB_INSERT(nhgc_entry_head, &nhgc_entries, nhgc);
+
+               if (nhg_hooks.new)
+                       nhg_hooks.new(name);
+       }
+
+       return nhgc;
+}
+
+static void nhgc_delete(struct nexthop_group_cmd *nhgc)
+{
+       nhgc_delete_nexthops(nhgc);
+
+       if (nhg_hooks.delete)
+               nhg_hooks.delete(nhgc->name);
+
+       RB_REMOVE(nhgc_entry_head, &nhgc_entries, nhgc);
+}
+
+DEFINE_QOBJ_TYPE(nexthop_group_cmd)
+
+DEFUN_NOSH(nexthop_group, nexthop_group_cmd, "nexthop-group NAME",
+          "Enter into the nexthop-group submode\n"
+          "Specify the NAME of the nexthop-group\n")
+{
+       const char *nhg_name = argv[1]->arg;
+       struct nexthop_group_cmd *nhgc = NULL;
+
+       nhgc = nhgc_get(nhg_name);
+       VTY_PUSH_CONTEXT(NH_GROUP_NODE, nhgc);
+
+       return CMD_SUCCESS;
+}
+
+DEFUN_NOSH(no_nexthop_group, no_nexthop_group_cmd, "no nexthop-group NAME",
+          NO_STR
+          "Delete the nexthop-group\n"
+          "Specify the NAME of the nexthop-group\n")
+{
+       const char *nhg_name = argv[2]->arg;
+       struct nexthop_group_cmd *nhgc = NULL;
+
+       nhgc = nhgc_find(nhg_name);
+       if (nhgc)
+               nhgc_delete(nhgc);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(ecmp_nexthops, ecmp_nexthops_cmd,
+      "[no] nexthop <A.B.C.D|X:X::X:X>$addr [INTERFACE]$intf [nexthop-vrf NAME$name]",
+      NO_STR
+      "Specify one of the nexthops in this ECMP group\n"
+      "v4 Address\n"
+      "v6 Address\n"
+      "Interface to use\n"
+      "If the nexthop is in a different vrf tell us\n"
+      "The nexthop-vrf Name\n")
+{
+       VTY_DECLVAR_CONTEXT(nexthop_group_cmd, nhgc);
+       struct vrf *vrf;
+       struct nexthop nhop;
+       struct nexthop *nh;
+
+       if (name)
+               vrf = vrf_lookup_by_name(name);
+       else
+               vrf = vrf_lookup_by_id(VRF_DEFAULT);
+
+       if (!vrf) {
+               vty_out(vty, "Specified: %s is non-existent\n", name);
+               return CMD_WARNING;
+       }
+
+       memset(&nhop, 0, sizeof(nhop));
+       nhop.vrf_id = vrf->vrf_id;
+
+       if (addr->sa.sa_family == AF_INET) {
+               nhop.gate.ipv4.s_addr = addr->sin.sin_addr.s_addr;
+               if (intf) {
+                       nhop.type = NEXTHOP_TYPE_IPV4_IFINDEX;
+                       nhop.ifindex = ifname2ifindex(intf, vrf->vrf_id);
+                       if (nhop.ifindex == IFINDEX_INTERNAL) {
+                               vty_out(vty,
+                                       "Specified Intf %s does not exist in vrf: %s\n",
+                                       intf, vrf->name);
+                               return CMD_WARNING;
+                       }
+               } else
+                       nhop.type = NEXTHOP_TYPE_IPV4;
+       } else {
+               memcpy(&nhop.gate.ipv6, &addr->sin6.sin6_addr, 16);
+               if (intf) {
+                       nhop.type = NEXTHOP_TYPE_IPV6_IFINDEX;
+                       nhop.ifindex = ifname2ifindex(intf, vrf->vrf_id);
+                       if (nhop.ifindex == IFINDEX_INTERNAL) {
+                               vty_out(vty,
+                                       "Specified Intf %s does not exist in vrf: %s\n",
+                                       intf, vrf->name);
+                               return CMD_WARNING;
+                       }
+               } else
+                       nhop.type = NEXTHOP_TYPE_IPV6;
+       }
+
+       nh = nexthop_exists(&nhgc->nhg, &nhop);
+
+       if (no) {
+               if (nh) {
+                       nexthop_del(&nhgc->nhg, nh);
+
+                       if (nhg_hooks.del_nexthop)
+                               nhg_hooks.del_nexthop(nhgc, nh);
+
+                       nexthop_free(nh);
+               }
+       } else if (!nh) {
+               /* must be adding new nexthop since !no and !nexthop_exists */
+               nh = nexthop_new();
+
+               memcpy(nh, &nhop, sizeof(nhop));
+               nexthop_add(&nhgc->nhg.nexthop, nh);
+
+               if (nhg_hooks.add_nexthop)
+                       nhg_hooks.add_nexthop(nhgc, nh);
+       }
+
+       return CMD_SUCCESS;
+}
+
+struct cmd_node nexthop_group_node = {
+       NH_GROUP_NODE,
+       "%s(config-nh-group)# ",
+       1
+};
+
+void nexthop_group_write_nexthop(struct vty *vty, struct nexthop *nh)
+{
+       char buf[100];
+       struct vrf *vrf;
+
+       vty_out(vty, "  nexthop ");
+
+       switch (nh->type) {
+       case NEXTHOP_TYPE_IFINDEX:
+               vty_out(vty, "%s", ifindex2ifname(nh->ifindex, nh->vrf_id));
+               break;
+       case NEXTHOP_TYPE_IPV4:
+               vty_out(vty, "%s", inet_ntoa(nh->gate.ipv4));
+               break;
+       case NEXTHOP_TYPE_IPV4_IFINDEX:
+               vty_out(vty, "%s %s", inet_ntoa(nh->gate.ipv4),
+                       ifindex2ifname(nh->ifindex, nh->vrf_id));
+               break;
+       case NEXTHOP_TYPE_IPV6:
+               vty_out(vty, "%s",
+                       inet_ntop(AF_INET6, &nh->gate.ipv6, buf, sizeof(buf)));
+               break;
+       case NEXTHOP_TYPE_IPV6_IFINDEX:
+               vty_out(vty, "%s %s",
+                       inet_ntop(AF_INET6, &nh->gate.ipv6, buf, sizeof(buf)),
+                       ifindex2ifname(nh->ifindex, nh->vrf_id));
+               break;
+       case NEXTHOP_TYPE_BLACKHOLE:
+               break;
+       }
+
+       if (nh->vrf_id != VRF_DEFAULT) {
+               vrf = vrf_lookup_by_id(nh->vrf_id);
+               vty_out(vty, " nexthop-vrf %s", vrf->name);
+       }
+       vty_out(vty, "\n");
+}
+
+static int nexthop_group_write(struct vty *vty)
+{
+       struct nexthop_group_cmd *nhgc;
+       struct nexthop *nh;
+
+       RB_FOREACH (nhgc, nhgc_entry_head, &nhgc_entries) {
+               vty_out(vty, "nexthop-group %s\n", nhgc->name);
+
+               for (nh = nhgc->nhg.nexthop; nh; nh = nh->next)
+                       nexthop_group_write_nexthop(vty, nh);
+
+               vty_out(vty, "!\n");
+       }
+
+       return 1;
+}
+
+void nexthop_group_init(void (*new)(const char *name),
+                       void (*add_nexthop)(const struct nexthop_group_cmd *nhg,
+                                           const struct nexthop *nhop),
+                       void (*del_nexthop)(const struct nexthop_group_cmd *nhg,
+                                           const struct nexthop *nhop),
+                       void (*delete)(const char *name))
+{
+       RB_INIT(nhgc_entry_head, &nhgc_entries);
+
+       install_node(&nexthop_group_node, nexthop_group_write);
+       install_element(CONFIG_NODE, &nexthop_group_cmd);
+       install_element(CONFIG_NODE, &no_nexthop_group_cmd);
+
+       install_default(NH_GROUP_NODE);
+       install_element(NH_GROUP_NODE, &ecmp_nexthops_cmd);
+
+       memset(&nhg_hooks, 0, sizeof(nhg_hooks));
+
+       if (new)
+               nhg_hooks.new = new;
+       if (add_nexthop)
+               nhg_hooks.add_nexthop = add_nexthop;
+       if (del_nexthop)
+               nhg_hooks.del_nexthop = del_nexthop;
+       if (delete)
+               nhg_hooks.delete = delete;
+}
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h
new file mode 100644 (file)
index 0000000..c2e4c4d
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Nexthop Group structure definition.
+ * Copyright (C) 2018 Cumulus Networks, Inc.
+ *                    Donald Sharp
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __NEXTHOP_GROUP__
+#define __NEXTHOP_GROUP__
+
+#include <vty.h>
+
+/*
+ * What is a nexthop group?
+ *
+ * A nexthop group is a collection of nexthops that make up
+ * the ECMP path for the route.
+ *
+ * This module provides a proper abstraction to this idea.
+ */
+struct nexthop_group {
+       struct nexthop *nexthop;
+};
+
+struct nexthop_group *nexthop_group_new(void);
+void nexthop_group_delete(struct nexthop_group **nhg);
+
+void nexthop_add(struct nexthop **target, struct nexthop *nexthop);
+void nexthop_del(struct nexthop_group *nhg, struct nexthop *nexthop);
+void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
+                  struct nexthop *rparent);
+
+/* The following for loop allows to iterate over the nexthop
+ * structure of routes.
+ *
+ * head:      The pointer to the first nexthop in the chain.
+ *
+ * nexthop:   The pointer to the current nexthop, either in the
+ *            top-level chain or in a resolved chain.
+ */
+#define ALL_NEXTHOPS(head, nhop)                                       \
+       (nhop) = (head.nexthop);                                        \
+       (nhop);                                                         \
+       (nhop) = nexthop_next(nhop)
+
+struct nexthop_group_cmd {
+
+       RB_ENTRY(nexthop_group_cmd) nhgc_entry;
+
+       char name[80];
+
+       struct nexthop_group nhg;
+
+       QOBJ_FIELDS
+};
+RB_HEAD(nhgc_entry_head, nexthp_group_cmd);
+RB_PROTOTYPE(nhgc_entry_head, nexthop_group_cmd, nhgc_entry,
+            nexthop_group_cmd_compare)
+DECLARE_QOBJ_TYPE(nexthop_group_cmd)
+
+/*
+ * Initialize nexthop_groups.  If you are interested in when
+ * a nexthop_group is added/deleted/modified, then set the
+ * appropriate callback functions to handle it in your
+ * code
+ */
+void nexthop_group_init(
+       void (*new)(const char *name),
+       void (*add_nexthop)(const struct nexthop_group_cmd *nhgc,
+                           const struct nexthop *nhop),
+       void (*del_nexthop)(const struct nexthop_group_cmd *nhgc,
+                           const struct nexthop *nhop),
+       void (*delete)(const char *name));
+
+extern struct nexthop *nexthop_exists(struct nexthop_group *nhg,
+                                     struct nexthop *nh);
+
+extern struct nexthop_group_cmd *nhgc_find(const char *name);
+
+extern void nexthop_group_write_nexthop(struct vty *vty, struct nexthop *nh);
+#endif
index 4e764a14c139ab898bbd9717542c99545662b30a..310a993c38654e551871b981ad07543dd84b58ce 100644 (file)
@@ -40,7 +40,7 @@
 # Long description:     Full description, but should try fit on a line.
 ####
 #
-# If you add a new routing protocol here, make sure you go update
+# If you add a new routing protocol here, make sure you also update
 # meta_queue_map in zebra_rib.c
 #
 ##  type                cname      daemon  C    4  6  short help
index 8186304437e333b3be2e82bdf33e1ce8f414c20a..be211f82a8e527a8ec8e1dda6cc47e14559460ee 100644 (file)
 #ifndef HAVE_STRLCAT
 #undef strlcat
 
-size_t strlcat(char *__restrict dest, const char *__restrict src, size_t size);
+size_t strlcat(char *__restrict dest,
+              const char *__restrict src, size_t destsize);
 
-size_t strlcat(char *__restrict dest, const char *__restrict src, size_t size)
+size_t strlcat(char *__restrict dest,
+              const char *__restrict src, size_t destsize)
 {
        size_t src_length = strlen(src);
 
        /* Our implementation strlcat supports dest == NULL if size == 0
           (for consistency with snprintf and strlcpy), but strnlen does
           not, so we have to cover this case explicitly.  */
-       if (size == 0)
+       if (destsize == 0)
                return src_length;
 
-       size_t dest_length = strnlen(dest, size);
-       if (dest_length != size) {
+       size_t dest_length = strnlen(dest, destsize);
+       if (dest_length != destsize) {
                /* Copy at most the remaining number of characters in the
                   destination buffer.  Leave for the NUL terminator.  */
-               size_t to_copy = size - dest_length - 1;
+               size_t to_copy = destsize - dest_length - 1;
                /* But not more than what is available in the source string.  */
                if (to_copy > src_length)
                        to_copy = src_length;
index b7681754aa7e7fd90ca02c1a8331b8a357f0e071..b0c33ca7f42baeac4acd8dce8b9163fc5974b639 100644 (file)
 #ifndef HAVE_STRLCPY
 #undef strlcpy
 
-size_t strlcpy(char *__restrict dest, const char *__restrict src, size_t size);
+size_t strlcpy(char *__restrict dest,
+              const char *__restrict src, size_t destsize);
 
-size_t strlcpy(char *__restrict dest, const char *__restrict src, size_t size)
+size_t strlcpy(char *__restrict dest,
+              const char *__restrict src, size_t destsize)
 {
        size_t src_length = strlen(src);
 
-       if (__builtin_expect(src_length >= size, 0)) {
-               if (size > 0) {
-                       /* Copy the leading portion of the string.  The last
-                          character is subsequently overwritten with the NUL
-                          terminator, but the destination size is usually a
-                          multiple of a small power of two, so writing it twice
-                          should be more efficient than copying an odd number
-                          of
-                          bytes.  */
-                       memcpy(dest, src, size);
-                       dest[size - 1] = '\0';
+       if (__builtin_expect(src_length >= destsize, 0)) {
+               if (destsize > 0) {
+                       /*
+                        * Copy the leading portion of the string.  The last
+                        * character is subsequently overwritten with the NUL
+                        * terminator, but the destination destsize is usually
+                        * a multiple of a small power of two, so writing it
+                        * twice should be more efficient than copying an odd
+                        * number of bytes.
+                        */
+                       memcpy(dest, src, destsize);
+                       dest[destsize - 1] = '\0';
                }
        } else
                /* Copy the string and its terminating NUL character.  */
index e292d7a342d0c889f18bb8bd81bcbef225c040ae..7d85b7a24dae3f7592b385f97598c0cf29cc15e7 100644 (file)
@@ -15,6 +15,7 @@ lib_libfrr_la_SOURCES = \
        lib/command_match.c \
        lib/command_parse.y \
        lib/csv.c \
+       lib/debug.c \
        lib/distribute.c \
        lib/event_counter.c \
        lib/ferr.c \
@@ -44,6 +45,7 @@ lib_libfrr_la_SOURCES = \
        lib/nexthop.c \
        lib/netns_linux.c \
        lib/netns_other.c \
+       lib/nexthop_group.c \
        lib/openbsd-tree.c \
        lib/pid_output.c \
        lib/plist.c \
@@ -80,6 +82,8 @@ lib_libfrr_la_SOURCES = \
 
 lib/plist_clippy.c: $(CLIPPY_DEPS)
 lib/plist.lo: lib/plist_clippy.c
+lib/nexthop_group_clippy.c: $(CLIPPY_DEPS)
+lib/nexthop_group.lo: lib/nexthop_group_clippy.c
 
 pkginclude_HEADERS += \
        lib/bfd.h \
@@ -91,6 +95,7 @@ pkginclude_HEADERS += \
        lib/command_match.h \
        lib/compiler.h \
        lib/csv.h \
+       lib/debug.h \
        lib/distribute.h \
        lib/event_counter.h \
        lib/ferr.h \
@@ -122,6 +127,7 @@ pkginclude_HEADERS += \
        lib/mpls.h \
        lib/network.h \
        lib/nexthop.h \
+       lib/nexthop_group.h \
        lib/ns.h \
        lib/openbsd-queue.h \
        lib/openbsd-tree.h \
index a221c7762866ebc310db7884ee2b569c50f2bf2a..d26be1541fe42b5786430b3edaea37a88bee0053 100644 (file)
@@ -343,7 +343,6 @@ static void initializer()
        pthread_key_create(&thread_current, NULL);
 }
 
-/* Allocate new thread master.  */
 struct thread_master *thread_master_create(const char *name)
 {
        struct thread_master *rv;
@@ -426,6 +425,17 @@ struct thread_master *thread_master_create(const char *name)
        return rv;
 }
 
+void thread_master_set_name(struct thread_master *master, const char *name)
+{
+       pthread_mutex_lock(&master->mtx);
+       {
+               if (master->name)
+                       XFREE(MTYPE_THREAD_MASTER, master->name);
+               master->name = XSTRDUP(MTYPE_THREAD_MASTER, name);
+       }
+       pthread_mutex_unlock(&master->mtx);
+}
+
 /* Add a new thread to the list.  */
 static void thread_list_add(struct thread_list *list, struct thread *thread)
 {
index c830446e10209f4ead167c06729fae3d757eef41..f7c110914dcaa1105615b523d9c9fc0add8f3dc7 100644 (file)
@@ -174,6 +174,7 @@ struct cpu_thread_history {
 
 /* Prototypes. */
 extern struct thread_master *thread_master_create(const char *);
+void thread_master_set_name(struct thread_master *master, const char *name);
 extern void thread_master_free(struct thread_master *);
 extern void thread_master_free_unused(struct thread_master *);
 
index f8e5a9790415e5bade32e016350c230df30500f9..6002aee5144262fad2326ce933c2b8786c2a4012 100644 (file)
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -33,6 +33,7 @@
 #include "memory.h"
 #include "command.h"
 #include "ns.h"
+#include "privs.h"
 
 /* default VRF ID value used when VRF backend is not NETNS */
 #define VRF_DEFAULT_INTERNAL 0
@@ -52,6 +53,7 @@ struct vrf_id_head vrfs_by_id = RB_INITIALIZER(&vrfs_by_id);
 struct vrf_name_head vrfs_by_name = RB_INITIALIZER(&vrfs_by_name);
 
 static int vrf_backend;
+static struct zebra_privs_t *vrf_daemon_privs;
 
 /*
  * Turn on/off debug code
@@ -690,14 +692,24 @@ DEFUN_NOSH (vrf_netns,
            "Attach VRF to a Namespace\n"
            "The file name in " NS_RUN_DIR ", or a full pathname\n")
 {
-       int idx_name = 1;
+       int idx_name = 1, ret;
        char *pathname = ns_netns_pathname(vty, argv[idx_name]->arg);
 
        VTY_DECLVAR_CONTEXT(vrf, vrf);
 
        if (!pathname)
                return CMD_WARNING_CONFIG_FAILED;
-       return vrf_netns_handler_create(vty, vrf, pathname, NS_UNKNOWN);
+
+       if (vrf_daemon_privs &&
+           vrf_daemon_privs->change(ZPRIVS_RAISE))
+               zlog_err("%s: Can't raise privileges", __func__);
+
+       ret = vrf_netns_handler_create(vty, vrf, pathname, NS_UNKNOWN);
+
+       if (vrf_daemon_privs &&
+           vrf_daemon_privs->change(ZPRIVS_LOWER))
+               zlog_err("%s: Can't lower privileges", __func__);
+       return ret;
 }
 
 DEFUN (no_vrf_netns,
@@ -779,7 +791,8 @@ void vrf_install_commands(void)
        install_element(ENABLE_NODE, &no_vrf_debug_cmd);
 }
 
-void vrf_cmd_init(int (*writefunc)(struct vty *vty))
+void vrf_cmd_init(int (*writefunc)(struct vty *vty),
+                 struct zebra_privs_t *daemon_privs)
 {
        install_element(CONFIG_NODE, &vrf_cmd);
        install_element(CONFIG_NODE, &no_vrf_cmd);
@@ -787,6 +800,7 @@ void vrf_cmd_init(int (*writefunc)(struct vty *vty))
        install_default(VRF_NODE);
        if (vrf_is_backend_netns() && ns_have_netns()) {
                /* Install NS commands. */
+               vrf_daemon_privs = daemon_privs;
                install_element(VRF_NODE, &vrf_netns_cmd);
                install_element(VRF_NODE, &no_vrf_netns_cmd);
        }
index 6482740aa1e194b7350d4b1016527b34498cb510..617405a77ea701ec5e1a61570d05df11f51cda96 100644 (file)
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -242,7 +242,8 @@ extern int vrf_switchback_to_initial(void);
 
 /* VRF vty command initialisation
  */
-extern void vrf_cmd_init(int (*writefunc)(struct vty *vty));
+extern void vrf_cmd_init(int (*writefunc)(struct vty *vty),
+                        struct zebra_privs_t *daemon_priv);
 
 /* VRF vty debugging
  */
index d4ff3ee6ce63a05afce2708d53779788a8dd3d8f..1af51c06c130ab06c0989a21ce088c8999c0e9a2 100644 (file)
@@ -101,7 +101,7 @@ struct work_queue *work_queue_new(struct thread_master *m,
        return new;
 }
 
-void work_queue_free(struct work_queue *wq)
+void work_queue_free_original(struct work_queue *wq)
 {
        if (wq->thread != NULL)
                thread_cancel(wq->thread);
@@ -119,6 +119,12 @@ void work_queue_free(struct work_queue *wq)
        return;
 }
 
+void work_queue_free_and_null(struct work_queue **wq)
+{
+       work_queue_free_original(*wq);
+       *wq = NULL;
+}
+
 bool work_queue_is_scheduled(struct work_queue *wq)
 {
        return (wq->thread != NULL);
index de49cb87fb925d23ebf0a6662e696d073b286d1a..c9785de09a5bc1d5d0539e84c6a68c027e143b9a 100644 (file)
@@ -28,7 +28,7 @@
 DECLARE_MTYPE(WORK_QUEUE)
 
 /* Hold time for the initial schedule of a queue run, in  millisec */
-#define WORK_QUEUE_DEFAULT_HOLD  50 
+#define WORK_QUEUE_DEFAULT_HOLD 50
 
 /* action value, for use by item processor and item error handlers */
 typedef enum {
@@ -148,8 +148,22 @@ static inline void work_queue_item_dequeue(struct work_queue *wq,
  * anything to it
  */
 extern struct work_queue *work_queue_new(struct thread_master *, const char *);
+
 /* destroy work queue */
-extern void work_queue_free(struct work_queue *);
+/*
+ * The usage of work_queue_free is being transitioned to pass
+ * in the double pointer to remove use after free's.
+ */
+#if CONFDATE > 20190205
+CPP_NOTICE("work_queue_free without double pointer is deprecated, please fixup")
+#endif
+extern void work_queue_free_and_null(struct work_queue **);
+extern void work_queue_free_original(struct work_queue *);
+#define work_queue_free(X)                                                     \
+       do {                                                                   \
+               work_queue_free_original((X));                                 \
+               CPP_WARN("Please use work_queue_free_and_null");               \
+       } while (0)
 
 /* Add the supplied data as an item onto the workqueue */
 extern void work_queue_add(struct work_queue *, void *);
index f853824bbba3d819a0b3d0f4bb0b130f68b3ddf3..2cac71ac45a37e1d78b0499cdf067854ac030f81 100644 (file)
@@ -322,6 +322,18 @@ stream_failure:
        return 0;
 }
 
+bool zapi_parse_header(struct stream *zmsg, struct zmsghdr *hdr)
+{
+       STREAM_GETW(zmsg, hdr->length);
+       STREAM_GETC(zmsg, hdr->marker);
+       STREAM_GETC(zmsg, hdr->version);
+       STREAM_GETL(zmsg, hdr->vrf_id);
+       STREAM_GETW(zmsg, hdr->command);
+       return true;
+stream_failure:
+       return false;
+}
+
 /* Send simple Zebra message. */
 static int zebra_message_send(struct zclient *zclient, int command,
                              vrf_id_t vrf_id)
@@ -427,7 +439,7 @@ void zclient_send_reg_requests(struct zclient *zclient, vrf_id_t vrf_id)
                }
        }
 
-       /* Flush all redistribute request. */
+       /* Resend all redistribute request. */
        for (afi = AFI_IP; afi < AFI_MAX; afi++)
                for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
                        if (i != zclient->redist_default
@@ -1058,6 +1070,8 @@ int zapi_route_encode(u_char cmd, struct stream *s, struct zapi_route *api)
                stream_putl(s, api->tag);
        if (CHECK_FLAG(api->message, ZAPI_MESSAGE_MTU))
                stream_putl(s, api->mtu);
+       if (CHECK_FLAG(api->message, ZAPI_MESSAGE_TABLEID))
+               stream_putl(s, api->tableid);
 
        /* Put length at the first point of the stream. */
        stream_putw_at(s, 0, stream_get_endp(s));
@@ -1207,6 +1221,8 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
                STREAM_GETL(s, api->tag);
        if (CHECK_FLAG(api->message, ZAPI_MESSAGE_MTU))
                STREAM_GETL(s, api->mtu);
+       if (CHECK_FLAG(api->message, ZAPI_MESSAGE_TABLEID))
+               STREAM_GETL(s, api->tableid);
 
 stream_failure:
        return 0;
@@ -1233,6 +1249,35 @@ stream_failure:
        return false;
 }
 
+bool zapi_rule_notify_decode(struct stream *s, uint32_t *seqno,
+                            uint32_t *priority, uint32_t *unique,
+                            ifindex_t *ifindex,
+                            enum zapi_rule_notify_owner *note)
+{
+       uint32_t prio, seq, uni;
+       ifindex_t ifi;
+
+       STREAM_GET(note, s, sizeof(*note));
+
+       STREAM_GETL(s, seq);
+       STREAM_GETL(s, prio);
+       STREAM_GETL(s, uni);
+       STREAM_GETL(s, ifi);
+
+       if (zclient_debug)
+               zlog_debug("%s: %u %u %u %u", __PRETTY_FUNCTION__,
+                          seq, prio, uni, ifi);
+       *seqno = seq;
+       *priority = prio;
+       *unique = uni;
+       *ifindex = ifi;
+
+       return true;
+
+stream_failure:
+       return false;
+}
+
 struct nexthop *nexthop_from_zapi_nexthop(struct zapi_nexthop *znh)
 {
        struct nexthop *n = nexthop_new();
@@ -1295,6 +1340,16 @@ bool zapi_nexthop_update_decode(struct stream *s, struct zapi_route *nhr)
                case NEXTHOP_TYPE_BLACKHOLE:
                        break;
                }
+               STREAM_GETC(s, nhr->nexthops[i].label_num);
+               if (nhr->nexthops[i].label_num > MPLS_MAX_LABELS) {
+                       zlog_warn("%s: invalid number of MPLS labels (%u)",
+                                 __func__, nhr->nexthops[i].label_num);
+                       return false;
+               }
+               if (nhr->nexthops[i].label_num)
+                       STREAM_GET(&nhr->nexthops[i].labels[0], s,
+                                  nhr->nexthops[i].label_num
+                                  * sizeof(mpls_label_t));
        }
 
        return true;
@@ -2377,6 +2432,10 @@ static int zclient_read(struct thread *thread)
                        (*zclient->route_notify_owner)(command, zclient, length,
                                                       vrf_id);
                break;
+       case ZEBRA_RULE_NOTIFY_OWNER:
+               if (zclient->rule_notify_owner)
+                       (*zclient->rule_notify_owner)(command, zclient, length,
+                                                     vrf_id);
        default:
                break;
        }
index e0b39c88e89b9e4bd7afa0aac4f978fd6242ae13..80334884440fda801eb8fc7194a909156d8467f5 100644 (file)
@@ -129,6 +129,9 @@ typedef enum {
        ZEBRA_PW_SET,
        ZEBRA_PW_UNSET,
        ZEBRA_PW_STATUS_UPDATE,
+       ZEBRA_RULE_ADD,
+       ZEBRA_RULE_DELETE,
+       ZEBRA_RULE_NOTIFY_OWNER,
 } zebra_message_types_t;
 
 struct redist_proto {
@@ -215,6 +218,8 @@ struct zclient {
        int (*pw_status_update)(int, struct zclient *, uint16_t, vrf_id_t);
        int (*route_notify_owner)(int command, struct zclient *zclient,
                                  uint16_t length, vrf_id_t vrf_id);
+       int (*rule_notify_owner)(int command, struct zclient *zclient,
+                                uint16_t length, vrf_id_t vrf_id);
 };
 
 /* Zebra API message flag. */
@@ -225,15 +230,20 @@ struct zclient {
 #define ZAPI_MESSAGE_MTU      0x10
 #define ZAPI_MESSAGE_SRCPFX   0x20
 #define ZAPI_MESSAGE_LABEL    0x40
+/*
+ * This should only be used by a DAEMON that needs to communicate
+ * the table being used is not in the VRF.  You must pass the
+ * default vrf, else this will be ignored.
+ */
+#define ZAPI_MESSAGE_TABLEID  0x80
 
+#define ZSERV_VERSION 5
 /* Zserv protocol message header */
-struct zserv_header {
+struct zmsghdr {
        uint16_t length;
-       uint8_t marker; /* corresponds to command field in old zserv
-                        * always set to 255 in new zserv.
-                        */
+       /* Always set to 255 in new zserv */
+       uint8_t marker;
        uint8_t version;
-#define ZSERV_VERSION  5
        vrf_id_t vrf_id;
        uint16_t command;
 };
@@ -289,6 +299,8 @@ struct zapi_route {
 
        vrf_id_t vrf_id;
 
+       uint32_t tableid;
+
        struct ethaddr rmac;
 };
 
@@ -346,6 +358,14 @@ enum zapi_route_notify_owner {
        ZAPI_ROUTE_FAIL_INSTALL,
        ZAPI_ROUTE_BETTER_ADMIN_WON,
        ZAPI_ROUTE_INSTALLED,
+       ZAPI_ROUTE_REMOVED,
+       ZAPI_ROUTE_REMOVE_FAIL,
+};
+
+enum zapi_rule_notify_owner {
+       ZAPI_RULE_FAIL_INSTALL,
+       ZAPI_RULE_INSTALLED,
+       ZAPI_RULE_REMOVED,
 };
 
 /* Zebra MAC types */
@@ -359,9 +379,11 @@ struct zclient_options {
 /* Prototypes of zebra client service functions. */
 extern struct zclient *zclient_new(struct thread_master *);
 
+/* clang-format off */
 #if CONFDATE > 20181101
 CPP_NOTICE("zclient_new_notify can take over or zclient_new now");
 #endif
+/* clang-format on */
 
 extern struct zclient_options zclient_options_default;
 
@@ -428,9 +450,58 @@ extern int zclient_send_message(struct zclient *);
 
 /* create header for command, length to be filled in by user later */
 extern void zclient_create_header(struct stream *, uint16_t, vrf_id_t);
+/*
+ * Read sizeof(struct zmsghdr) bytes from the provided socket and parse the
+ * received data into the specified fields. If this is successful, read the
+ * rest of the packet into the provided stream.
+ *
+ * s
+ *    The stream to read into
+ *
+ * sock
+ *    The socket to read from
+ *
+ * size
+ *    Parsed message size will be placed in the pointed-at integer
+ *
+ * marker
+ *    Parsed marker will be placed in the pointed-at byte
+ *
+ * version
+ *    Parsed version will be placed in the pointed-at byte
+ *
+ * vrf_id
+ *    Parsed VRF ID will be placed in the pointed-at vrf_id_t
+ *
+ * cmd
+ *    Parsed command number will be placed in the pointed-at integer
+ *
+ * Returns:
+ *    -1 if:
+ *    - insufficient data for header was read
+ *    - a version mismatch was detected
+ *    - a marker mismatch was detected
+ *    - header size field specified more data than could be read
+ */
 extern int zclient_read_header(struct stream *s, int sock, u_int16_t *size,
                               u_char *marker, u_char *version,
                               vrf_id_t *vrf_id, u_int16_t *cmd);
+/*
+ * Parse header from ZAPI message stream into struct zmsghdr.
+ * This function assumes the stream getp points at the first byte of the header.
+ * If the function is successful then the stream getp will point to the byte
+ * immediately after the last byte of the header.
+ *
+ * zmsg
+ *    The stream containing the header
+ *
+ * hdr
+ *    The header struct to parse into.
+ *
+ * Returns:
+ *    true if parsing succeeded, false otherwise
+ */
+extern bool zapi_parse_header(struct stream *zmsg, struct zmsghdr *hdr);
 
 extern void zclient_interface_set_master(struct zclient *client,
                                         struct interface *master,
@@ -447,10 +518,11 @@ extern struct interface *zebra_interface_vrf_update_read(struct stream *s,
 extern void zebra_interface_if_set_value(struct stream *, struct interface *);
 extern void zebra_router_id_update_read(struct stream *s, struct prefix *rid);
 
+/* clang-format off */
 #if CONFDATE > 20180823
-CPP_NOTICE(
-       "zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
+CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
 #endif
+/* clang-format on */
 
 extern int zapi_ipv4_route(u_char, struct zclient *, struct prefix_ipv4 *,
                           struct zapi_ipv4 *) __attribute__((deprecated));
@@ -518,6 +590,10 @@ extern int zapi_route_decode(struct stream *, struct zapi_route *);
 bool zapi_route_notify_decode(struct stream *s, struct prefix *p,
                              uint32_t *tableid,
                              enum zapi_route_notify_owner *note);
+bool zapi_rule_notify_decode(struct stream *s, uint32_t *seqno,
+                            uint32_t *priority, uint32_t *unique,
+                            ifindex_t *ifindex,
+                            enum zapi_rule_notify_owner *note);
 extern struct nexthop *nexthop_from_zapi_nexthop(struct zapi_nexthop *znh);
 extern bool zapi_nexthop_update_decode(struct stream *s,
                                       struct zapi_route *nhr);
index df367bd27bd9eeb0e0b72229990e031c15086a5c..923f6f77c6603f46560a3c3269ee9b3fe5aaec79 100644 (file)
@@ -232,10 +232,12 @@ typedef unsigned char u_int8_t;
 #include "zassert.h"
 
 #ifndef HAVE_STRLCAT
-size_t strlcat(char *__restrict dest, const char *__restrict src, size_t size);
+size_t strlcat(char *__restrict dest,
+              const char *__restrict src, size_t destsize);
 #endif
 #ifndef HAVE_STRLCPY
-size_t strlcpy(char *__restrict dest, const char *__restrict src, size_t size);
+size_t strlcpy(char *__restrict dest,
+              const char *__restrict src, size_t destsize);
 #endif
 
 #ifdef HAVE_BROKEN_CMSG_FIRSTHDR
@@ -481,6 +483,16 @@ typedef enum {
 #define UNSET_FLAG(V,F)      (V) &= ~(F)
 #define RESET_FLAG(V)        (V) = 0
 
+/* Atomic flag manipulation macros. */
+#define CHECK_FLAG_ATOMIC(PV, F)                                               \
+       ((atomic_load_explicit(PV, memory_order_seq_cst)) & (F))
+#define SET_FLAG_ATOMIC(PV, F)                                                 \
+       ((atomic_fetch_or_explicit(PV, (F), memory_order_seq_cst)))
+#define UNSET_FLAG_ATOMIC(PV, F)                                               \
+       ((atomic_fetch_and_explicit(PV, ~(F), memory_order_seq_cst)))
+#define RESET_FLAG_ATOMIC(PV)                                                  \
+       ((atomic_store_explicit(PV, 0, memory_order_seq_cst)))
+
 /* Zebra types. Used in Zserv message header. */
 typedef u_int16_t zebra_size_t;
 typedef u_int16_t zebra_command_t;
index 88f03d8f646ec1d0d49b0bdc07e8cd3815e1f280..9580d87cf031c365431bf8a43a68923dd422e77d 100644 (file)
@@ -202,6 +202,9 @@ int main(int argc, char *argv[], char *envp[])
                exit(1);
        }
 
+       /* OSPF6 master init. */
+       ospf6_master_init();
+
        /* thread master */
        master = frr_init();
 
index b75d5b70fa5b8e3b6c0e3f0ebba2ec920d94a7f6..f32cd6e7e3b14d1e98ff3615b0bdeafb42af0371 100644 (file)
@@ -1573,7 +1573,8 @@ int ospf6_receive(struct thread *thread)
        oi = ospf6_interface_lookup_by_ifindex(ifindex);
        if (oi == NULL || oi->area == NULL
            || CHECK_FLAG(oi->flag, OSPF6_INTERFACE_DISABLE)) {
-               zlog_debug("Message received on disabled interface");
+               if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_UNKNOWN, RECV))
+                       zlog_debug("Message received on disabled interface");
                return 0;
        }
        if (CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE)) {
index 2e14425752ae1ef6b86c3b144892eddb358c8099..630b717fb3350082ab796bc12f6facacf799c5df 100644 (file)
@@ -53,6 +53,8 @@ DEFINE_QOBJ_TYPE(ospf6)
 
 /* global ospf6d variable */
 struct ospf6 *ospf6;
+static struct ospf6_master ospf6_master;
+struct ospf6_master *om6;
 
 static void ospf6_disable(struct ospf6 *o);
 
@@ -239,6 +241,13 @@ static void ospf6_disable(struct ospf6 *o)
        }
 }
 
+void ospf6_master_init(void)
+{
+       memset(&ospf6_master, 0, sizeof(struct ospf6_master));
+
+       om6 = &ospf6_master;
+}
+
 static int ospf6_maxage_remover(struct thread *thread)
 {
        struct ospf6 *o = (struct ospf6 *)THREAD_ARG(thread);
@@ -294,6 +303,17 @@ void ospf6_maxage_remove(struct ospf6 *o)
                                 &o->maxage_remover);
 }
 
+void ospf6_router_id_update(void)
+{
+       if (!ospf6)
+               return;
+
+       if (ospf6->router_id_static != 0)
+               ospf6->router_id = ospf6->router_id_static;
+       else
+               ospf6->router_id = om6->zebra_router_id;
+}
+
 /* start ospf6 */
 DEFUN_NOSH (router_ospf6,
        router_ospf6_cmd,
@@ -301,9 +321,11 @@ DEFUN_NOSH (router_ospf6,
        ROUTER_STR
        OSPF6_STR)
 {
-       if (ospf6 == NULL)
+       if (ospf6 == NULL) {
                ospf6 = ospf6_create();
-
+               if (ospf6->router_id == 0)
+                       ospf6_router_id_update();
+       }
        /* set current ospf point. */
        VTY_PUSH_CONTEXT(OSPF6_NODE, ospf6);
 
index d7a3766b80498676b255c183f66c2d9473a0d16c..3ffcad0564c1bd41fe077ddcfb8063ca728a142f 100644 (file)
 #include "qobj.h"
 #include "routemap.h"
 
+struct ospf6_master {
+
+       uint32_t zebra_router_id;
+};
+
 /* OSPFv3 top level data structure */
 struct ospf6 {
        /* my router id */
@@ -109,10 +114,13 @@ DECLARE_QOBJ_TYPE(ospf6)
 
 /* global pointer for OSPF top data structure */
 extern struct ospf6 *ospf6;
+extern struct ospf6_master *om6;
 
 /* prototypes */
+extern void ospf6_master_init(void);
 extern void ospf6_top_init(void);
 extern void ospf6_delete(struct ospf6 *o);
+extern void ospf6_router_id_update(void);
 
 extern void ospf6_maxage_remove(struct ospf6 *o);
 
index 4fb959b952e63dbf64c0741878e9a7c1058e8587..0decc09a29abe584ff2583dad1962a9653cc1b7b 100644 (file)
@@ -55,13 +55,22 @@ static int ospf6_router_id_update_zebra(int command, struct zclient *zclient,
 
        zebra_router_id_update_read(zclient->ibuf, &router_id);
 
+       om6->zebra_router_id = router_id.u.prefix4.s_addr;
+
        if (o == NULL)
                return 0;
 
        o->router_id_zebra = router_id.u.prefix4;
+       if (IS_OSPF6_DEBUG_ZEBRA(RECV)) {
+               char buf[INET_ADDRSTRLEN];
+
+               zlog_debug("%s: zebra router-id %s update",
+                          __PRETTY_FUNCTION__,
+                          inet_ntop(AF_INET, &router_id.u.prefix4,
+                                    buf, INET_ADDRSTRLEN));
+       }
 
-       if (o->router_id == 0)
-               o->router_id = (uint32_t)o->router_id_zebra.s_addr;
+       ospf6_router_id_update();
 
        return 0;
 }
index f0d800efb4b959657afa74fe6f1cf08bc9945e8a..752c875a622136a8e523968d0e02b27e4c44b0bf 100644 (file)
@@ -15,4 +15,3 @@ TAGS
 *~
 *.loT
 *.a
-*clippy.c
index 3b257fec96f54840412684bbc8790526a4adfaba..e322f605097cf2d6eaf5fe3ac8616043e37c2144 100644 (file)
@@ -949,6 +949,14 @@ static int ospf_zebra_read_route(int command, struct zclient *zclient,
        if (IPV4_NET127(ntohl(p.prefix.s_addr)))
                return 0;
 
+       if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE)) {
+               char buf_prefix[PREFIX_STRLEN];
+               prefix2str(&api.prefix, buf_prefix, sizeof(buf_prefix));
+
+               zlog_debug("%s: from client %s: vrf_id %d, p %s", __func__,
+                          zebra_route_string(api.type), vrf_id, buf_prefix);
+       }
+
        if (command == ZEBRA_REDISTRIBUTE_ROUTE_ADD) {
                /* XXX|HACK|TODO|FIXME:
                 * Maybe we should ignore reject/blackhole routes? Testing
@@ -1455,8 +1463,6 @@ void ospf_zebra_vrf_register(struct ospf *ospf)
                                   __PRETTY_FUNCTION__,
                                   ospf_vrf_id_to_name(ospf->vrf_id),
                                   ospf->vrf_id);
-               /* Deregister for router-id, interfaces,
-                * redistributed routes. */
                zclient_send_reg_requests(zclient, ospf->vrf_id);
        }
 }
index c8a4dc12cdc6991d7ccbb19ee08bbd70159ec0cf..26bbc5ee11cd9d4133b7d4ff1613f26ec8fe0d49 100644 (file)
@@ -2049,6 +2049,23 @@ static int ospf_vrf_delete(struct vrf *vrf)
        return 0;
 }
 
+static void ospf_set_redist_vrf_bitmaps(struct ospf *ospf)
+{
+       int type;
+       struct list *red_list;
+
+       for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
+               red_list = ospf->redist[type];
+               if (!red_list)
+                       continue;
+               if (IS_DEBUG_OSPF_EVENT)
+                       zlog_debug(
+                               "%s: setting redist vrf %d bitmap for type %d",
+                               __func__, ospf->vrf_id, type);
+               vrf_bitmap_set(zclient->redist[AFI_IP][type], ospf->vrf_id);
+       }
+}
+
 /* Enable OSPF VRF instance */
 static int ospf_vrf_enable(struct vrf *vrf)
 {
@@ -2077,6 +2094,15 @@ static int ospf_vrf_enable(struct vrf *vrf)
                                        "ospf_sock_init: could not raise privs, %s",
                                        safe_strerror(errno));
                        }
+
+                       /* stop zebra redist to us for old vrf */
+                       zclient_send_dereg_requests(zclient, old_vrf_id);
+
+                       ospf_set_redist_vrf_bitmaps(ospf);
+
+                       /* start zebra redist to us for new vrf */
+                       ospf_zebra_vrf_register(ospf);
+
                        ret = ospf_sock_init(ospf);
                        if (ospfd_privs.change(ZPRIVS_LOWER)) {
                                zlog_err(
@@ -2088,7 +2114,6 @@ static int ospf_vrf_enable(struct vrf *vrf)
                        thread_add_read(master, ospf_read, ospf, ospf->fd,
                                        &ospf->t_read);
                        ospf->oi_running = 1;
-                       ospf_zebra_vrf_register(ospf);
                        ospf_router_id_update(ospf);
                }
        }
index 337d420d345cac0e6de8aa9dc759580256304e62..5c8229175a65a7e87094a01338c72224017dd70a 100644 (file)
@@ -37,6 +37,7 @@
 #include <net/if.h>
 #include <unistd.h>
 #include <getopt.h>
+#include <netdb.h>
 
 #define MTRACEBIS_VERSION "0.1"
 #define MTRACE_TIMEOUT (5)
@@ -56,6 +57,160 @@ static void version(void)
        fprintf(stderr, "%s %s\n", progname, MTRACEBIS_VERSION);
 }
 
+static void print_host(struct in_addr addr)
+{
+       struct hostent *h;
+
+       h = gethostbyaddr(&addr, sizeof(addr), AF_INET);
+       if (h == NULL)
+               printf("?");
+       else
+               printf("%s", h->h_name);
+       printf(" (%s) ", inet_ntoa(addr));
+}
+
+static void print_line_no(int i)
+{
+       printf("%3d  ", -i);
+}
+
+static const char *rtg_proto_str(enum mtrace_rtg_proto proto)
+{
+       static char buf[80];
+
+       buf[0] = '\0';
+
+       switch (proto) {
+       case MTRACE_RTG_PROTO_DVMRP:
+               return "DVMRP";
+       case MTRACE_RTG_PROTO_MOSPF:
+               return "MOSPF";
+       case MTRACE_RTG_PROTO_PIM:
+               return "PIM";
+       case MTRACE_RTG_PROTO_CBT:
+               return "CBT";
+       case MTRACE_RTG_PROTO_PIM_SPECIAL:
+               return "PIM special";
+       case MTRACE_RTG_PROTO_PIM_STATIC:
+               return "PIM static";
+       case MTRACE_RTG_PROTO_DVMRP_STATIC:
+               return "DVMRP static";
+       case MTRACE_RTG_PROTO_PIM_MBGP:
+               return "PIM MBGP";
+       case MTRACE_RTG_PROTO_CBT_SPECIAL:
+               return "CBT special";
+       case MTRACE_RTG_PROTO_CBT_STATIC:
+               return "CBT static";
+       case MTRACE_RTG_PROTO_PIM_ASSERT:
+               return "PIM assert";
+       default:
+               sprintf(buf, "unknown protocol (%d)", proto);
+               return buf;
+       }
+}
+
+static void print_rtg_proto(uint32_t rtg_proto)
+{
+       printf("%s", rtg_proto_str(rtg_proto));
+}
+
+static void print_fwd_ttl(uint32_t fwd_ttl)
+{
+       printf("thresh^ %d", fwd_ttl);
+}
+
+static const char *fwd_code_str(enum mtrace_fwd_code code)
+{
+       static char buf[80];
+
+       buf[0] = '\0';
+
+       switch (code) {
+       case MTRACE_FWD_CODE_NO_ERROR:
+               return "no error";
+       case MTRACE_FWD_CODE_WRONG_IF:
+               return "wrong interface";
+       case MTRACE_FWD_CODE_PRUNE_SENT:
+               return "prune sent";
+       case MTRACE_FWD_CODE_PRUNE_RCVD:
+               return "prune received";
+       case MTRACE_FWD_CODE_SCOPED:
+               return "scoped";
+       case MTRACE_FWD_CODE_NO_ROUTE:
+               return "no route";
+       case MTRACE_FWD_CODE_WRONG_LAST_HOP:
+               return "wrong last hop";
+       case MTRACE_FWD_CODE_NOT_FORWARDING:
+               return "not forwarding";
+       case MTRACE_FWD_CODE_REACHED_RP:
+               return "reached RP";
+       case MTRACE_FWD_CODE_RPF_IF:
+               return "RPF interface";
+       case MTRACE_FWD_CODE_NO_MULTICAST:
+               return "no multicast";
+       case MTRACE_FWD_CODE_INFO_HIDDEN:
+               return "info hidden";
+       case MTRACE_FWD_CODE_NO_SPACE:
+               return "no space";
+       case MTRACE_FWD_CODE_OLD_ROUTER:
+               return "old router";
+       case MTRACE_FWD_CODE_ADMIN_PROHIB:
+               return "admin. prohib.";
+       default:
+               sprintf(buf, "unknown fwd. code (%d)", code);
+               return buf;
+       }
+}
+
+static void print_fwd_code(uint32_t fwd_code)
+{
+       printf("%s", fwd_code_str(fwd_code));
+}
+
+static void print_rsp(struct igmp_mtrace_rsp *rsp)
+{
+       print_host(rsp->outgoing);
+       if (rsp->fwd_code == 0) {
+               print_rtg_proto(rsp->rtg_proto);
+               printf(" ");
+               print_fwd_ttl(rsp->fwd_ttl);
+       } else {
+               print_fwd_code(rsp->fwd_code);
+       }
+       printf("\n");
+}
+
+static void print_dest(struct igmp_mtrace *mtrace)
+{
+       print_line_no(0);
+       print_host(mtrace->dst_addr);
+       printf("\n");
+}
+
+static void print_summary(struct igmp_mtrace *mtrace, int hops, long msec)
+{
+       int i;
+       int t = 0;
+
+       for (i = 0; i < hops; i++)
+               t += mtrace->rsp[i].fwd_ttl;
+
+       printf("Round trip time %ld ms; total ttl of %d required.\n", msec, t);
+}
+
+static void print_responses(struct igmp_mtrace *mtrace, int hops, long msec)
+{
+       int i;
+
+       print_dest(mtrace);
+
+       for (i = 0; i < hops; i++) {
+               print_line_no(i + 1);
+               print_rsp(&mtrace->rsp[i]);
+       }
+       print_summary(mtrace, hops, msec);
+}
+
 static int send_query(int fd, struct in_addr to_addr,
                      struct igmp_mtrace *mtrace)
 {
@@ -88,7 +243,7 @@ static void print_query(struct igmp_mtrace *mtrace)
               inet_ntop(AF_INET, &mtrace->grp_addr, grp_str, sizeof(grp_str)));
 }
 
-static int recv_response(int fd, long msec, int *hops)
+static int recv_response(int fd, int *hops, struct igmp_mtrace *mtracer)
 {
        int recvd;
        char mtrace_buf[IP_AND_MTRACE_BUF_LEN];
@@ -96,7 +251,6 @@ static int recv_response(int fd, long msec, int *hops)
        struct igmp_mtrace *mtrace;
        int mtrace_len;
        int responses;
-       int i;
        u_short sum;
 
        recvd = recvfrom(fd, mtrace_buf, IP_AND_MTRACE_BUF_LEN, 0, NULL, 0);
@@ -145,22 +299,22 @@ static int recv_response(int fd, long msec, int *hops)
        responses = mtrace_len - sizeof(struct igmp_mtrace);
        responses /= sizeof(struct igmp_mtrace_rsp);
 
-       printf("%ld ms received responses from %d hops.\n", msec, responses);
+       if (responses > MTRACE_MAX_HOPS) {
+               fprintf(stderr, "mtrace too large\n");
+               return -1;
+       }
 
        if (hops)
                *hops = responses;
 
-       for (i = 0; i < responses; i++) {
-               struct igmp_mtrace_rsp *rsp = &mtrace->rsp[i];
-
-               if (rsp->fwd_code != 0)
-                       printf("-%d fwd. code 0x%2x.\n", i, rsp->fwd_code);
-       }
+       if (mtracer)
+               memcpy(mtracer, mtrace, mtrace_len);
 
        return 0;
 }
 
-static int wait_for_response(int fd, int *hops)
+static int wait_for_response(int fd, int *hops, struct igmp_mtrace *mtrace,
+                            long *ret_msec)
 {
        fd_set readfds;
        struct timeval timeout;
@@ -181,11 +335,19 @@ static int wait_for_response(int fd, int *hops)
                        return ret;
                rmsec = timeout.tv_sec * 1000 + timeout.tv_usec / 1000;
                msec = tmsec - rmsec;
-       } while (recv_response(fd, msec, hops) != 0);
+       } while (recv_response(fd, hops, mtrace) != 0);
+
+       if (ret_msec)
+               *ret_msec = msec;
 
        return ret;
 }
 
+static bool check_end(struct igmp_mtrace *mtrace, int hops)
+{
+       return mtrace->src_addr.s_addr == mtrace->rsp[hops - 1].prev_hop.s_addr;
+}
+
 int main(int argc, char *const argv[])
 {
        struct in_addr mc_source;
@@ -193,6 +355,7 @@ int main(int argc, char *const argv[])
        struct in_addr gw_addr;
        struct in_addr mtrace_addr;
        struct igmp_mtrace mtrace;
+       struct igmp_mtrace *mtracep;
        int hops = 255;
        int rhops;
        int maxhops = 255;
@@ -203,9 +366,10 @@ int main(int argc, char *const argv[])
        int fd = -1;
        int ret = -1;
        int c;
+       long msec;
        int i, j;
        char ifname[IF_NAMESIZE];
-       char ip_str[INET_ADDRSTRLEN];
+       char mbuf[MTRACE_BUF_LEN];
 
        mtrace_addr.s_addr = inet_addr("224.0.1.32");
 
@@ -312,8 +476,10 @@ int main(int argc, char *const argv[])
                goto close_fd;
        }
        printf("Querying full reverse path...\n");
-       ret = wait_for_response(fd, NULL);
+       mtracep = (struct igmp_mtrace *)mbuf;
+       ret = wait_for_response(fd, &rhops, mtracep, &msec);
        if (ret > 0) {
+               print_responses(mtracep, rhops, msec);
                ret = 0;
                goto close_fd;
        }
@@ -325,10 +491,9 @@ int main(int argc, char *const argv[])
        }
        printf(" * ");
        printf("switching to hop-by-hop:\n");
-       printf("%3d  ? (%s)\n", 0,
-              inet_ntop(AF_INET, &mtrace.dst_addr, ip_str, sizeof(ip_str)));
+       print_dest(&mtrace);
        for (i = 1; i < maxhops; i++) {
-               printf("%3d ", -i);
+               print_line_no(i);
                mtrace.hops = i;
                for (j = 0; j < perhop; j++) {
                        mtrace.qry_id++;
@@ -340,12 +505,20 @@ int main(int argc, char *const argv[])
                                ret = EXIT_FAILURE;
                                goto close_fd;
                        }
-                       ret = wait_for_response(fd, &rhops);
+                       ret = wait_for_response(fd, &rhops, mtracep, &msec);
                        if (ret > 0) {
+                               if (check_end(mtracep, rhops)) {
+                                       print_rsp(&mtracep->rsp[rhops - 1]);
+                                       print_summary(mtracep, rhops, msec);
+                                       ret = 0;
+                                       goto close_fd;
+                               }
                                if (i > rhops) {
+                                       printf(" * ...giving up.\n");
                                        ret = 0;
                                        goto close_fd;
                                }
+                               print_rsp(&mtracep->rsp[rhops - 1]);
                                break;
                        }
                        printf(" *");
index 60027946587dae86fd32977dd081e2bffb452606..803e7bb01325c586553d62f47e3dcd1c9174f979 100644 (file)
@@ -604,11 +604,18 @@ static void igmp_show_interfaces(struct pim_instance *pim, struct vty *vty,
                                json_object_object_add(json, ifp->name,
                                                       json_row);
 
+                               if (igmp->mtrace_only) {
+                                       json_object_boolean_true_add(
+                                               json_row, "mtraceOnly");
+                               }
                        } else {
                                vty_out(vty,
                                        "%-9s  %5s  %15s  %d  %7s  %11s  %8s\n",
                                        ifp->name,
-                                       if_is_up(ifp) ? "up" : "down",
+                                       if_is_up(ifp)
+                                               ? (igmp->mtrace_only ? "mtrc"
+                                                                    : "up")
+                                               : "down",
                                        inet_ntoa(igmp->ifaddr),
                                        pim_ifp->igmp_version,
                                        igmp->t_igmp_query_timer ? "local"
@@ -758,10 +765,17 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
                                json_object_object_add(json, ifp->name,
                                                       json_row);
 
+                               if (igmp->mtrace_only) {
+                                       json_object_boolean_true_add(
+                                               json_row, "mtraceOnly");
+                               }
                        } else {
                                vty_out(vty, "Interface : %s\n", ifp->name);
                                vty_out(vty, "State     : %s\n",
-                                       if_is_up(ifp) ? "up" : "down");
+                                       if_is_up(ifp)
+                                               ? (igmp->mtrace_only ? "mtrace"
+                                                                    : "up")
+                                               : "down");
                                vty_out(vty, "Address   : %s\n",
                                        inet_ntoa(pim_ifp->primary_address));
                                vty_out(vty, "Uptime    : %s\n", uptime);
index 998f8fc2caa6082407a70a54b5d6d87c15bda99b..ff7238ae97bec4339edfbef81db2413354f81543 100644 (file)
@@ -574,7 +574,11 @@ void pim_if_addr_add(struct connected *ifc)
                        /* if addr new, add IGMP socket */
                        if (ifc->address->family == AF_INET)
                                pim_igmp_sock_add(pim_ifp->igmp_socket_list,
-                                                 ifaddr, ifp);
+                                                 ifaddr, ifp, false);
+               } else if (igmp->mtrace_only) {
+                       igmp_sock_delete(igmp);
+                       pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr,
+                                         ifp, false);
                }
 
                /* Replay Static IGMP groups */
@@ -611,6 +615,20 @@ void pim_if_addr_add(struct connected *ifc)
                        }
                }
        } /* igmp */
+       else {
+               struct igmp_sock *igmp;
+
+               /* lookup IGMP socket */
+               igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list,
+                                                  ifaddr);
+               if (ifc->address->family == AF_INET) {
+                       if (igmp)
+                               igmp_sock_delete(igmp);
+                       /* if addr new, add IGMP socket */
+                       pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr,
+                                         ifp, true);
+               }
+       } /* igmp mtrace only */
 
        if (PIM_IF_TEST_PIM(pim_ifp->options)) {
 
index c0a58516d993ec24c61135639acbe2e2e5fd1204..5e1aecc3a389cec533e495815141c8bd545ad022 100644 (file)
@@ -281,6 +281,9 @@ static int igmp_recv_query(struct igmp_sock *igmp, int query_version,
        uint16_t recv_checksum;
        uint16_t checksum;
 
+       if (igmp->mtrace_only)
+               return 0;
+
        memcpy(&group_addr, igmp_msg + 4, sizeof(struct in_addr));
 
        ifp = igmp->interface;
@@ -387,6 +390,9 @@ static int igmp_v1_recv_report(struct igmp_sock *igmp, struct in_addr from,
 
        on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
 
+       if (igmp->mtrace_only)
+               return 0;
+
        if (igmp_msg_len != IGMP_V12_MSG_SIZE) {
                zlog_warn(
                        "Recv IGMP report v1 from %s on %s: size=%d other than correct=%d",
@@ -510,7 +516,6 @@ int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)
                return igmp_mtrace_recv_response(igmp, ip_hdr, ip_hdr->ip_src,
                                                 from_str, igmp_msg,
                                                 igmp_msg_len);
-               break;
        case PIM_IGMP_MTRACE_QUERY_REQUEST:
                return igmp_mtrace_recv_qry_req(igmp, ip_hdr, ip_hdr->ip_src,
                                                from_str, igmp_msg,
@@ -819,7 +824,7 @@ static int igmp_group_hash_equal(const void *arg1, const void *arg2)
 }
 
 static struct igmp_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
-                                      struct interface *ifp)
+                                      struct interface *ifp, int mtrace_only)
 {
        struct pim_interface *pim_ifp;
        struct igmp_sock *igmp;
@@ -862,6 +867,13 @@ static struct igmp_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
                pim_ifp->igmp_default_robustness_variable;
        igmp->sock_creation = pim_time_monotonic_sec();
 
+       if (mtrace_only) {
+               igmp->mtrace_only = mtrace_only;
+               return igmp;
+       }
+
+       igmp->mtrace_only = false;
+
        /*
          igmp_startup_mode_on() will reset QQI:
 
@@ -919,7 +931,8 @@ static void igmp_read_on(struct igmp_sock *igmp)
 
 struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
                                    struct in_addr ifaddr,
-                                   struct interface *ifp)
+                                   struct interface *ifp,
+                                   bool mtrace_only)
 {
        struct pim_interface *pim_ifp;
        struct igmp_sock *igmp;
@@ -934,7 +947,7 @@ struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
                return 0;
        }
 
-       igmp = igmp_sock_new(fd, ifaddr, ifp);
+       igmp = igmp_sock_new(fd, ifaddr, ifp, mtrace_only);
        if (!igmp) {
                zlog_err("%s %s: igmp_sock_new() failure", __FILE__,
                         __PRETTY_FUNCTION__);
index 962c50e76a66eb0f2d75d84d5c6f36d001d45762..561a127d0f1dcc963d3082675c4c96c08aac432f 100644 (file)
@@ -90,6 +90,8 @@ struct igmp_sock {
        int querier_robustness_variable; /* QRV */
        int startup_query_count;
 
+       bool mtrace_only;
+
        struct list *igmp_group_list; /* list of struct igmp_group */
        struct hash *igmp_group_hash;
 };
@@ -99,7 +101,8 @@ struct igmp_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
 struct igmp_sock *igmp_sock_lookup_by_fd(struct list *igmp_sock_list, int fd);
 struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
                                    struct in_addr ifaddr,
-                                   struct interface *ifp);
+                                   struct interface *ifp,
+                                   bool mtrace_only);
 void igmp_sock_delete(struct igmp_sock *igmp);
 void igmp_sock_free(struct igmp_sock *igmp);
 void igmp_sock_delete_all(struct interface *ifp);
index 5e2e316d850d0101d14d8d97727438ce0239c1e3..9e59dc31b6dda5cf168864df7d3da5f27f158b5e 100644 (file)
@@ -256,9 +256,11 @@ static int mtrace_un_forward_packet(struct pim_instance *pim, struct ip *ip_hdr,
        pim_socket_ip_hdr(fd);
 
        if (interface == NULL) {
+               memset(&nexthop, 0, sizeof(nexthop));
                ret = pim_nexthop_lookup(pim, &nexthop, ip_hdr->ip_dst, 0);
 
                if (ret != 0) {
+                       close(fd);
                        if (PIM_DEBUG_MTRACE)
                                zlog_warn(
                                        "Dropping mtrace packet, "
@@ -434,6 +436,7 @@ static int mtrace_send_response(struct pim_instance *pim,
                if (PIM_DEBUG_MTRACE)
                        zlog_debug("mtrace response to RP");
        } else {
+               memset(&nexthop, 0, sizeof(nexthop));
                /* TODO: should use unicast rib lookup */
                ret = pim_nexthop_lookup(pim, &nexthop, mtracep->rsp_addr, 1);
 
@@ -613,6 +616,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
 
        nh_addr.s_addr = 0;
 
+       memset(&nexthop, 0, sizeof(nexthop));
        ret = pim_nexthop_lookup(pim, &nexthop, mtracep->src_addr, 1);
 
        if (ret == 0) {
index efa36e618fa6530c8a5426a73c64e92cfb829783..dbbe83a9658842a3679cc71824969723423b1bd0 100644 (file)
@@ -111,6 +111,9 @@ int igmp_v2_recv_report(struct igmp_sock *igmp, struct in_addr from,
 
        on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
 
+       if (igmp->mtrace_only)
+               return 0;
+
        if (igmp_msg_len != IGMP_V12_MSG_SIZE) {
                zlog_warn(
                        "Recv IGMPv2 REPORT from %s on %s: size=%d other than correct=%d",
@@ -154,6 +157,9 @@ int igmp_v2_recv_leave(struct igmp_sock *igmp, struct in_addr from,
 
        on_trace(__PRETTY_FUNCTION__, igmp->interface, from);
 
+       if (igmp->mtrace_only)
+               return 0;
+
        if (igmp_msg_len != IGMP_V12_MSG_SIZE) {
                zlog_warn(
                        "Recv IGMPv2 LEAVE from %s on %s: size=%d other than correct=%d",
index ecde546c06a431ae75a0228cb8e1b72e39905cc8..3360e36b4aaff8816f35c304701c569d320706ba 100644 (file)
@@ -1874,6 +1874,9 @@ int igmp_v3_recv_report(struct igmp_sock *igmp, struct in_addr from,
        int local_ncb = 0;
        struct pim_interface *pim_ifp;
 
+       if (igmp->mtrace_only)
+               return 0;
+
        pim_ifp = igmp->interface->info;
 
        if (igmp_msg_len < IGMP_V3_MSG_MIN_SIZE) {
index f92da7fe7070b8d24f786e1c29e48cab08a5f178..60a3308a00e8ec2ec24df272bbd4c458fe902da6 100644 (file)
@@ -214,7 +214,7 @@ void pim_vrf_init(void)
 {
        vrf_init(pim_vrf_new, pim_vrf_enable, pim_vrf_disable, pim_vrf_delete);
 
-       vrf_cmd_init(pim_vrf_config_write);
+       vrf_cmd_init(pim_vrf_config_write, &pimd_privs);
 }
 
 void pim_vrf_terminate(void)
index 2de64b8f404aa5d17fbbcaed00cbcc4bd32d9863..c461e543d238b4cd23d78ae8bbe1b7b58e63b88e 100644 (file)
@@ -29,7 +29,7 @@ Building your own FRRouting RPM
         cd frr
         ./bootstrap.sh
         ./configure --with-pkg-extra-version=-MyRPMVersion
-        make dist
+        make SPHINXBUILD=sphinx-build2.7 dist
             
     Note: configure parameters are not important for the RPM building - except the `with-pkg-extra-version` if you want to give the RPM a specific name to
     mark your own unoffical build
@@ -63,11 +63,16 @@ Building your own FRRouting RPM
         %{!?with_watchfrr:      %global  with_watchfrr      1 }
         %{!?with_bgp_vnc:       %global  with_bgp_vnc       0 }
         %{!?with_pimd:          %global  with_pimd          1 }
+        %{!?with_rpki:          %global  with_rpki          0 }
 
 7. Build the RPM
 
         rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
 
+   If building with RPKI, then download and install the additional RPKI
+   packages from
+        https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+
 DONE.
 
 If all works correctly, then you should end up with the RPMs under 
index 20b96bb76ff6cf16d6e3fdf42a0ceb7c5e5d4128..14fb910219122cd1ff25d20dfe231b35a26a7bfa 100644 (file)
@@ -26,6 +26,7 @@
 %{!?with_watchfrr:      %global  with_watchfrr      1 }
 %{!?with_bgp_vnc:       %global  with_bgp_vnc       0 }
 %{!?with_pimd:          %global  with_pimd          1 }
+%{!?with_rpki:          %global  with_rpki          0 }
 
 # path defines
 %define     _sysconfdir   /etc/frr
 
 # defines for configure
 %define     _localstatedir  /var/run/frr
+
+# define for sphinx-build binary
+%if 0%{?rhel} && 0%{?rhel} < 7
+%define     sphinx sphinx-build2.7
+%else
+%define     sphinx sphinx-build
+%endif
 ############################################################################
 
 #### Version String tweak
@@ -135,20 +143,25 @@ URL:            http://www.frrouting.org
 Requires(pre):  /sbin/install-info
 Requires(preun): /sbin/install-info
 Requires(post): /sbin/install-info
-BuildRequires:  gcc texi2html texinfo patch libcap-devel groff
+BuildRequires:  gcc patch libcap-devel
 BuildRequires:  readline readline-devel ncurses ncurses-devel
 BuildRequires:  json-c-devel bison >= 2.7 flex make
+BuildRequires:  c-ares-devel texinfo
 %if 0%{?rhel} && 0%{?rhel} < 7
 #python27-devel is available from ius community repo for RedHat/CentOS 6
-BuildRequires:  python27-devel
+BuildRequires:  python27-devel python27-sphinx
 %else
-BuildRequires:  python-devel >= 2.7
+BuildRequires:  python-devel >= 2.7 python-sphinx
 %endif
 Requires:       ncurses json-c initscripts
 %if %{with_pam}
 BuildRequires:  pam-devel
 Requires:       pam
 %endif
+%if %{with_rpki}
+BuildRequires:  librtr-devel >= 0.5
+Requires:       librtr >= 0.5
+%endif
 %if "%{initsystem}" == "systemd"
 BuildRequires:      systemd systemd-devel
 Requires(post):     systemd
@@ -169,7 +182,7 @@ protocol. It takes multi-server and multi-thread approach to resolve
 the current complexity of the Internet.
 
 FRRouting supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng, PIM, LDP
-NHRP and EIGRP.
+NHRP, Babel and EIGRP.
 
 FRRouting is a fork of Quagga.
 
@@ -298,21 +311,20 @@ developing OSPF-API and frr applications.
     --enable-systemd=yes \
 %endif
     --enable-poll=yes
+%if %{with_rpki}
+    --enable-rpki
+%endif
 
-make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
+make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" SPHINXBUILD=%{sphinx}
 
 pushd doc
-if [ $(texi2html --version | cut -d. -f1) -lt 5 ]; then
-texi2html --number-sections frr.texi
-else
-texi2html --number-footnotes  --number-sections frr.texi
-fi
+make SPHINXBUILD=%{sphinx} info
 popd
 
 %install
 mkdir -p %{buildroot}/etc/{frr,sysconfig,logrotate.d,pam.d,default} \
          %{buildroot}/var/log/frr %{buildroot}%{_infodir}
-make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install
+make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" SPHINXBUILD=%{sphinx} install
 
 # Remove this file, as it is uninstalled and causes errors when building on RH9
 rm -rf %{buildroot}/usr/share/info/dir
@@ -506,7 +518,6 @@ rm -rf %{buildroot}
 %files
 %defattr(-,root,root)
 %doc */*.sample* AUTHORS COPYING
-%doc doc/frr.html
 %doc doc/mpls
 %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES
 %if 0%{?frr_user:1}
@@ -570,6 +581,7 @@ rm -rf %{buildroot}
 %endif
 %config(noreplace) /etc/pam.d/frr
 %config(noreplace) %attr(640,root,root) /etc/logrotate.d/*
+%{_sbindir}/frr-reload
 
 %files contrib
 %defattr(-,root,root)
@@ -602,7 +614,13 @@ rm -rf %{buildroot}
 %endif
 
 %changelog
-* Fri Oct 20 2017 Martin Winter <mwinter@opensourcerouting.org> - %{version}
+* Sun Mar  4 2018 Martin Winter <mwinter@opensourcerouting.org> - %{version}
+- Add option to build with RPKI (default: disabled)
+
+* Tue Feb 20 2018 Martin Winter <mwinter@opensourcerouting.org>
+- Adapt to new documentation structure based on Sphinx
+
+* Fri Oct 20 2017 Martin Winter <mwinter@opensourcerouting.org>
 - Fix script location for watchfrr restart functions in daemon config
 - Fix postun script to restart frr during upgrade
 
index c396f3ef949b49acfe807576309b7dbdd6ef52e6..cc33cfc188ae9f31827264419d4d39f7caed902d 100644 (file)
@@ -13,6 +13,5 @@ TAGS
 .arch-ids
 *~
 *.loT
-*clippy.c
 sharpd
 sharpd.conf
index 3065ad19c3b50d7ce6860d04810246dec489b164..4d19484a64172191d24818ff277677c114011459 100644 (file)
@@ -39,6 +39,46 @@ extern uint32_t total_routes;
 extern uint32_t installed_routes;
 extern uint32_t removed_routes;
 
+DEFPY(watch_nexthop_v6, watch_nexthop_v6_cmd,
+      "sharp watch nexthop X:X::X:X$nhop",
+      "Sharp routing Protocol\n"
+      "Watch for changes\n"
+      "Watch for nexthop changes\n"
+      "The v6 nexthop to signal for watching\n")
+{
+       struct prefix p;
+
+       memset(&p, 0, sizeof(p));
+
+       p.prefixlen = 128;
+       memcpy(&p.u.prefix6, &nhop, 16);
+       p.family = AF_INET6;
+
+       sharp_zebra_nexthop_watch(&p, true);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(watch_nexthop_v4, watch_nexthop_v4_cmd,
+      "sharp watch nexthop A.B.C.D$nhop",
+      "Sharp routing Protocol\n"
+      "Watch for changes\n"
+      "Watch for nexthop changes\n"
+      "The v4 nexthop to signal for watching\n")
+{
+       struct prefix p;
+
+       memset(&p, 0, sizeof(p));
+
+       p.prefixlen = 32;
+       p.u.prefix4 = nhop;
+       p.family = AF_INET;
+
+       sharp_zebra_nexthop_watch(&p, true);
+
+       return CMD_SUCCESS;
+}
+
 DEFPY (install_routes,
        install_routes_cmd,
        "sharp install routes A.B.C.D$start nexthop A.B.C.D$nexthop (1-1000000)$routes",
@@ -147,5 +187,7 @@ void sharp_vty_init(void)
        install_element(ENABLE_NODE, &install_routes_cmd);
        install_element(ENABLE_NODE, &remove_routes_cmd);
        install_element(ENABLE_NODE, &vrf_label_cmd);
+       install_element(ENABLE_NODE, &watch_nexthop_v6_cmd);
+       install_element(ENABLE_NODE, &watch_nexthop_v4_cmd);
        return;
 }
index c1c827c3664adf2f33ecc04f31e11b5d49407743..999255e9254e08f812ab649da3f03326b9ec2093 100644 (file)
@@ -130,6 +130,7 @@ static int interface_state_down(int command, struct zclient *zclient,
 
 extern uint32_t total_routes;
 extern uint32_t installed_routes;
+extern uint32_t removed_routes;
 
 static int route_notify_owner(int command, struct zclient *zclient,
                              zebra_size_t length, vrf_id_t vrf_id)
@@ -141,10 +142,27 @@ static int route_notify_owner(int command, struct zclient *zclient,
        if (!zapi_route_notify_decode(zclient->ibuf, &p, &table, &note))
                return -1;
 
-       installed_routes++;
-
-       if (total_routes == installed_routes)
-               zlog_debug("Installed All Items");
+       switch (note) {
+       case ZAPI_ROUTE_INSTALLED:
+               installed_routes++;
+               if (total_routes == installed_routes)
+                       zlog_debug("Installed All Items");
+               break;
+       case ZAPI_ROUTE_FAIL_INSTALL:
+               zlog_debug("Failed install of route");
+               break;
+       case ZAPI_ROUTE_BETTER_ADMIN_WON:
+               zlog_debug("Better Admin Distance won over us");
+               break;
+       case ZAPI_ROUTE_REMOVED:
+               removed_routes++;
+               if (total_routes == removed_routes)
+                       zlog_debug("Removed all Items");
+               break;
+       case ZAPI_ROUTE_REMOVE_FAIL:
+               zlog_debug("Route removal Failure");
+               break;
+       }
        return 0;
 }
 
@@ -196,6 +214,65 @@ void route_delete(struct prefix *p)
        return;
 }
 
+void sharp_zebra_nexthop_watch(struct prefix *p, bool watch)
+{
+       int command = ZEBRA_NEXTHOP_REGISTER;
+
+       if (!watch)
+               command = ZEBRA_NEXTHOP_UNREGISTER;
+
+       zclient_send_rnh(zclient, command, p, true, VRF_DEFAULT);
+}
+
+static int sharp_nexthop_update(int command, struct zclient *zclient,
+                               zebra_size_t length, vrf_id_t vrf_id)
+{
+       struct zapi_route nhr;
+       char buf[PREFIX_STRLEN];
+       int i;
+
+       if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
+               zlog_warn("%s: Decode of update failed", __PRETTY_FUNCTION__);
+
+               return 0;
+       }
+
+       zlog_debug("Received update for %s",
+                  prefix2str(&nhr.prefix, buf, sizeof(buf)));
+       for (i = 0; i < nhr.nexthop_num; i++) {
+               struct zapi_nexthop *znh = &nhr.nexthops[i];
+
+               switch (znh->type) {
+               case NEXTHOP_TYPE_IPV4_IFINDEX:
+               case NEXTHOP_TYPE_IPV4:
+                       zlog_debug(
+                               "\tNexthop %s, type: %d, ifindex: %d, vrf: %d, label_num: %d",
+                               inet_ntop(AF_INET, &znh->gate.ipv4.s_addr, buf,
+                                         sizeof(buf)),
+                               znh->type, znh->ifindex, znh->vrf_id,
+                               znh->label_num);
+                       break;
+               case NEXTHOP_TYPE_IPV6_IFINDEX:
+               case NEXTHOP_TYPE_IPV6:
+                       zlog_debug(
+                               "\tNexthop %s, type: %d, ifindex: %d, vrf: %d, label_num: %d",
+                               inet_ntop(AF_INET6, &znh->gate.ipv6, buf,
+                                         sizeof(buf)),
+                               znh->type, znh->ifindex, znh->vrf_id,
+                               znh->label_num);
+                       break;
+               case NEXTHOP_TYPE_IFINDEX:
+                       zlog_debug("\tNexthop IFINDEX: %d, ifindex: %d",
+                                  znh->type, znh->ifindex);
+                       break;
+               case NEXTHOP_TYPE_BLACKHOLE:
+                       zlog_debug("\tNexthop blackhole");
+                       break;
+               }
+       }
+       return 0;
+}
+
 extern struct zebra_privs_t sharp_privs;
 
 void sharp_zebra_init(void)
@@ -213,4 +290,5 @@ void sharp_zebra_init(void)
        zclient->interface_address_add = interface_address_add;
        zclient->interface_address_delete = interface_address_delete;
        zclient->route_notify_owner = route_notify_owner;
+       zclient->nexthop_update = sharp_nexthop_update;
 }
index 0bba443bd48c43c6ee6c6f12069bd576f10f4b5e..0c906fc4ffd10fc97ed7ae2121fefb46527b50c1 100644 (file)
@@ -27,4 +27,5 @@ extern void sharp_zebra_init(void);
 extern void vrf_label_add(vrf_id_t vrf_id, afi_t afi, mpls_label_t label);
 extern void route_add(struct prefix *p, struct nexthop *nh);
 extern void route_delete(struct prefix *p);
+extern void sharp_zebra_nexthop_watch(struct prefix *p, bool watch);
 #endif
index f4ab2a126a2903d1bc186f61b71598399d56761b..0c9a5684dad2c18806882988c6a0a5fd93dfca36 100644 (file)
@@ -73,6 +73,7 @@ check_PROGRAMS = \
        lib/test_timer_correctness \
        lib/test_timer_performance \
        lib/test_ttable \
+       lib/test_zlog \
        lib/cli/test_cli \
        lib/cli/test_commands \
        $(TESTS_BGPD) \
@@ -115,9 +116,9 @@ lib_test_heavy_SOURCES = lib/test_heavy.c helpers/c/main.c
 lib_test_memory_SOURCES = lib/test_memory.c
 lib_test_nexthop_iter_SOURCES = lib/test_nexthop_iter.c helpers/c/prng.c
 lib_test_privs_SOURCES = lib/test_privs.c
+lib_test_ringbuf_SOURCES = lib/test_ringbuf.c
 lib_test_srcdest_table_SOURCES = lib/test_srcdest_table.c \
                                  helpers/c/prng.c
-lib_test_ringbuf_SOURCES = lib/test_ringbuf.c
 lib_test_segv_SOURCES = lib/test_segv.c
 lib_test_sig_SOURCES = lib/test_sig.c
 lib_test_stream_SOURCES = lib/test_stream.c
@@ -127,6 +128,7 @@ lib_test_timer_correctness_SOURCES = lib/test_timer_correctness.c \
 lib_test_timer_performance_SOURCES = lib/test_timer_performance.c \
                                      helpers/c/prng.c
 lib_test_ttable_SOURCES = lib/test_ttable.c
+lib_test_zlog_SOURCES = lib/test_zlog.c
 lib_test_zmq_SOURCES = lib/test_zmq.c
 lib_test_zmq_CFLAGS = $(AM_CFLAGS) $(ZEROMQ_CFLAGS)
 lib_cli_test_cli_SOURCES = lib/cli/test_cli.c lib/cli/common_cli.c
@@ -167,6 +169,7 @@ lib_test_table_LDADD = $(ALL_TESTS_LDADD) -lm
 lib_test_timer_correctness_LDADD = $(ALL_TESTS_LDADD)
 lib_test_timer_performance_LDADD = $(ALL_TESTS_LDADD)
 lib_test_ttable_LDADD = $(ALL_TESTS_LDADD)
+lib_test_zlog_LDADD = $(ALL_TESTS_LDADD)
 lib_test_zmq_LDADD = ../lib/libfrrzmq.la $(ALL_TESTS_LDADD) $(ZEROMQ_LIBS)
 lib_cli_test_cli_LDADD = $(ALL_TESTS_LDADD)
 lib_cli_test_commands_LDADD = $(ALL_TESTS_LDADD)
@@ -207,6 +210,7 @@ EXTRA_DIST = \
     lib/test_timer_correctness.py \
     lib/test_ttable.py \
     lib/test_ttable.refout \
+    lib/test_zlog.py \
     ospf6d/test_lsdb.py \
     ospf6d/test_lsdb.in \
     ospf6d/test_lsdb.refout \
index 3eb0205a5db812b83d5818bf4c161dcdeadcd7b3..cca702b138f99f61f49760b0d403c8379f085109 100644 (file)
Binary files a/tests/isisd/test_fuzz_isis_tlv_tests.h.gz and b/tests/isisd/test_fuzz_isis_tlv_tests.h.gz differ
index 8d7353d4dcd11abe35050471d8944d0d60652536..f21f3bbb33d3117ec6a4c62c780f6512ef760ac4 100644 (file)
@@ -60,7 +60,7 @@ static void str_appendf(char **buf, const char *format, ...)
  * and its expected representation */
 struct nexthop_chain {
        /* Head of the chain */
-       struct nexthop *head;
+       struct nexthop_group head;
        /* Last nexthop in top chain */
        struct nexthop *current_top;
        /* Last nexthop in current recursive chain */
@@ -85,12 +85,12 @@ static void nexthop_chain_add_top(struct nexthop_chain *nc)
        nh = calloc(sizeof(*nh), 1);
        assert(nh);
 
-       if (nc->head) {
+       if (nc->head.nexthop) {
                nc->current_top->next = nh;
                nh->prev = nc->current_top;
                nc->current_top = nh;
        } else {
-               nc->head = nc->current_top = nh;
+               nc->head.nexthop = nc->current_top = nh;
        }
        nc->current_recursive = NULL;
        str_appendf(&nc->repr, "%p\n", nh);
@@ -166,8 +166,8 @@ static void nexthop_clear_recursive(struct nexthop *tcur)
 }
 static void nexthop_chain_clear(struct nexthop_chain *nc)
 {
-       nexthop_clear_recursive(nc->head);
-       nc->head = nc->current_top = nc->current_recursive = NULL;
+       nexthop_clear_recursive(nc->head.nexthop);
+       nc->head.nexthop = nc->current_top = nc->current_recursive = NULL;
        free(nc->repr);
        nc->repr = NULL;
 }
diff --git a/tests/lib/test_zlog.c b/tests/lib/test_zlog.c
new file mode 100644 (file)
index 0000000..790e65c
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Zlog tests.
+ * Copyright (C) 2018  Cumulus Networks, Inc.
+ *                     Quentin Young
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include <zebra.h>
+#include <memory.h>
+#include "log.h"
+
+/* maximum amount of data to hexdump */
+#define MAXDATA 16384
+
+/*
+ * Test hexdump functionality.
+ *
+ * At the moment, not crashing is considered success.
+ */
+static bool test_zlog_hexdump(void)
+{
+       unsigned int nl = 1;
+
+       do {
+               long d[nl];
+
+               for (unsigned int i = 0; i < nl; i++)
+                       d[i] = random();
+               zlog_hexdump(d, nl * sizeof(long));
+       } while (++nl * sizeof(long) <= MAXDATA);
+
+       return true;
+}
+
+bool (*tests[])(void) = {
+       test_zlog_hexdump,
+};
+
+int main(int argc, char **argv)
+{
+       openzlog("testzlog", "NONE", 0, LOG_CONS | LOG_NDELAY | LOG_PID,
+                LOG_ERR);
+       zlog_set_file("test_zlog.log", LOG_DEBUG);
+
+       for (unsigned int i = 0; i < array_size(tests); i++)
+               if (!tests[i]())
+                       return 1;
+       return 0;
+}
diff --git a/tests/lib/test_zlog.py b/tests/lib/test_zlog.py
new file mode 100644 (file)
index 0000000..2ca2585
--- /dev/null
@@ -0,0 +1,4 @@
+import frrtest
+
+class TestZlog(frrtest.TestMultiOut):
+    program = './test_zlog'
index a952de89474d48061eea3b0bd3769c1c5a2d7cf4..a85d811c96a0559361748d28b1be95b68db0c4e8 100755 (executable)
@@ -1249,11 +1249,6 @@ sub sanitise_line {
                $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@;
        }
 
-       if ($allow_c99_comments && $res =~ m@(//.*$)@) {
-               my $match = $1;
-               $res =~ s/\Q$match\E/"$;" x length($match)/e;
-       }
-
        return $res;
 }
 
@@ -3612,14 +3607,19 @@ sub process {
 
 # no C99 // comments
                if ($line =~ m{//}) {
-                       if (ERROR("C99_COMMENTS",
-                                 "do not use C99 // comments\n" . $herecurr) &&
-                           $fix) {
-                               my $line = $fixed[$fixlinenr];
-                               if ($line =~ /\/\/(.*)$/) {
-                                       my $comment = trim($1);
-                                       $fixed[$fixlinenr] =~ s@\/\/(.*)$@/\* $comment \*/@;
+                       if (!$allow_c99_comments) {
+                               if(ERROR("C99_COMMENTS",
+                                        "do not use C99 // comments\n" . $herecurr) &&
+                                  $fix) {
+                                       my $line = $fixed[$fixlinenr];
+                                       if ($line =~ /\/\/(.*)$/) {
+                                               my $comment = trim($1);
+                                               $fixed[$fixlinenr] =~ s@\/\/(.*)$@/\* $comment \*/@;
+                                       }
                                }
+                       } else {
+                               WARN("C99_COMMENTS",
+                                    "C99 // comments do not match recommendation\n" . $herecurr);
                        }
                }
                # Remove C99 comments.
index e6110f0c7ac6f16a2fa3889354e2e69d3a6029f3..e1fb529d35c2465c1fc1e291def8a848ede70a71 100755 (executable)
@@ -8,6 +8,8 @@ ignore="ldpd\|babeld"
 cwd=${PWD##*/}
 dirty=0
 stat=0
+tmp1=/tmp/f1-$$
+tmp2=/tmp/f2-$$
 
 if [[ -z "$1" || -z "$2" ]]; then
   echo "$usage"
@@ -15,7 +17,7 @@ if [[ -z "$1" || -z "$2" ]]; then
 fi
 
 # remove temp directories
-rm -rf /tmp/f1 /tmp/f2
+rm -rf ${tmp1} ${tmp2}
 
 # save working tree
 if git -C $tree status --porcelain | egrep --silent '^(\?\?|.[DM])'; then
@@ -38,7 +40,7 @@ fi
 
 git -C $tree reset --hard
 git -C $tree apply < $patch
-mkdir -p /tmp/f1 /tmp/f2
+mkdir -p ${tmp1} ${tmp2}
 mod=$(git -C $tree ls-files -m | grep ".*\.[ch]" | grep -v $ignore)
 mod+=" $(git -C $tree ls-files --others --exclude-standard | grep '.*\.[ch]' | grep -v $ignore)"
 echo $mod
@@ -47,32 +49,32 @@ if [ -z "$mod" ]; then
 else
   echo "Copying source to temp directory..."
   for file in $mod; do
-    echo "$tree/$file --> /tmp/f1/$file"
-    cp $tree/$file /tmp/f1/
+    echo "$tree/$file --> ${tmp1}/$file"
+    cp $tree/$file ${tmp1}/
   done
   git -C $tree reset --hard
   git -C $tree clean -fd
   for file in $mod; do
     if [ -f $tree/$file ]; then
-      echo "$tree/$file --> /tmp/f2/$file"
-      cp $tree/$file /tmp/f2/
+      echo "$tree/$file --> ${tmp2}/$file"
+      cp $tree/$file ${tmp2}/
     fi
   done
   echo "Running style checks..."
-  for file in /tmp/f1/*; do
+  for file in ${tmp1}/*; do
     echo "$checkpatch $file > $file _cp"
     $checkpatch $file > "$file"_cp 2> /dev/null
   done
-  for file in /tmp/f2/*; do
+  for file in ${tmp2}/*; do
     echo "$checkpatch $file > $file _cp"
     $checkpatch $file > "$file"_cp 2> /dev/null
   done
   echo "Done."
-  for file in /tmp/f1/*_cp; do
-    if [ -a /tmp/f2/$(basename $file) ]; then
-      result=$(diff $file /tmp/f2/$(basename $file) | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1')
+  for file in ${tmp1}/*_cp; do
+    if [ -a ${tmp2}/$(basename $file) ]; then
+      result=$(diff $file ${tmp2}/$(basename $file) | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 "${tmp1}")
     else
-      result=$(cat $file | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1')
+      result=$(cat $file | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 "${tmp1}")
     fi
     if [ "$?" -eq "0" ]; then
       echo "Report for $(basename $file _cp)" 1>&2
@@ -98,4 +100,7 @@ if [ $dirty -eq 1 ]; then
   git -C $tree config --unset gc.auto;
 fi
 
+# remove temp directories
+rm -rf ${tmp1} ${tmp2}
+
 exit $stat
diff --git a/tools/frr-reload b/tools/frr-reload
new file mode 100755 (executable)
index 0000000..75b31d0
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if test -e /usr/lib/frr/frr-reload.py; then
+   exec /usr/lib/frr/frr-reload.py --reload /etc/frr/frr.conf
+fi
+>&2 echo "Please install frr-pythontools package. Required for reload"
+exit 1
index 0b7e80962cbd6e582bce5b929d1e307014691591..208fb116e689aced77130b37b4d1e4b5eba6248f 100755 (executable)
@@ -413,7 +413,7 @@ end
                 ctx_keys = []
                 current_context_lines = []
 
-            elif line == "exit-address-family" or line == "exit" or line == "exit-vni":
+            elif line in ["exit-address-family", "exit", "exit-vnc", "exit-vni"]:
                 # if this exit is for address-family ipv4 unicast, ignore the pop
                 if main_ctx_key:
                     self.save_contexts(ctx_keys, current_context_lines)
@@ -433,26 +433,14 @@ end
                 current_context_lines = []
                 new_ctx = False
                 log.debug('LINE %-50s: entering new context, %-50s', line, ctx_keys)
-
-            # The 'vni' keyword under 'router bgp X/address-family l2vpn evpn' creates
-            # a sub-context but the 'vni' keyword in other places (such as 'vrf BLUE')
-            # does not.
-            elif ("vni " in line and
-                len(ctx_keys) == 2 and
-                ctx_keys[0].startswith('router bgp') and
-                ctx_keys[1] == 'address-family l2vpn evpn'):
-
-                main_ctx_key = []
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug('LINE %-50s: entering sub-context, append to ctx_keys', line)
-
-                ctx_keys.append(line)
-
-            elif "address-family " in line:
+            elif (line.startswith("address-family ") or
+                  line.startswith("vnc defaults") or
+                  line.startswith("vnc l2-group") or
+                  line.startswith("vnc nve-group") or
+                  (line.startswith("vni ") and
+                   len(ctx_keys) == 2 and
+                   ctx_keys[0].startswith('router bgp') and
+                   ctx_keys[1] == 'address-family l2vpn evpn')):
                 main_ctx_key = []
 
                 # Save old context first
index 4301ec9dc78c4908f821340eccf280deee851270..8800bf6b0ff83960a7ad28b53b74c94c679226ee 100644 (file)
@@ -17,6 +17,6 @@ Restart=on-abnormal
 LimitNOFILE=1024
 ExecStart=/usr/lib/frr/frr start
 ExecStop=/usr/lib/frr/frr stop
-ExecReload=/usr/lib/frr/frr-reload.py --reload /etc/frr/frr.conf
+ExecReload=/usr/lib/frr/frr-reload
 [Install]
 WantedBy=network-online.target
index 91bb23f67cf4aa739d461b6108e195a512785c64..139049b670ddc52270a986e8e244a4415096524c 100755 (executable)
@@ -6,7 +6,7 @@ import sys, re, subprocess, os
 
 # find all DEFUNs
 defun_re = re.compile(
-        r'^((DEF(UN(_NOSH|_HIDDEN)?|PY)|ALIAS)\s*\(.*?)^(?=\s*\{)',
+        r'^((DEF(UN(|_ATTR|_CMD_(ELEMENT|FUNC_(DECL|TEXT))|_DEPRECATED|_NOSH|_HIDDEN|SH(|_ATTR|_DEPRECATED|_HIDDEN))?|PY)|ALIAS)\s*\(.*?)^(?=\s*\{)',
         re.M | re.S)
 define_re = re.compile(
         r'((^#\s*define[^\n]+[^\\]\n)+)',
index 79aea179a9a54ffcc3283046adf6c7d500b72bc1..602822e5897824536951737a1601bbc055c47e78 100644 (file)
@@ -5,6 +5,7 @@
 noinst_PROGRAMS += tools/permutations
 sbin_PROGRAMS += tools/ssd
 sbin_SCRIPTS += \
+       tools/frr-reload \
        tools/frr-reload.py \
        tools/frr \
        # end
@@ -17,6 +18,7 @@ tools_ssd_SOURCES = tools/start-stop-daemon.c
 EXTRA_DIST += \
        tools/etc \
        tools/frr \
+       tools/frr-reload \
        tools/frr-reload.py \
        tools/frr.service \
        tools/multiple-bgpd.sh \
index f0010700a866b16b6bbebad4b60ebfd103f6c266..efef106d978ac0e87f9bcc4ad185b8b001256e80 100644 (file)
@@ -1205,21 +1205,30 @@ DEFUNSH(VTYSH_BGPD, address_family_ipv6_labeled_unicast,
 }
 
 #if defined(HAVE_RPKI)
-DEFUNSH(VTYSH_BGPD, rpki, rpki_cmd, "rpki",
+DEFUNSH(VTYSH_BGPD,
+       rpki,
+       rpki_cmd,
+       "rpki",
        "Enable rpki and enter rpki configuration mode\n")
 {
        vty->node = RPKI_NODE;
        return CMD_SUCCESS;
 }
 
-DEFUNSH(VTYSH_BGPD, rpki_exit, rpki_exit_cmd, "exit",
+DEFUNSH(VTYSH_BGPD,
+       rpki_exit,
+       rpki_exit_cmd,
+       "exit",
        "Exit current mode and down to previous mode\n")
 {
        vty->node = CONFIG_NODE;
        return CMD_SUCCESS;
 }
 
-DEFUNSH(VTYSH_BGPD, rpki_quit, rpki_quit_cmd, "quit",
+DEFUNSH(VTYSH_BGPD,
+       rpki_quit,
+       rpki_quit_cmd,
+       "quit",
        "Exit current mode and down to previous mode\n")
 {
        return rpki_exit(self, vty, argc, argv);
@@ -1326,7 +1335,8 @@ DEFUNSH(VTYSH_OSPFD, router_ospf, router_ospf_cmd,
        "router ospf [(1-65535)] [vrf NAME]",
        "Enable a routing process\n"
        "Start OSPF configuration\n"
-       "Instance ID\n" VRF_CMD_HELP_STR)
+       "Instance ID\n"
+       VRF_CMD_HELP_STR)
 {
        vty->node = OSPF_NODE;
        return CMD_SUCCESS;
@@ -1499,6 +1509,7 @@ static int vtysh_exit(struct vty *vty)
        case PW_NODE:
        case LOGICALROUTER_NODE:
        case VRF_NODE:
+       case NH_GROUP_NODE:
        case ZEBRA_NODE:
        case BGP_NODE:
        case RIP_NODE:
@@ -1801,14 +1812,16 @@ DEFSH(VTYSH_ZEBRA, vtysh_no_vrf_cmd, "no vrf NAME", NO_STR
       "Delete a pseudo vrf's configuration\n"
       "VRF's name\n")
 
-DEFUNSH(VTYSH_NS, vtysh_exit_logicalrouter, vtysh_exit_logicalrouter_cmd,
-       "exit", "Exit current mode and down to previous mode\n")
+DEFUNSH(VTYSH_NS, vtysh_exit_logicalrouter,
+       vtysh_exit_logicalrouter_cmd, "exit",
+       "Exit current mode and down to previous mode\n")
 {
        return vtysh_exit(vty);
 }
 
-DEFUNSH(VTYSH_NS, vtysh_quit_logicalrouter, vtysh_quit_logicalrouter_cmd,
-       "quit", "Exit current mode and down to previous mode\n")
+DEFUNSH(VTYSH_NS, vtysh_quit_logicalrouter,
+       vtysh_quit_logicalrouter_cmd, "quit",
+       "Exit current mode and down to previous mode\n")
 {
        return vtysh_exit_logicalrouter(self, vty, argc, argv);
 }
@@ -1957,6 +1970,17 @@ static int show_per_daemon(const char *line, const char *headline)
        return ret;
 }
 
+DEFUNSH_HIDDEN (0x00,
+                vtysh_debug_all,
+                vtysh_debug_all_cmd,
+                "[no] debug all",
+                NO_STR
+                DEBUG_STR
+                "Toggle all debugs on or off\n")
+{
+       return CMD_SUCCESS;
+}
+
 DEFUN (vtysh_show_debugging,
        vtysh_show_debugging_cmd,
        "show debugging",
@@ -2109,7 +2133,6 @@ DEFUNSH(VTYSH_ALL, vtysh_log_facility, vtysh_log_facility_cmd,
        "log facility <kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|local0|local1|local2|local3|local4|local5|local6|local7>",
        "Logging control\n"
        "Facility parameter for syslog messages\n" LOG_FACILITY_DESC)
-
 {
        return CMD_SUCCESS;
 }
@@ -2119,7 +2142,6 @@ DEFUNSH(VTYSH_ALL, no_vtysh_log_facility, no_vtysh_log_facility_cmd,
        "Logging control\n"
        "Reset syslog facility to default (daemon)\n"
        "Syslog facility\n")
-
 {
        return CMD_SUCCESS;
 }
@@ -2129,7 +2151,6 @@ DEFUNSH_DEPRECATED(
        "log trap <emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>",
        "Logging control\n"
        "(Deprecated) Set logging level and default for all destinations\n" LOG_LEVEL_DESC)
-
 {
        return CMD_SUCCESS;
 }
@@ -3350,14 +3371,17 @@ void vtysh_init_vty(void)
        install_element(ENABLE_NODE, &vtysh_start_zsh_cmd);
 #endif
 
+       /* debugging */
        install_element(VIEW_NODE, &vtysh_show_debugging_cmd);
        install_element(VIEW_NODE, &vtysh_show_debugging_hashtable_cmd);
+       install_element(VIEW_NODE, &vtysh_debug_all_cmd);
+       install_element(CONFIG_NODE, &vtysh_debug_all_cmd);
+
+       /* misc lib show commands */
        install_element(VIEW_NODE, &vtysh_show_memory_cmd);
        install_element(VIEW_NODE, &vtysh_show_modules_cmd);
-
        install_element(VIEW_NODE, &vtysh_show_work_queues_cmd);
        install_element(VIEW_NODE, &vtysh_show_work_queues_daemon_cmd);
-
        install_element(VIEW_NODE, &vtysh_show_thread_cmd);
 
        /* Logging */
index 7a1321e54674901a0a8eb80b5b4460fc073a226c..4a06756a2d56d9574a1ea99c12b05606b8bce18d 100644 (file)
@@ -13,4 +13,3 @@ TAGS
 .arch-ids
 *~
 *.loT
-zebra_vty_clippy.c
index bb0a0e052e63012bcc26d5478d967b1caa55e329..a37d74416be37fb1ee4430b03bafaecc27677694 100644 (file)
@@ -30,6 +30,7 @@
  */
 #define _LINUX_IN6_H
 
+#include <netinet/if_ether.h>
 #include <linux/if_bridge.h>
 #include <linux/if_link.h>
 #include <net/if_arp.h>
@@ -362,7 +363,7 @@ static int get_iflink_speed(struct interface *interface)
        /* initialize ethtool interface */
        memset(&ecmd, 0, sizeof(ecmd));
        ecmd.cmd = ETHTOOL_GSET; /* ETHTOOL_GLINK */
-       ifdata.ifr_data = (__caddr_t)&ecmd;
+       ifdata.ifr_data = (caddr_t)&ecmd;
 
        /* use ioctl to get IP address of an interface */
        if (zserv_privs.change(ZPRIVS_RAISE))
index 0b3b6eed45761b5db16ce36e597f6187ba5d0978..52b26920901bada0982a9d5ce77451c07117f688 100644 (file)
@@ -45,6 +45,7 @@
 #include "zebra/kernel_netlink.h"
 #include "zebra/rt_netlink.h"
 #include "zebra/if_netlink.h"
+#include "zebra/rule_netlink.h"
 
 #ifndef SO_RCVBUFFORCE
 #define SO_RCVBUFFORCE  (33)
@@ -85,6 +86,9 @@ static const struct message nlmsg_str[] = {{RTM_NEWROUTE, "RTM_NEWROUTE"},
                                           {RTM_NEWNEIGH, "RTM_NEWNEIGH"},
                                           {RTM_DELNEIGH, "RTM_DELNEIGH"},
                                           {RTM_GETNEIGH, "RTM_GETNEIGH"},
+                                          {RTM_NEWRULE, "RTM_NEWRULE"},
+                                          {RTM_DELRULE, "RTM_DELRULE"},
+                                          {RTM_GETRULE, "RTM_GETRULE"},
                                           {0}};
 
 static const struct message rtproto_str[] = {
@@ -240,28 +244,24 @@ static int netlink_information_fetch(struct sockaddr_nl *snl,
        switch (h->nlmsg_type) {
        case RTM_NEWROUTE:
                return netlink_route_change(snl, h, ns_id, startup);
-               break;
        case RTM_DELROUTE:
                return netlink_route_change(snl, h, ns_id, startup);
-               break;
        case RTM_NEWLINK:
                return netlink_link_change(snl, h, ns_id, startup);
-               break;
        case RTM_DELLINK:
                return netlink_link_change(snl, h, ns_id, startup);
-               break;
        case RTM_NEWADDR:
                return netlink_interface_addr(snl, h, ns_id, startup);
-               break;
        case RTM_DELADDR:
                return netlink_interface_addr(snl, h, ns_id, startup);
-               break;
        case RTM_NEWNEIGH:
                return netlink_neigh_change(snl, h, ns_id);
-               break;
        case RTM_DELNEIGH:
                return netlink_neigh_change(snl, h, ns_id);
-               break;
+       case RTM_NEWRULE:
+               return netlink_rule_change(snl, h, ns_id, startup);
+       case RTM_DELRULE:
+               return netlink_rule_change(snl, h, ns_id, startup);
        default:
                if (IS_ZEBRA_DEBUG_KERNEL)
                        zlog_debug("Unknown netlink nlmsg_type %d vrf %u\n",
@@ -788,7 +788,8 @@ void kernel_init(struct zebra_ns *zns)
        /* Initialize netlink sockets */
        groups = RTMGRP_LINK | RTMGRP_IPV4_ROUTE | RTMGRP_IPV4_IFADDR
                 | RTMGRP_IPV6_ROUTE | RTMGRP_IPV6_IFADDR | RTMGRP_IPV4_MROUTE
-                | RTMGRP_NEIGH;
+                | RTMGRP_NEIGH
+                | RTNLGRP_IPV4_RULE | RTNLGRP_IPV6_RULE;
 
        snprintf(zns->netlink.name, sizeof(zns->netlink.name),
                 "netlink-listen (NS %u)", zns->ns_id);
index 5bf0fce0947d582196d419f3e1bc78614005126f..b58f0c9ff84d84e6eb0e243d4494ce06f015b56b 100644 (file)
@@ -50,6 +50,8 @@ DEFINE_MTYPE_STATIC(LBL_MGR, LM_CHUNK, "Label Manager Chunk");
  * it will be a proxy to relay messages to external label manager
  * This zclient thus is to connect to it
  */
+static struct stream *ibuf;
+static struct stream *obuf;
 static struct zclient *zclient;
 bool lm_is_external;
 
@@ -69,7 +71,7 @@ static int relay_response_back(struct zserv *zserv)
        u_int16_t resp_cmd;
 
        src = zclient->ibuf;
-       dst = zserv->obuf;
+       dst = obuf;
 
        stream_reset(src);
 
@@ -87,7 +89,7 @@ static int relay_response_back(struct zserv *zserv)
 
        /* send response back */
        stream_copy(dst, src);
-       ret = writen(zserv->sock, dst->data, stream_get_endp(dst));
+       ret = writen(zserv->sock, src->data, stream_get_endp(src));
        if (ret <= 0) {
                zlog_err("%s: Error sending Label Manager response back: %s",
                         __func__, strerror(errno));
@@ -116,10 +118,10 @@ static int lm_zclient_read(struct thread *t)
 
 static int reply_error(int cmd, struct zserv *zserv, vrf_id_t vrf_id)
 {
+       int ret;
        struct stream *s;
 
-       s = zserv->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, vrf_id);
 
@@ -129,7 +131,10 @@ static int reply_error(int cmd, struct zserv *zserv, vrf_id_t vrf_id)
        /* Write packet size. */
        stream_putw_at(s, 0, stream_get_endp(s));
 
-       return writen(zserv->sock, s->data, stream_get_endp(s));
+       ret = writen(zserv->sock, s->data, stream_get_endp(s));
+
+       stream_free(s);
+       return ret;
 }
 /**
  * Receive a request to get or release a label chunk and forward it to external
@@ -161,7 +166,7 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv,
                ret = relay_response_back(zserv);
 
        /* Send request to external label manager */
-       src = zserv->ibuf;
+       src = ibuf;
        dst = zclient->obuf;
 
        stream_copy(dst, src);
@@ -247,6 +252,9 @@ void label_manager_init(char *lm_zserv_path)
                lm_is_external = true;
                lm_zclient_init(lm_zserv_path);
        }
+
+       ibuf = stream_new(ZEBRA_MAX_PACKET_SIZ);
+       obuf = stream_new(ZEBRA_MAX_PACKET_SIZ);
 }
 
 /**
@@ -379,4 +387,6 @@ int release_daemon_chunks(u_char proto, u_short instance)
 void label_manager_close()
 {
        list_delete_and_null(&lbl_mgr.lc_list);
+       stream_free(ibuf);
+       stream_free(obuf);
 }
index 6a08247f11d4dda53df8e37e467c1285f6605392..b0a19c5aa559791e5004e39201e83af56c52d33c 100644 (file)
@@ -140,7 +140,7 @@ static void sigint(void)
                                SET_FLAG(zvrf->flags, ZEBRA_VRF_RETAIN);
                }
        if (zebrad.lsp_process_q)
-               work_queue_free(zebrad.lsp_process_q);
+               work_queue_free_and_null(&zebrad.lsp_process_q);
        vrf_terminate();
 
        ns_walk_func(zebra_ns_disabled);
@@ -151,7 +151,7 @@ static void sigint(void)
        route_map_finish();
 
        list_delete_and_null(&zebrad.client_list);
-       work_queue_free(zebrad.ribq);
+       work_queue_free_and_null(&zebrad.ribq);
        meta_queue_free(zebrad.mq);
 
        frr_fini();
@@ -351,9 +351,6 @@ int main(int argc, char **argv)
        */
        frr_config_fork();
 
-       /* Clean up rib -- before fork (?) */
-       /* rib_weed_tables (); */
-
        /* After we have successfully acquired the pidfile, we can be sure
        *  about being the only copy of zebra process, which is submitting
        *  changes to the FIB.
index c03d755b2a41600eb62a26965f85cce5d65d064e..89c17b069aab07617a721ecab5c128d95fe288af 100644 (file)
@@ -58,7 +58,8 @@ int is_zebra_import_table_enabled(afi_t afi, u_int32_t table_id)
        if (afi == AFI_MAX)
                return 0;
 
-       if (is_zebra_valid_kernel_table(table_id))
+       if (is_zebra_valid_kernel_table(table_id) &&
+           table_id < ZEBRA_KERNEL_TABLE_MAX)
                return zebra_import_table_used[afi][table_id];
        return 0;
 }
@@ -115,11 +116,12 @@ static void zebra_redistribute(struct zserv *client, int type, u_short instance,
 
                        if (IS_ZEBRA_DEBUG_EVENT)
                                zlog_debug(
-                                       "%s: checking: selected=%d, type=%d, distance=%d, "
+                                       "%s: client %s vrf %d checking: selected=%d, type=%d, distance=%d, "
                                        "zebra_check_addr=%d",
                                        __func__,
-                                       CHECK_FLAG(newre->flags,
-                                                  ZEBRA_FLAG_SELECTED),
+                                       zebra_route_string(client->proto),
+                                       vrf_id, CHECK_FLAG(newre->flags,
+                                                          ZEBRA_FLAG_SELECTED),
                                        newre->type, newre->distance,
                                        zebra_check_addr(dst_p));
 
@@ -243,16 +245,21 @@ void redistribute_delete(struct prefix *p, struct prefix *src_p,
        }
 }
 
-void zebra_redistribute_add(int command, struct zserv *client, int length,
-                           struct zebra_vrf *zvrf)
+void zebra_redistribute_add(ZAPI_HANDLER_ARGS)
 {
        afi_t afi = 0;
        int type = 0;
        u_short instance;
 
-       STREAM_GETC(client->ibuf, afi);
-       STREAM_GETC(client->ibuf, type);
-       STREAM_GETW(client->ibuf, instance);
+       STREAM_GETC(msg, afi);
+       STREAM_GETC(msg, type);
+       STREAM_GETW(msg, instance);
+
+       if (IS_ZEBRA_DEBUG_EVENT)
+               zlog_debug(
+                       "%s: client proto %s afi=%d, wants %s, vrf %d, instance=%d",
+                       __func__, zebra_route_string(client->proto), afi,
+                       zebra_route_string(type), zvrf_id(zvrf), instance);
 
        if (afi == 0 || afi > AFI_MAX) {
                zlog_warn("%s: Specified afi %d does not exist",
@@ -277,6 +284,9 @@ void zebra_redistribute_add(int command, struct zserv *client, int length,
        } else {
                if (!vrf_bitmap_check(client->redist[afi][type],
                                      zvrf_id(zvrf))) {
+                       if (IS_ZEBRA_DEBUG_EVENT)
+                               zlog_debug("%s: setting vrf %d redist bitmap",
+                                          __func__, zvrf_id(zvrf));
                        vrf_bitmap_set(client->redist[afi][type],
                                       zvrf_id(zvrf));
                        zebra_redistribute(client, type, 0, zvrf_id(zvrf), afi);
@@ -287,16 +297,15 @@ stream_failure:
        return;
 }
 
-void zebra_redistribute_delete(int command, struct zserv *client, int length,
-                              struct zebra_vrf *zvrf)
+void zebra_redistribute_delete(ZAPI_HANDLER_ARGS)
 {
        afi_t afi = 0;
        int type = 0;
        u_short instance;
 
-       STREAM_GETC(client->ibuf, afi);
-       STREAM_GETC(client->ibuf, type);
-       STREAM_GETW(client->ibuf, instance);
+       STREAM_GETC(msg, afi);
+       STREAM_GETC(msg, type);
+       STREAM_GETW(msg, instance);
 
        if (afi == 0 || afi > AFI_MAX) {
                zlog_warn("%s: Specified afi %d does not exist",
@@ -325,15 +334,13 @@ stream_failure:
        return;
 }
 
-void zebra_redistribute_default_add(int command, struct zserv *client,
-                                   int length, struct zebra_vrf *zvrf)
+void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS)
 {
        vrf_bitmap_set(client->redist_default, zvrf_id(zvrf));
        zebra_redistribute_default(client, zvrf_id(zvrf));
 }
 
-void zebra_redistribute_default_delete(int command, struct zserv *client,
-                                      int length, struct zebra_vrf *zvrf)
+void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS)
 {
        vrf_bitmap_unset(client->redist_default, zvrf_id(zvrf));
 }
@@ -519,8 +526,8 @@ int zebra_add_import_table_entry(struct route_node *rn, struct route_entry *re,
        afi = family2afi(rn->p.family);
        if (rmap_name)
                ret = zebra_import_table_route_map_check(
-                       afi, re->type, &rn->p, re->nexthop, re->vrf_id, re->tag,
-                       rmap_name);
+                       afi, re->type, &rn->p, re->ng.nexthop, re->vrf_id,
+                       re->tag, rmap_name);
 
        if (ret != RMAP_MATCH) {
                zebra_del_import_table_entry(rn, re);
@@ -552,7 +559,7 @@ int zebra_add_import_table_entry(struct route_node *rn, struct route_entry *re,
        newre->nexthop_num = 0;
        newre->uptime = time(NULL);
        newre->instance = re->table;
-       route_entry_copy_nexthops(newre, re->nexthop);
+       route_entry_copy_nexthops(newre, re->ng.nexthop);
 
        rib_add_multipath(afi, SAFI_UNICAST, &p, NULL, newre);
 
@@ -568,8 +575,8 @@ int zebra_del_import_table_entry(struct route_node *rn, struct route_entry *re)
        prefix_copy(&p, &rn->p);
 
        rib_delete(afi, SAFI_UNICAST, re->vrf_id, ZEBRA_ROUTE_TABLE, re->table,
-                  re->flags, &p, NULL, re->nexthop, zebrad.rtm_table_default,
-                  re->metric, false, NULL);
+                  re->flags, &p, NULL, re->ng.nexthop,
+                  zebrad.rtm_table_default, re->metric, false, NULL);
 
        return 0;
 }
index 5edb06c3da7d4e2c5f4d4dbb0d203ed99c3efa7a..e551f820cc187f0132eb9dde2c2e72d652fa3d75 100644 (file)
 #include "vty.h"
 #include "vrf.h"
 
-extern void zebra_redistribute_add(int, struct zserv *, int,
-                                  struct zebra_vrf *zvrf);
-extern void zebra_redistribute_delete(int, struct zserv *, int,
-                                     struct zebra_vrf *zvrf);
-
-extern void zebra_redistribute_default_add(int, struct zserv *, int,
-                                          struct zebra_vrf *zvrf);
-extern void zebra_redistribute_default_delete(int, struct zserv *, int,
-                                             struct zebra_vrf *zvrf);
+/* ZAPI command handlers */
+extern void zebra_redistribute_add(ZAPI_HANDLER_ARGS);
+extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
+extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
+extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
+/* ----------------- */
 
 extern void redistribute_update(struct prefix *, struct prefix *,
                                struct route_entry *, struct route_entry *);
index 5f03f1a1316fb3295b38bef62adf7098adde5860..0562d544e64267c87c44488fbfd86cebc915e5f9 100644 (file)
@@ -29,6 +29,7 @@
 #include "table.h"
 #include "queue.h"
 #include "nexthop.h"
+#include "nexthop_group.h"
 #include "vrf.h"
 #include "if.h"
 #include "mpls.h"
@@ -43,7 +44,7 @@ struct route_entry {
        struct route_entry *prev;
 
        /* Nexthop structure */
-       struct nexthop *nexthop;
+       struct nexthop_group ng;
 
        /* Tag */
        route_tag_t tag;
@@ -229,23 +230,24 @@ typedef enum {
        RIB_UPDATE_OTHER
 } rib_update_event_t;
 
-extern struct nexthop *route_entry_nexthop_ifindex_add(struct route_entry *,
-                                                      ifindex_t,
+extern struct nexthop *route_entry_nexthop_ifindex_add(struct route_entry *re,
+                                                      ifindex_t ifindex,
                                                       vrf_id_t nh_vrf_id);
-extern struct nexthop *route_entry_nexthop_blackhole_add(struct route_entry *,
-                                                        enum blackhole_type);
-extern struct nexthop *route_entry_nexthop_ipv4_add(struct route_entry *,
-                                                   struct in_addr *,
-                                                   struct in_addr *,
+extern struct nexthop *
+route_entry_nexthop_blackhole_add(struct route_entry *re,
+                                 enum blackhole_type bh_type);
+extern struct nexthop *route_entry_nexthop_ipv4_add(struct route_entry *re,
+                                                   struct in_addr *ipv4,
+                                                   struct in_addr *src,
                                                    vrf_id_t nh_vrf_id);
 extern struct nexthop *
-route_entry_nexthop_ipv4_ifindex_add(struct route_entry *, struct in_addr *,
-                                    struct in_addr *, ifindex_t,
-                                    vrf_id_t nh_vrf_id);
+route_entry_nexthop_ipv4_ifindex_add(struct route_entry *re,
+                                    struct in_addr *ipv4, struct in_addr *src,
+                                    ifindex_t ifindex, vrf_id_t nh_vrf_id);
 extern void route_entry_nexthop_delete(struct route_entry *re,
                                       struct nexthop *nexthop);
-extern struct nexthop *route_entry_nexthop_ipv6_add(struct route_entry *,
-                                                   struct in6_addr *,
+extern struct nexthop *route_entry_nexthop_ipv6_add(struct route_entry *re,
+                                                   struct in6_addr *ipv6,
                                                    vrf_id_t nh_vrf_id);
 extern struct nexthop *
 route_entry_nexthop_ipv6_ifindex_add(struct route_entry *re,
@@ -257,8 +259,9 @@ extern void route_entry_copy_nexthops(struct route_entry *re,
                                      struct nexthop *nh);
 
 #define route_entry_dump(prefix, src, re) _route_entry_dump(__func__, prefix, src, re)
-extern void _route_entry_dump(const char *, union prefixconstptr,
-                             union prefixconstptr, const struct route_entry *);
+extern void _route_entry_dump(const char *func, union prefixconstptr pp,
+                             union prefixconstptr src_pp,
+                             const struct route_entry *re);
 /* RPF lookup behaviour */
 enum multicast_mode {
        MCAST_NO_CONFIG = 0,  /* MIX_MRIB_FIRST, but no show in config write */
@@ -273,11 +276,11 @@ enum multicast_mode {
 extern void multicast_mode_ipv4_set(enum multicast_mode mode);
 extern enum multicast_mode multicast_mode_ipv4_get(void);
 
-extern void rib_lookup_and_dump(struct prefix_ipv4 *, vrf_id_t);
-extern void rib_lookup_and_pushup(struct prefix_ipv4 *, vrf_id_t);
+extern void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id);
+extern void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id);
 
-extern int rib_lookup_ipv4_route(struct prefix_ipv4 *, union sockunion *,
-                                vrf_id_t);
+extern int rib_lookup_ipv4_route(struct prefix_ipv4 *p, union sockunion *qgate,
+                                vrf_id_t vrf_id);
 #define ZEBRA_RIB_LOOKUP_ERROR -1
 #define ZEBRA_RIB_FOUND_EXACT 0
 #define ZEBRA_RIB_FOUND_NOGATE 1
@@ -304,8 +307,8 @@ extern int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                   u_int32_t table_id, u_int32_t metric, u_int32_t mtu,
                   uint8_t distance, route_tag_t tag);
 
-extern int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *,
-                            struct prefix_ipv6 *src_p, struct route_entry *);
+extern int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
+                            struct prefix_ipv6 *src_p, struct route_entry *re);
 
 extern void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                       u_short instance, int flags, struct prefix *p,
@@ -313,27 +316,30 @@ extern void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                       u_int32_t table_id, u_int32_t metric, bool fromkernel,
                       struct ethaddr *rmac);
 
-extern struct route_entry *rib_match(afi_t afi, safi_t safi, vrf_id_t,
-                                    union g_addr *,
+extern struct route_entry *rib_match(afi_t afi, safi_t safi, vrf_id_t vrf_id,
+                                    union g_addr *addr,
                                     struct route_node **rn_out);
 extern struct route_entry *rib_match_ipv4_multicast(vrf_id_t vrf_id,
                                                    struct in_addr addr,
                                                    struct route_node **rn_out);
 
-extern struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *, vrf_id_t);
+extern struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *p,
+                                          vrf_id_t vrf_id);
 
-extern void rib_update(vrf_id_t, rib_update_event_t);
-extern void rib_weed_tables(void);
+extern void rib_update(vrf_id_t vrf_id, rib_update_event_t event);
 extern void rib_sweep_route(void);
-extern void rib_close_table(struct route_table *);
+extern void rib_sweep_table(struct route_table *table);
+extern void rib_close_table(struct route_table *table);
 extern void rib_init(void);
 extern unsigned long rib_score_proto(u_char proto, u_short instance);
+extern unsigned long rib_score_proto_table(u_char proto, u_short instance,
+                                          struct route_table *table);
 extern void rib_queue_add(struct route_node *rn);
 extern void meta_queue_free(struct meta_queue *mq);
 extern int zebra_rib_labeled_unicast(struct route_entry *re);
 extern struct route_table *rib_table_ipv6;
 
-extern void rib_unlink(struct route_node *, struct route_entry *);
+extern void rib_unlink(struct route_node *rn, struct route_entry *re);
 extern int rib_gc_dest(struct route_node *rn);
 extern struct route_table *rib_tables_iter_next(rib_tables_iter_t *iter);
 
@@ -446,6 +452,8 @@ DECLARE_HOOK(rib_update, (struct route_node * rn, const char *reason),
 extern void zebra_vty_init(void);
 extern int static_config(struct vty *vty, struct zebra_vrf *zvrf, afi_t afi,
                         safi_t safi, const char *cmd);
+extern void static_config_install_delayed_routes(struct zebra_vrf *zvrf);
+
 extern pid_t pid;
 
 #endif /*_ZEBRA_RIB_H */
index e95665feb4e808780ef3f28d255f22b2ebaee24a..2b758c58d84af71bdacb9fabb98f3fada0fd939b 100644 (file)
@@ -1398,7 +1398,7 @@ static int netlink_route_multipath(int cmd, struct prefix *p,
        /* Count overall nexthops so we can decide whether to use singlepath
         * or multipath case. */
        nexthop_num = 0;
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
                if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
                        continue;
                if (cmd == RTM_NEWROUTE && !NEXTHOP_IS_ACTIVE(nexthop->flags))
@@ -1413,7 +1413,7 @@ static int netlink_route_multipath(int cmd, struct prefix *p,
        /* Singlepath case. */
        if (nexthop_num == 1 || multipath_num == 1) {
                nexthop_num = 0;
-               for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+               for (ALL_NEXTHOPS(re->ng, nexthop)) {
                        /*
                         * So we want to cover 2 types of blackhole
                         * routes here:
@@ -1513,7 +1513,7 @@ static int netlink_route_multipath(int cmd, struct prefix *p,
                rtnh = RTA_DATA(rta);
 
                nexthop_num = 0;
-               for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+               for (ALL_NEXTHOPS(re->ng, nexthop)) {
                        if (nexthop_num >= multipath_num)
                                break;
 
index 1aa402672ea61365298480e2290b9fc9f9ddb74e..433faf789afe925b9017cc1cafea30ae5eb123a1 100644 (file)
@@ -123,7 +123,7 @@ static int kernel_rtm_ipv4(int cmd, struct prefix *p, struct route_entry *re)
 #endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
 
        /* Make gateway. */
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
                if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
                        continue;
 
@@ -303,7 +303,7 @@ static int kernel_rtm_ipv6(int cmd, struct prefix *p, struct route_entry *re)
 #endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
 
        /* Make gateway. */
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
                if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
                        continue;
 
index 5eebca163b5c1a275c563b0982570da06f3f65cc..d0b821bfd21d1ce1988ef555a191bd02523d5d5e 100644 (file)
@@ -801,8 +801,7 @@ static void ipv6_nd_suppress_ra_set(struct interface *ifp,
  * if the operator has explicitly enabled RA. The enable request can also
  * specify a RA interval (in seconds).
  */
-void zebra_interface_radv_set(struct zserv *client, u_short length,
-                             struct zebra_vrf *zvrf, int enable)
+static void zebra_interface_radv_set(ZAPI_HANDLER_ARGS, int enable)
 {
        struct stream *s;
        ifindex_t ifindex;
@@ -810,7 +809,7 @@ void zebra_interface_radv_set(struct zserv *client, u_short length,
        struct zebra_if *zif;
        int ra_interval;
 
-       s = client->ibuf;
+       s = msg;
 
        /* Get interface index and RA interval. */
        STREAM_GETL(s, ifindex);
@@ -859,6 +858,15 @@ stream_failure:
        return;
 }
 
+void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS)
+{
+       zebra_interface_radv_set(client, hdr, msg, zvrf, 0);
+}
+void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS)
+{
+       zebra_interface_radv_set(client, hdr, msg, zvrf, 1);
+}
+
 DEFUN (ipv6_nd_suppress_ra,
        ipv6_nd_suppress_ra_cmd,
        "ipv6 nd suppress-ra",
index 2cae6d06f9bb1dfaef79ae4d3edabd7bfba1f3a5..8fd67c8a63b3571537996eb6acb7cbc0c1a17ea9 100644 (file)
@@ -103,7 +103,8 @@ typedef enum {
 extern void rtadv_init(struct zebra_ns *);
 extern void rtadv_terminate(struct zebra_ns *);
 extern void rtadv_cmd_init(void);
-extern void zebra_interface_radv_set(struct zserv *client, u_short length,
-                                    struct zebra_vrf *zvrf, int enable);
+extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
+extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
+
 
 #endif /* _ZEBRA_RTADV_H */
index 95bc8db1c92fff2fb27f1614cc4cb990f9338753..38321bc4161a87eac6cdf94f37f5aae412441346 100644 (file)
@@ -263,4 +263,8 @@ void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *vlan_if)
 {
 }
 
+void kernel_read_pbr_rules(struct zebra_ns *zns)
+{
+}
+
 #endif /* SUNOS_5 */
index ec29d1820ece9d5680cbc41af3be2f6af8aff88d..e9920460785cdf85931b4d0316d3c51048e727a4 100644 (file)
@@ -25,7 +25,9 @@
 
 #include "vty.h"
 #include "zebra/rt.h"
+#include "zebra/zebra_pbr.h"
 #include "zebra/rt_netlink.h"
+#include "zebra/rule_netlink.h"
 
 void route_read(struct zebra_ns *zns)
 {
@@ -53,4 +55,9 @@ void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *vlan_if)
        netlink_neigh_read_for_vlan(zns, vlan_if);
 }
 
+void kernel_read_pbr_rules(struct zebra_ns *zns)
+{
+       netlink_rules_read(zns);
+}
+
 #endif /* GNU_LINUX */
index 4f5a80612ee6977c4c3b4c0a320ffe7f99f3ca33..fba67e3d0c4991a3e4d9fcabdf13ee1164114e4b 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "zebra/rt.h"
 #include "zebra/kernel_socket.h"
+#include "zebra/zebra_pbr.h"
 
 /* Kernel routing table read up by sysctl function. */
 void route_read(struct zebra_ns *zns)
@@ -92,4 +93,8 @@ void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *vlan_if)
 {
 }
 
+void kernel_read_pbr_rules(struct zebra_ns *zns)
+{
+}
+
 #endif /* !defined(GNU_LINUX) && !defined(SUNOS_5) */
diff --git a/zebra/rule_netlink.c b/zebra/rule_netlink.c
new file mode 100644 (file)
index 0000000..2122f9f
--- /dev/null
@@ -0,0 +1,267 @@
+/*
+ * Zebra Policy Based Routing (PBR) interaction with the kernel using
+ * netlink.
+ * Copyright (C) 2018  Cumulus Networks, Inc.
+ *
+ * This file is part of FRR.
+ *
+ * FRR is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FRR; see the file COPYING.  If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include <zebra.h>
+
+#ifdef HAVE_NETLINK
+
+#include "if.h"
+#include "prefix.h"
+#include "vrf.h"
+
+#include <linux/fib_rules.h>
+#include "zebra/zserv.h"
+#include "zebra/zebra_ns.h"
+#include "zebra/zebra_vrf.h"
+#include "zebra/rt.h"
+#include "zebra/interface.h"
+#include "zebra/debug.h"
+#include "zebra/rtadv.h"
+#include "zebra/kernel_netlink.h"
+#include "zebra/rule_netlink.h"
+#include "zebra/zebra_pbr.h"
+
+/* definitions */
+
+/* static function declarations */
+
+/* Private functions */
+
+/* Install or uninstall specified rule for a specific interface.
+ * Form netlink message and ship it. Currently, notify status after
+ * waiting for netlink status.
+ */
+static int netlink_rule_update(int cmd, struct zebra_pbr_rule *rule)
+{
+       int family;
+       int bytelen;
+       struct {
+               struct nlmsghdr n;
+               struct fib_rule_hdr frh;
+               char buf[NL_PKT_BUF_SIZE];
+       } req;
+       struct zebra_ns *zns = zebra_ns_lookup(NS_DEFAULT);
+       struct sockaddr_nl snl;
+       char buf1[PREFIX_STRLEN];
+       char buf2[PREFIX_STRLEN];
+
+       memset(&req, 0, sizeof(req) - NL_PKT_BUF_SIZE);
+       family = PREFIX_FAMILY(&rule->filter.src_ip);
+       bytelen = (family == AF_INET ? 4 : 16);
+
+       req.n.nlmsg_type = cmd;
+       req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
+       req.n.nlmsg_flags = NLM_F_REQUEST;
+       req.n.nlmsg_pid = zns->netlink_cmd.snl.nl_pid;
+
+       req.frh.family = family;
+       req.frh.action = FR_ACT_TO_TBL;
+
+       if (cmd == RTM_NEWRULE)
+               req.n.nlmsg_flags |= NLM_F_CREATE | NLM_F_EXCL;
+
+       /* rule's pref # */
+       addattr32(&req.n, sizeof(req), FRA_PRIORITY, rule->priority);
+
+       /* interface on which applied */
+       if (rule->ifp)
+               addattr_l(&req.n, sizeof(req), FRA_IFNAME, rule->ifp->name,
+                         strlen(rule->ifp->name) + 1);
+
+       /* source IP, if specified */
+       if (IS_RULE_FILTERING_ON_SRC_IP(rule)) {
+               req.frh.src_len = rule->filter.src_ip.prefixlen;
+               addattr_l(&req.n, sizeof(req), FRA_SRC,
+                         &rule->filter.src_ip.u.prefix, bytelen);
+       }
+       /* destination IP, if specified */
+       if (IS_RULE_FILTERING_ON_DST_IP(rule)) {
+               req.frh.dst_len = rule->filter.dst_ip.prefixlen;
+               addattr_l(&req.n, sizeof(req), FRA_DST,
+                         &rule->filter.dst_ip.u.prefix, bytelen);
+       }
+
+       /* Route table to use to forward, if filter criteria matches. */
+       if (rule->action.table < 256)
+               req.frh.table = rule->action.table;
+       else {
+               req.frh.table = RT_TABLE_UNSPEC;
+               addattr32(&req.n, sizeof(req), FRA_TABLE,
+                         rule->action.table);
+       }
+
+       if (IS_ZEBRA_DEBUG_KERNEL)
+               zlog_debug(
+                       "Tx %s family %s IF %s(%u) Pref %u Src %s Dst %s Table %u",
+                       nl_msg_type_to_str(cmd), nl_family_to_str(family),
+                       rule->ifp ? rule->ifp->name : "Unknown",
+                       rule->ifp ? rule->ifp->ifindex : 0, rule->priority,
+                       prefix2str(&rule->filter.src_ip, buf1, sizeof(buf1)),
+                       prefix2str(&rule->filter.dst_ip, buf2, sizeof(buf2)),
+                       rule->action.table);
+
+       /* Ship off the message.
+        * Note: Currently, netlink_talk() is a blocking call which returns
+        * back the status.
+        */
+       memset(&snl, 0, sizeof(snl));
+       snl.nl_family = AF_NETLINK;
+       return netlink_talk(netlink_talk_filter, &req.n,
+                           &zns->netlink_cmd, zns, 0);
+}
+
+
+/* Public functions */
+/*
+ * Install specified rule for a specific interface. The preference is what
+ * goes in the rule to denote relative ordering; it may or may not be the
+ * same as the rule's user-defined sequence number.
+ */
+void kernel_add_pbr_rule(struct zebra_pbr_rule *rule)
+{
+       int ret = 0;
+
+       ret = netlink_rule_update(RTM_NEWRULE, rule);
+       kernel_pbr_rule_add_del_status(rule,
+                                      (!ret) ? SOUTHBOUND_INSTALL_SUCCESS
+                                             : SOUTHBOUND_INSTALL_FAILURE);
+}
+
+/*
+ * Uninstall specified rule for a specific interface.
+ */
+void kernel_del_pbr_rule(struct zebra_pbr_rule *rule)
+{
+       int ret = 0;
+
+       ret = netlink_rule_update(RTM_DELRULE, rule);
+       kernel_pbr_rule_add_del_status(rule,
+                                      (!ret) ? SOUTHBOUND_DELETE_SUCCESS
+                                             : SOUTHBOUND_DELETE_FAILURE);
+}
+
+/*
+ * Handle netlink notification informing a rule add or delete.
+ * Handling of an ADD is TBD.
+ * DELs are notified up, if other attributes indicate it may be a
+ * notification of interest. The expectation is that if this corresponds
+ * to a PBR rule added by FRR, it will be readded.
+ */
+int netlink_rule_change(struct sockaddr_nl *snl, struct nlmsghdr *h,
+                       ns_id_t ns_id, int startup)
+{
+       struct zebra_ns *zns;
+       struct fib_rule_hdr *frh;
+       struct rtattr *tb[FRA_MAX + 1];
+       int len;
+       char *ifname;
+       struct zebra_pbr_rule rule;
+       char buf1[PREFIX_STRLEN];
+       char buf2[PREFIX_STRLEN];
+
+       /* Basic validation followed by extracting attributes. */
+       if (h->nlmsg_type != RTM_NEWRULE && h->nlmsg_type != RTM_DELRULE)
+               return 0;
+
+       /* TBD */
+       if (h->nlmsg_type == RTM_NEWRULE)
+               return 0;
+
+       len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct fib_rule_hdr));
+       if (len < 0)
+               return -1;
+
+       frh = NLMSG_DATA(h);
+       if (frh->family != AF_INET && frh->family != AF_INET6)
+               return 0;
+       if (frh->action != FR_ACT_TO_TBL)
+               return 0;
+
+       memset(tb, 0, sizeof(tb));
+       netlink_parse_rtattr(tb, FRA_MAX, RTM_RTA(frh), len);
+
+       /* TBD: We don't care about rules not specifying an IIF. */
+       if (tb[FRA_IFNAME] == NULL)
+               return 0;
+
+       /* If we don't know the interface, we don't care. */
+       ifname = (char *)RTA_DATA(tb[FRA_IFNAME]);
+       zns = zebra_ns_lookup(ns_id);
+       rule.ifp = if_lookup_by_name_per_ns(zns, ifname);
+       if (!rule.ifp)
+               return 0;
+
+       memset(&rule, 0, sizeof(rule));
+       if (tb[FRA_PRIORITY])
+               rule.priority = *(uint32_t *)RTA_DATA(tb[FRA_PRIORITY]);
+
+       if (tb[FRA_SRC]) {
+               if (frh->family == AF_INET)
+                       memcpy(&rule.filter.src_ip.u.prefix4,
+                              RTA_DATA(tb[FRA_SRC]), 4);
+               else
+                       memcpy(&rule.filter.src_ip.u.prefix6,
+                              RTA_DATA(tb[FRA_SRC]), 16);
+               rule.filter.src_ip.prefixlen = frh->src_len;
+               rule.filter.filter_bm |= PBR_FILTER_SRC_IP;
+       }
+
+       if (tb[FRA_DST]) {
+               if (frh->family == AF_INET)
+                       memcpy(&rule.filter.dst_ip.u.prefix4,
+                              RTA_DATA(tb[FRA_DST]), 4);
+               else
+                       memcpy(&rule.filter.dst_ip.u.prefix6,
+                              RTA_DATA(tb[FRA_DST]), 16);
+               rule.filter.dst_ip.prefixlen = frh->dst_len;
+               rule.filter.filter_bm |= PBR_FILTER_DST_IP;
+       }
+
+       if (tb[FRA_TABLE])
+               rule.action.table = *(uint32_t *)RTA_DATA(tb[FRA_TABLE]);
+       else
+               rule.action.table = frh->table;
+
+       if (IS_ZEBRA_DEBUG_KERNEL)
+               zlog_debug(
+                       "Rx %s family %s IF %s(%u) Pref %u Src %s Dst %s Table %u",
+                       nl_msg_type_to_str(h->nlmsg_type),
+                       nl_family_to_str(frh->family), rule.ifp->name,
+                       rule.ifp->ifindex, rule.priority,
+                       prefix2str(&rule.filter.src_ip, buf1, sizeof(buf1)),
+                       prefix2str(&rule.filter.dst_ip, buf2, sizeof(buf2)),
+                       rule.action.table);
+
+       return kernel_pbr_rule_del(&rule);
+}
+
+/*
+ * Get to know existing PBR rules in the kernel - typically called at startup.
+ * TBD.
+ */
+int netlink_rules_read(struct zebra_ns *zns)
+{
+       return 0;
+}
+
+#endif /* HAVE_NETLINK */
diff --git a/zebra/rule_netlink.h b/zebra/rule_netlink.h
new file mode 100644 (file)
index 0000000..3a9b513
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Zebra Policy Based Routing (PBR) interaction with the kernel using
+ * netlink - public definitions and function declarations.
+ * Copyright (C) 2018 Cumulus Networks, Inc.
+ *
+ * This file is part of FRR.
+ *
+ * FRR is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FRR; see the file COPYING.  If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef _ZEBRA_RULE_NETLINK_H
+#define _ZEBRA_RULE_NETLINK_H
+
+#ifdef HAVE_NETLINK
+
+/*
+ * Handle netlink notification informing a rule add or delete.
+ */
+extern int netlink_rule_change(struct sockaddr_nl *snl, struct nlmsghdr *h,
+                               ns_id_t ns_id, int startup);
+
+/*
+ * Get to know existing PBR rules in the kernel - typically called at startup.
+ */
+extern int netlink_rules_read(struct zebra_ns *zns);
+
+#endif /* HAVE_NETLINK */
+
+#endif /* _ZEBRA_RULE_NETLINK_H */
diff --git a/zebra/rule_socket.c b/zebra/rule_socket.c
new file mode 100644 (file)
index 0000000..46c53f9
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Zebra Policy Based Routing (PBR) interaction with the kernel using
+ * netlink.
+ * Copyright (C) 2018  Cumulus Networks, Inc.
+ *                     Donald Sharp
+ *
+ * This file is part of FRR.
+ *
+ * FRR is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FRR; see the file COPYING.  If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include <zebra.h>
+
+#ifndef HAVE_NETLINK
+
+#include "if.h"
+#include "prefix.h"
+#include "vrf.h"
+
+#include "zebra/zserv.h"
+#include "zebra/zebra_ns.h"
+#include "zebra/zebra_vrf.h"
+#include "zebra/rt.h"
+#include "zebra/interface.h"
+#include "zebra/debug.h"
+#include "zebra/rtadv.h"
+#include "zebra/kernel_netlink.h"
+#include "zebra/rule_netlink.h"
+#include "zebra/zebra_pbr.h"
+
+void kernel_add_pbr_rule(struct zebra_pbr_rule *rule)
+{
+}
+void kernel_del_pbr_rule(struct zebra_pbr_rule *rule)
+{
+}
+
+#endif
index bb7439c0f617625168abc430d8006ef32d23d668..ef157b7539e84787df7f7fe4bd378ff7d4940d4e 100644 (file)
@@ -45,6 +45,8 @@ zebra_zebra_SOURCES = \
        zebra/rtread_getmsg.c \
        zebra/rtread_netlink.c \
        zebra/rtread_sysctl.c \
+       zebra/rule_netlink.c \
+       zebra/rule_socket.c \
        zebra/zebra_l2.c \
        zebra/zebra_memory.c \
        zebra/zebra_mpls.c \
@@ -54,6 +56,7 @@ zebra_zebra_SOURCES = \
        zebra/zebra_mpls_vty.c \
        zebra/zebra_mroute.c \
        zebra/zebra_ns.c \
+       zebra/zebra_pbr.c \
        zebra/zebra_ptm.c \
        zebra/zebra_ptm_redistribute.c \
        zebra/zebra_pw.c \
@@ -90,12 +93,14 @@ noinst_HEADERS += \
        zebra/rt.h \
        zebra/rt_netlink.h \
        zebra/rtadv.h \
+       zebra/rule_netlink.h \
        zebra/zebra_fpm_private.h \
        zebra/zebra_l2.h \
        zebra/zebra_memory.h \
        zebra/zebra_mpls.h \
        zebra/zebra_mroute.h \
        zebra/zebra_ns.h \
+       zebra/zebra_pbr.h \
        zebra/zebra_ptm.h \
        zebra/zebra_ptm_redistribute.h \
        zebra/zebra_pw.h \
index 27c789137263b48533a4d92068d510dbab50d947..97a0e142fb336e8235747e7443ec8cfee3be45d2 100644 (file)
@@ -249,7 +249,7 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
        ri->rtm_type = RTN_UNICAST;
        ri->metric = &re->metric;
 
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
                if (ri->num_nhs >= multipath_num)
                        break;
 
index b850f1fb1e12f3ad3c862a9199c3c2b700273c93..e661b6efc77748065d9b17c1b73b2e364475c813 100644 (file)
@@ -170,7 +170,7 @@ static Fpm__AddRoute *create_add_route_message(qpb_allocator_t *allocator,
         * Figure out the set of nexthops to be added to the message.
         */
        num_nhs = 0;
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
                if (num_nhs >= multipath_num)
                        break;
 
index 2dc98127f565e78ed15ed3aecc1af49cd003c6a4..8375d45d2f61619bb0ed0e498bd83d67042fb23b 100644 (file)
@@ -182,7 +182,7 @@ static int lsp_install(struct zebra_vrf *zvrf, mpls_label_t label,
         * the label advertised by the recursive nexthop (plus we don't have the
         * logic yet to push multiple labels).
         */
-       for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next) {
+       for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next) {
                /* Skip inactive and recursive entries. */
                if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
                        continue;
@@ -455,8 +455,7 @@ static int fec_send(zebra_fec_t *fec, struct zserv *client)
        rn = fec->rn;
 
        /* Get output stream. */
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_FEC_UPDATE, VRF_DEFAULT);
 
@@ -464,7 +463,7 @@ static int fec_send(zebra_fec_t *fec, struct zserv *client)
        stream_put_prefix(s, &rn->p);
        stream_putl(s, fec->label);
        stream_putw_at(s, 0, stream_get_endp(s));
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /*
@@ -637,7 +636,7 @@ static int nhlfe_nexthop_active_ipv4(zebra_nhlfe_t *nhlfe,
                    || !CHECK_FLAG(match->flags, ZEBRA_FLAG_SELECTED))
                        continue;
 
-               for (match_nh = match->nexthop; match_nh;
+               for (match_nh = match->ng.nexthop; match_nh;
                     match_nh = match_nh->next) {
                        if (match->type == ZEBRA_ROUTE_CONNECT
                            || nexthop->ifindex == match_nh->ifindex) {
@@ -688,10 +687,10 @@ static int nhlfe_nexthop_active_ipv6(zebra_nhlfe_t *nhlfe,
                        break;
        }
 
-       if (!match || !match->nexthop)
+       if (!match || !match->ng.nexthop)
                return 0;
 
-       nexthop->ifindex = match->nexthop->ifindex;
+       nexthop->ifindex = match->ng.nexthop->ifindex;
        return 1;
 }
 
@@ -2255,6 +2254,19 @@ void zebra_mpls_print_fec(struct vty *vty, struct zebra_vrf *zvrf,
        fec_print(rn->info, vty);
 }
 
+static bool mpls_ftn_update_nexthop(int add, struct nexthop *nexthop,
+                                   enum lsp_types_t type, mpls_label_t label)
+{
+       if (add && nexthop->nh_label_type == ZEBRA_LSP_NONE)
+               nexthop_add_labels(nexthop, type, 1, &label);
+       else if (!add && nexthop->nh_label_type == type)
+               nexthop_del_labels(nexthop);
+       else
+               return false;
+
+       return true;
+}
+
 /*
  * Install/uninstall a FEC-To-NHLFE (FTN) binding.
  */
@@ -2267,6 +2279,7 @@ int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
        struct route_node *rn;
        struct route_entry *re;
        struct nexthop *nexthop;
+       bool found;
 
        /* Lookup table.  */
        table = zebra_vrf_table(family2afi(prefix->family), SAFI_UNICAST,
@@ -2286,7 +2299,8 @@ int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
        if (re == NULL)
                return -1;
 
-       for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next) {
+       found = false;
+       for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next) {
                switch (nexthop->type) {
                case NEXTHOP_TYPE_IPV4:
                case NEXTHOP_TYPE_IPV4_IFINDEX:
@@ -2298,7 +2312,11 @@ int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
                        if (nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX
                            && nexthop->ifindex != ifindex)
                                continue;
-                       goto found;
+                       if (!mpls_ftn_update_nexthop(add, nexthop, type,
+                                                    out_label))
+                               return 0;
+                       found = true;
+                       break;
                case NEXTHOP_TYPE_IPV6:
                case NEXTHOP_TYPE_IPV6_IFINDEX:
                        if (gtype != NEXTHOP_TYPE_IPV6
@@ -2309,21 +2327,18 @@ int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
                        if (nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX
                            && nexthop->ifindex != ifindex)
                                continue;
-                       goto found;
+                       if (!mpls_ftn_update_nexthop(add, nexthop, type,
+                                                    out_label))
+                               return 0;
+                       found = true;
+                       break;
                default:
                        break;
                }
        }
-       /* nexthop not found */
-       return -1;
 
-found:
-       if (add && nexthop->nh_label_type == ZEBRA_LSP_NONE)
-               nexthop_add_labels(nexthop, type, 1, &out_label);
-       else if (!add && nexthop->nh_label_type == type)
-               nexthop_del_labels(nexthop);
-       else
-               return 0;
+       if (!found)
+               return -1;
 
        SET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
        SET_FLAG(re->status, ROUTE_ENTRY_LABELS_CHANGED);
@@ -2504,7 +2519,7 @@ void mpls_ldp_ftn_uninstall_all(struct zebra_vrf *zvrf, int afi)
        for (rn = route_top(table); rn; rn = route_next(rn)) {
                update = 0;
                RNODE_FOREACH_RE (rn, re) {
-                       for (nexthop = re->nexthop; nexthop;
+                       for (nexthop = re->ng.nexthop; nexthop;
                             nexthop = nexthop->next) {
                                if (nexthop->nh_label_type != ZEBRA_LSP_LDP)
                                        continue;
index e9cd19ebe0cfad8a982f43490637615c48b2340a..042bd3769e774c1fcaea995aeb46ddf764bd9325 100644 (file)
 #include "zebra/rt.h"
 #include "zebra/debug.h"
 
-int zebra_ipmr_route_stats(struct zserv *client, u_short length,
-                          struct zebra_vrf *zvrf)
+void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS)
 {
        struct mcast_route_data mroute;
        struct stream *s;
        int suc = -1;
 
        memset(&mroute, 0, sizeof(mroute));
-       STREAM_GET(&mroute.sg.src, client->ibuf, 4);
-       STREAM_GET(&mroute.sg.grp, client->ibuf, 4);
-       STREAM_GETL(client->ibuf, mroute.ifindex);
+       STREAM_GET(&mroute.sg.src, msg, 4);
+       STREAM_GET(&mroute.sg.grp, msg, 4);
+       STREAM_GETL(msg, mroute.ifindex);
 
        if (IS_ZEBRA_DEBUG_KERNEL) {
                char sbuf[40];
@@ -57,7 +56,7 @@ int zebra_ipmr_route_stats(struct zserv *client, u_short length,
        suc = kernel_get_ipmr_sg_stats(zvrf, &mroute);
 
 stream_failure:
-       s = client->obuf;
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        stream_reset(s);
 
@@ -68,6 +67,5 @@ stream_failure:
        stream_putl(s, suc);
 
        stream_putw_at(s, 0, stream_get_endp(s));
-       zebra_server_send_message(client);
-       return 0;
+       zebra_server_send_message(client, s);
 }
index 616c3a83ab54c27227daf5e4c6ccfe5d47dc0898..33851536005faa3dc64b013ae5dc48840c8b985d 100644 (file)
 #ifndef __ZEBRA_MROUTE_H__
 #define __ZEBRA_MROUTE_H__
 
+#include "zebra/zserv.h"
+
 struct mcast_route_data {
        struct prefix_sg sg;
        unsigned int ifindex;
        unsigned long long lastused;
 };
 
-int zebra_ipmr_route_stats(struct zserv *client, u_short length,
-                          struct zebra_vrf *zvf);
+void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
 
 #endif
index a81413f5a9db78fe9b9511d5998d23c8c26695db..d278ebe913a37713924537f2de19ac1c09988d44 100644 (file)
@@ -172,6 +172,7 @@ ns_id_t zebra_ns_id_get(const char *netnspath)
        if (sock < 0) {
                zlog_err("netlink( %u) socket() error: %s", sock,
                         safe_strerror(errno));
+               close(fd);
                return NS_UNKNOWN;
        }
        memset(&snl, 0, sizeof(snl));
index 4f55be45b699a108e3b104a0e78dcdb9d36a192c..98b36dd10f72440e25eafda1723ebb8fbc9b0258 100644 (file)
@@ -92,7 +92,11 @@ static void zebra_ns_notify_create_context_from_entry_name(const char *name)
                zlog_warn("NS notify : failed to create VRF %s", name);
                return;
        }
+       if (zserv_privs.change(ZPRIVS_RAISE))
+               zlog_err("Can't raise privileges");
        ret = vrf_netns_handler_create(NULL, vrf, netnspath, ns_id);
+       if (zserv_privs.change(ZPRIVS_LOWER))
+               zlog_err("Can't lower privileges");
        if (ret != CMD_SUCCESS) {
                zlog_warn("NS notify : failed to create NS %s", netnspath);
                return;
index 580ff3eec1a5f21c8ca2410e0fb32c94307d804a..29c179245bf9398a1275fee0d1b0b0dc0cde32cd 100644 (file)
@@ -36,6 +36,8 @@
 #include "debug.h"
 #include "zebra_netns_notify.h"
 #include "zebra_netns_id.h"
+#include "zebra_pbr.h"
+#include "rib.h"
 
 extern struct zebra_privs_t zserv_privs;
 
@@ -161,6 +163,31 @@ struct route_table *zebra_ns_find_table(struct zebra_ns *zns, uint32_t tableid,
                return NULL;
 }
 
+unsigned long zebra_ns_score_proto(u_char proto, u_short instance)
+{
+       struct zebra_ns *zns;
+       struct zebra_ns_table *znst;
+       unsigned long cnt = 0;
+
+       zns = zebra_ns_lookup(NS_DEFAULT);
+
+       RB_FOREACH (znst, zebra_ns_table_head, &zns->ns_tables)
+               cnt += rib_score_proto_table(proto, instance, znst->table);
+
+       return cnt;
+}
+
+void zebra_ns_sweep_route(void)
+{
+       struct zebra_ns_table *znst;
+       struct zebra_ns *zns;
+
+       zns = zebra_ns_lookup(NS_DEFAULT);
+
+       RB_FOREACH (znst, zebra_ns_table_head, &zns->ns_tables)
+               rib_sweep_table(znst->table);
+}
+
 struct route_table *zebra_ns_get_table(struct zebra_ns *zns,
                                       struct zebra_vrf *zvrf, uint32_t tableid,
                                       afi_t afi)
@@ -211,12 +238,15 @@ int zebra_ns_disable(ns_id_t ns_id, void **info)
        struct zebra_ns_table *znst;
        struct zebra_ns *zns = (struct zebra_ns *)(*info);
 
+       hash_clean(zns->rules_hash, zebra_pbr_rules_free);
+       hash_free(zns->rules_hash);
        while (!RB_EMPTY(zebra_ns_table_head, &zns->ns_tables)) {
                znst = RB_ROOT(zebra_ns_table_head, &zns->ns_tables);
 
                RB_REMOVE(zebra_ns_table_head, &zns->ns_tables, znst);
                zebra_ns_free_table(znst);
        }
+
        route_table_finish(zns->if_table);
        zebra_vxlan_ns_disable(zns);
 #if defined(HAVE_RTADV)
@@ -257,6 +287,9 @@ int zebra_ns_init(void)
        /* Default NS is activated */
        zebra_ns_enable(ns_id, (void **)&dzns);
 
+       dzns->rules_hash =
+               hash_create_size(8, zebra_pbr_rules_hash_key,
+                                zebra_pbr_rules_hash_equal, "Rules Hash");
        if (vrf_is_backend_netns()) {
                ns_add_hook(NS_NEW_HOOK, zebra_ns_new);
                ns_add_hook(NS_ENABLE_HOOK, zebra_ns_enabled);
index 3a998a49ff54b5a26e1d2670c6a8eb524944cde2..6655e5c019043d9119138e21770055b141b8f799 100644 (file)
@@ -23,6 +23,7 @@
 #define __ZEBRA_NS_H__
 
 #include <lib/ns.h>
+#include <lib/vrf.h>
 
 #ifdef HAVE_NETLINK
 /* Socket interface to kernel */
@@ -70,6 +71,8 @@ struct zebra_ns {
 
        struct zebra_ns_table_head ns_tables;
 
+       struct hash *rules_hash;
+
        /* Back pointer */
        struct ns *ns;
 };
@@ -87,4 +90,7 @@ extern struct route_table *zebra_ns_get_table(struct zebra_ns *zns,
                                              struct zebra_vrf *zvrf,
                                              uint32_t tableid, afi_t afi);
 int zebra_ns_config_write(struct vty *vty, struct ns *ns);
+
+unsigned long zebra_ns_score_proto(u_char proto, u_short instance);
+void zebra_ns_sweep_route(void);
 #endif
diff --git a/zebra/zebra_pbr.c b/zebra/zebra_pbr.c
new file mode 100644 (file)
index 0000000..090ec2c
--- /dev/null
@@ -0,0 +1,181 @@
+/* Zebra Policy Based Routing (PBR) main handling.
+ * Copyright (C) 2018  Cumulus Networks, Inc.
+ *
+ * This file is part of FRR.
+ *
+ * FRR is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FRR; see the file COPYING.  If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include <zebra.h>
+
+#include <jhash.h>
+#include <hash.h>
+
+#include "zebra/zebra_pbr.h"
+#include "zebra/rt.h"
+
+/* definitions */
+
+/* static function declarations */
+
+/* Private functions */
+
+/* Public functions */
+void zebra_pbr_rules_free(void *arg)
+{
+       struct zebra_pbr_rule *rule;
+
+       rule = (struct zebra_pbr_rule *)arg;
+
+       kernel_del_pbr_rule(rule);
+       XFREE(MTYPE_TMP, rule);
+}
+
+uint32_t zebra_pbr_rules_hash_key(void *arg)
+{
+       struct zebra_pbr_rule *rule;
+       uint32_t key;
+
+       rule = (struct zebra_pbr_rule *)arg;
+       key = jhash_3words(rule->seq, rule->priority, rule->action.table,
+                          prefix_hash_key(&rule->filter.src_ip));
+       if (rule->ifp)
+               key = jhash_1word(rule->ifp->ifindex, key);
+       else
+               key = jhash_1word(0, key);
+
+       return jhash_3words(rule->filter.src_port, rule->filter.dst_port,
+                           prefix_hash_key(&rule->filter.dst_ip),
+                           jhash_1word(rule->unique, key));
+}
+
+int zebra_pbr_rules_hash_equal(const void *arg1, const void *arg2)
+{
+       const struct zebra_pbr_rule *r1, *r2;
+
+       r1 = (const struct zebra_pbr_rule *)arg1;
+       r2 = (const struct zebra_pbr_rule *)arg2;
+
+       if (r1->seq != r2->seq)
+               return 0;
+
+       if (r1->priority != r2->priority)
+               return 0;
+
+       if (r1->unique != r2->unique)
+               return 0;
+
+       if (r1->action.table != r2->action.table)
+               return 0;
+
+       if (r1->filter.src_port != r2->filter.src_port)
+               return 0;
+
+       if (r1->filter.dst_port != r2->filter.dst_port)
+               return 0;
+
+       if (!prefix_same(&r1->filter.src_ip, &r2->filter.src_ip))
+               return 0;
+
+       if (!prefix_same(&r1->filter.dst_ip, &r2->filter.dst_ip))
+               return 0;
+
+       if (r1->ifp != r2->ifp)
+               return 0;
+
+       return 1;
+}
+
+static void *pbr_rule_alloc_intern(void *arg)
+{
+       struct zebra_pbr_rule *zpr;
+       struct zebra_pbr_rule *new;
+
+       zpr = (struct zebra_pbr_rule *)arg;
+
+       new = XCALLOC(MTYPE_TMP, sizeof(*new));
+
+       memcpy(new, zpr, sizeof(*zpr));
+
+       return new;
+}
+
+void zebra_pbr_add_rule(struct zebra_ns *zns, struct zebra_pbr_rule *rule)
+{
+       (void)hash_get(zns->rules_hash, rule, pbr_rule_alloc_intern);
+       kernel_add_pbr_rule(rule);
+}
+
+void zebra_pbr_del_rule(struct zebra_ns *zns, struct zebra_pbr_rule *rule)
+{
+       struct zebra_pbr_rule *lookup;
+
+       lookup = hash_lookup(zns->rules_hash, rule);
+       kernel_del_pbr_rule(rule);
+
+       if (lookup)
+               XFREE(MTYPE_TMP, lookup);
+       else
+               zlog_warn("%s: Rule being deleted we know nothing about",
+                         __PRETTY_FUNCTION__);
+}
+
+static void zebra_pbr_cleanup_rules(struct hash_backet *b, void *data)
+{
+       struct zebra_ns *zns = zebra_ns_lookup(NS_DEFAULT);
+       struct zebra_pbr_rule *rule = b->data;
+       int *sock = data;
+
+       if (rule->sock == *sock) {
+               kernel_del_pbr_rule(rule);
+               hash_release(zns->rules_hash, rule);
+       }
+}
+
+void zebra_pbr_client_close_cleanup(int sock)
+{
+       struct zebra_ns *zns = zebra_ns_lookup(NS_DEFAULT);
+
+       hash_iterate(zns->rules_hash, zebra_pbr_cleanup_rules, &sock);
+}
+
+/*
+ * Handle success or failure of rule (un)install in the kernel.
+ */
+void kernel_pbr_rule_add_del_status(struct zebra_pbr_rule *rule,
+                                   enum southbound_results res)
+{
+       switch (res) {
+       case SOUTHBOUND_INSTALL_SUCCESS:
+               zsend_rule_notify_owner(rule, ZAPI_RULE_INSTALLED);
+               break;
+       case SOUTHBOUND_INSTALL_FAILURE:
+               zsend_rule_notify_owner(rule, ZAPI_RULE_FAIL_INSTALL);
+               break;
+       case SOUTHBOUND_DELETE_SUCCESS:
+               break;
+       case SOUTHBOUND_DELETE_FAILURE:
+               break;
+       }
+}
+
+/*
+ * Handle rule delete notification from kernel.
+ */
+int kernel_pbr_rule_del(struct zebra_pbr_rule *rule)
+{
+       return 0;
+}
diff --git a/zebra/zebra_pbr.h b/zebra/zebra_pbr.h
new file mode 100644 (file)
index 0000000..f910d8e
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Zebra Policy Based Routing (PBR) Data structures and definitions
+ * These are public definitions referenced by multiple files.
+ * Copyright (C) 2018 Cumulus Networks, Inc.
+ *
+ * This file is part of FRR.
+ *
+ * FRR is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FRR; see the file COPYING.  If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef _ZEBRA_PBR_H
+#define _ZEBRA_PBR_H
+
+#include <zebra.h>
+
+#include "prefix.h"
+#include "if.h"
+
+#include "rt.h"
+
+/*
+ * A PBR filter
+ *
+ * The filter or match criteria in a PBR rule.
+ * For simplicity, all supported filters are grouped into a structure rather
+ * than delineating further. A bitmask denotes which filters are actually
+ * specified.
+ */
+struct zebra_pbr_filter {
+       uint32_t filter_bm;
+#define PBR_FILTER_SRC_IP     (1 << 0)
+#define PBR_FILTER_DST_IP     (1 << 1)
+#define PBR_FILTER_SRC_PORT   (1 << 2)
+#define PBR_FILTER_DST_PORT   (1 << 3)
+
+       /* Source and Destination IP address with masks. */
+       struct prefix src_ip;
+       struct prefix dst_ip;
+
+       /* Source and Destination higher-layer (TCP/UDP) port numbers. */
+       uint16_t src_port;
+       uint16_t dst_port;
+};
+
+#define IS_RULE_FILTERING_ON_SRC_IP(r) \
+       (r->filter.filter_bm & PBR_FILTER_SRC_IP)
+#define IS_RULE_FILTERING_ON_DST_IP(r) \
+       (r->filter.filter_bm & PBR_FILTER_DST_IP)
+#define IS_RULE_FILTERING_ON_SRC_PORT(r) \
+       (r->filter.filter_bm & PBR_FILTER_SRC_PORT)
+#define IS_RULE_FILTERING_ON_DST_PORT(r) \
+       (r->filter.filter_bm & PBR_FILTER_DST_PORT)
+
+/*
+ * A PBR action
+ *
+ * The action corresponding to a PBR rule.
+ * While the user specifies the action in a particular way, the forwarding
+ * plane implementation (Linux only) requires that to be encoded into a
+ * route table and the rule then point to that route table; in some cases,
+ * the user criteria may directly point to a table too.
+ */
+struct zebra_pbr_action {
+       uint32_t table;
+};
+
+/*
+ * A PBR rule
+ *
+ * This is a combination of the filter criteria and corresponding action.
+ * Rules also have a user-defined sequence number which defines the relative
+ * order amongst rules.
+ */
+struct zebra_pbr_rule {
+       /*
+        * Originating zclient sock fd, so we can know who to send
+        * back to.
+        */
+       int sock;
+
+       uint32_t seq;
+       uint32_t priority;
+       struct interface *ifp;
+       uint32_t unique;
+       struct zebra_pbr_filter filter;
+       struct zebra_pbr_action action;
+};
+
+void zebra_pbr_add_rule(struct zebra_ns *zns, struct zebra_pbr_rule *rule);
+void zebra_pbr_del_rule(struct zebra_ns *zns, struct zebra_pbr_rule *rule);
+
+/*
+ * Install specified rule for a specific interface.
+ * It is possible that the user-defined sequence number and the one in the
+ * forwarding plane may not coincide, hence the API requires a separate
+ * rule priority - maps to preference/FRA_PRIORITY on Linux.
+ */
+extern void kernel_add_pbr_rule(struct zebra_pbr_rule *rule);
+
+/*
+ * Uninstall specified rule for a specific interface.
+ */
+extern void kernel_del_pbr_rule(struct zebra_pbr_rule *rule);
+
+/*
+ * Get to know existing PBR rules in the kernel - typically called at startup.
+ */
+extern void kernel_read_pbr_rules(struct zebra_ns *zns);
+
+enum southbound_results;
+/*
+ * Handle success or failure of rule (un)install in the kernel.
+ */
+extern void kernel_pbr_rule_add_del_status(struct zebra_pbr_rule *rule,
+                                          enum southbound_results res);
+
+/*
+ * Handle rule delete notification from kernel.
+ */
+extern int kernel_pbr_rule_del(struct zebra_pbr_rule *rule);
+
+extern void zebra_pbr_client_close_cleanup(int sock);
+
+extern void zebra_pbr_rules_free(void *arg);
+extern uint32_t zebra_pbr_rules_hash_key(void *arg);
+extern int zebra_pbr_rules_hash_equal(const void *arg1, const void *arg2);
+
+#endif /* _ZEBRA_PBR_H */
index f6775fa0b12195ba7204641ca97b32421c0d7f44..67c7220b6fe7bd20e0041e7bb7e0173c9abbabf5 100644 (file)
@@ -661,8 +661,7 @@ int zebra_ptm_sock_read(struct thread *thread)
 }
 
 /* BFD peer/dst register/update */
-int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length,
-                              int command, struct zebra_vrf *zvrf)
+void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        struct prefix src_p;
@@ -680,20 +679,20 @@ int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length,
        int data_len = ZEBRA_PTM_SEND_MAX_SOCKBUF;
        unsigned int pid;
 
-       if (command == ZEBRA_BFD_DEST_UPDATE)
+       if (hdr->command == ZEBRA_BFD_DEST_UPDATE)
                client->bfd_peer_upd8_cnt++;
        else
                client->bfd_peer_add_cnt++;
 
        if (IS_ZEBRA_DEBUG_EVENT)
                zlog_debug("bfd_dst_register msg from client %s: length=%d",
-                          zebra_route_string(client->proto), length);
+                          zebra_route_string(client->proto), hdr->length);
 
        if (ptm_cb.ptm_sock == -1) {
                ptm_cb.t_timer = NULL;
                thread_add_timer(zebrad.master, zebra_ptm_connect, NULL,
                                 ptm_cb.reconnect_time, &ptm_cb.t_timer);
-               return -1;
+               return;
        }
 
        ptm_lib_init_msg(ptm_hdl, 0, PTMLIB_MSG_TYPE_CMD, NULL, &out_ctxt);
@@ -703,7 +702,7 @@ int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length,
        ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_CLIENT_FIELD,
                           tmp_buf);
 
-       s = client->ibuf;
+       s = msg;
 
        STREAM_GETL(s, pid);
        sprintf(tmp_buf, "%d", pid);
@@ -816,16 +815,14 @@ int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length,
                           ptm_cb.out_data);
        zebra_ptm_send_message(ptm_cb.out_data, data_len);
 
-       return 0;
+       return;
 
 stream_failure:
        ptm_lib_cleanup_msg(ptm_hdl, out_ctxt);
-       return 0;
 }
 
 /* BFD peer/dst deregister */
-int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length,
-                                struct zebra_vrf *zvrf)
+void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        struct prefix src_p;
@@ -843,13 +840,13 @@ int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length,
 
        if (IS_ZEBRA_DEBUG_EVENT)
                zlog_debug("bfd_dst_deregister msg from client %s: length=%d",
-                          zebra_route_string(client->proto), length);
+                          zebra_route_string(client->proto), hdr->length);
 
        if (ptm_cb.ptm_sock == -1) {
                ptm_cb.t_timer = NULL;
                thread_add_timer(zebrad.master, zebra_ptm_connect, NULL,
                                 ptm_cb.reconnect_time, &ptm_cb.t_timer);
-               return -1;
+               return;
        }
 
        ptm_lib_init_msg(ptm_hdl, 0, PTMLIB_MSG_TYPE_CMD, NULL, &out_ctxt);
@@ -861,7 +858,7 @@ int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length,
        ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_CLIENT_FIELD,
                           tmp_buf);
 
-       s = client->ibuf;
+       s = msg;
 
        STREAM_GETL(s, pid);
        sprintf(tmp_buf, "%d", pid);
@@ -948,15 +945,14 @@ int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length,
 
        zebra_ptm_send_message(ptm_cb.out_data, data_len);
 
-       return 0;
+       return;
 
 stream_failure:
        ptm_lib_cleanup_msg(ptm_hdl, out_ctxt);
-       return 0;
 }
 
 /* BFD client register */
-int zebra_ptm_bfd_client_register(struct zserv *client, u_short length)
+void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        unsigned int pid;
@@ -968,16 +964,16 @@ int zebra_ptm_bfd_client_register(struct zserv *client, u_short length)
 
        if (IS_ZEBRA_DEBUG_EVENT)
                zlog_debug("bfd_client_register msg from client %s: length=%d",
-                          zebra_route_string(client->proto), length);
+                          zebra_route_string(client->proto), hdr->length);
 
-       s = client->ibuf;
+       s = msg;
        STREAM_GETL(s, pid);
 
        if (ptm_cb.ptm_sock == -1) {
                ptm_cb.t_timer = NULL;
                thread_add_timer(zebrad.master, zebra_ptm_connect, NULL,
                                 ptm_cb.reconnect_time, &ptm_cb.t_timer);
-               return -1;
+               return;
        }
 
        ptm_lib_init_msg(ptm_hdl, 0, PTMLIB_MSG_TYPE_CMD, NULL, &out_ctxt);
@@ -1003,7 +999,7 @@ int zebra_ptm_bfd_client_register(struct zserv *client, u_short length)
        SET_FLAG(ptm_cb.client_flags[client->proto],
                 ZEBRA_PTM_BFD_CLIENT_FLAG_REG);
 
-       return 0;
+       return;
 
 stream_failure:
        /*
@@ -1013,7 +1009,7 @@ stream_failure:
         * if (out_ctxt)
         *      ptm_lib_cleanup_msg(ptm_hdl, out_ctxt);
         */
-       return 0;
+       return;
 }
 
 /* BFD client deregister */
index 392853b5996094f7db08633c86b87700d3a77e29..0b41410beca69159e4adc76a3a3f6c879fa4b99b 100644 (file)
@@ -28,6 +28,8 @@ extern const char ZEBRA_PTM_SOCK_NAME[];
 
 #define ZEBRA_PTM_BFD_CLIENT_FLAG_REG   (1 << 1) /* client registered with BFD */
 
+#include "zebra/zserv.h"
+
 /* Zebra ptm context block */
 struct zebra_ptm_cb {
        int ptm_sock; /* ptm file descriptor. */
@@ -62,12 +64,12 @@ int zebra_ptm_connect(struct thread *t);
 void zebra_ptm_write(struct vty *vty);
 int zebra_ptm_get_enable_state(void);
 
-int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length,
-                              int command, struct zebra_vrf *zvrf);
-int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length,
-                                struct zebra_vrf *zvrf);
+/* ZAPI message handlers */
+void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
+void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
+void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
+
 void zebra_ptm_show_status(struct vty *vty, struct interface *ifp);
-int zebra_ptm_bfd_client_register(struct zserv *client, u_short length);
 void zebra_ptm_if_init(struct zebra_if *zebra_ifp);
 void zebra_ptm_if_set_ptm_state(struct interface *ifp,
                                struct zebra_if *zebra_ifp);
index 8fddd400cc04ef89826d42e82692ed79f1158cd8..fe788ac4d7b8a03dce9af4868220dec1d56e422e 100644 (file)
@@ -38,8 +38,7 @@ static int zsend_interface_bfd_update(int cmd, struct zserv *client,
        if (!client->ifinfo)
                return 0;
 
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, vrf_id);
        if (ifp)
@@ -66,7 +65,7 @@ static int zsend_interface_bfd_update(int cmd, struct zserv *client,
        stream_putw_at(s, 0, stream_get_endp(s));
 
        client->if_bfd_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 void zebra_interface_bfd_update(struct interface *ifp, struct prefix *dp,
@@ -93,8 +92,7 @@ static int zsend_bfd_peer_replay(int cmd, struct zserv *client)
 {
        struct stream *s;
 
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, VRF_DEFAULT);
 
@@ -102,7 +100,7 @@ static int zsend_bfd_peer_replay(int cmd, struct zserv *client)
        stream_putw_at(s, 0, stream_get_endp(s));
 
        client->bfd_peer_replay_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 void zebra_bfd_peer_replay_req(void)
index 96bee36be6eaba3de0e7c8b211f79b10b5ed8ebe..68ad69397f7dfd55503d3baae1cb47ee39b56330 100644 (file)
@@ -256,7 +256,7 @@ static int zebra_pw_check_reachability(struct zebra_pw *pw)
         * Need to ensure that there's a label binding for all nexthops.
         * Otherwise, ECMP for this route could render the pseudowire unusable.
         */
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
                if (!nexthop->nh_label) {
                        if (IS_ZEBRA_DEBUG_PW)
                                zlog_warn("%s: unlabeled route for %s",
index 8946c9c6b55b1670b8415b897a39dc6c85382c19..69cd6697d2d96b7c9739d98b85f0b0e174500a83 100644 (file)
@@ -139,9 +139,6 @@ uint8_t route_distance(int type)
 
 int is_zebra_valid_kernel_table(u_int32_t table_id)
 {
-       if ((table_id > ZEBRA_KERNEL_TABLE_MAX))
-               return 0;
-
 #ifdef linux
        if ((table_id == RT_TABLE_UNSPEC) || (table_id == RT_TABLE_LOCAL)
            || (table_id == RT_TABLE_COMPAT))
@@ -183,7 +180,7 @@ int zebra_check_addr(struct prefix *p)
 /* Add nexthop to the end of a rib node's nexthop list */
 void route_entry_nexthop_add(struct route_entry *re, struct nexthop *nexthop)
 {
-       nexthop_add(&re->nexthop, nexthop);
+       nexthop_add(&re->ng.nexthop, nexthop);
        re->nexthop_num++;
 }
 
@@ -193,8 +190,8 @@ void route_entry_nexthop_add(struct route_entry *re, struct nexthop *nexthop)
  */
 void route_entry_copy_nexthops(struct route_entry *re, struct nexthop *nh)
 {
-       assert(!re->nexthop);
-       copy_nexthops(&re->nexthop, nh, NULL);
+       assert(!re->ng.nexthop);
+       copy_nexthops(&re->ng.nexthop, nh, NULL);
        for (struct nexthop *nexthop = nh; nexthop; nexthop = nexthop->next)
                re->nexthop_num++;
 }
@@ -207,7 +204,7 @@ void route_entry_nexthop_delete(struct route_entry *re, struct nexthop *nexthop)
        if (nexthop->prev)
                nexthop->prev->next = nexthop->next;
        else
-               re->nexthop = nexthop->next;
+               re->ng.nexthop = nexthop->next;
        re->nexthop_num--;
 }
 
@@ -305,6 +302,8 @@ struct nexthop *route_entry_nexthop_ipv6_ifindex_add(struct route_entry *re,
        nexthop->type = NEXTHOP_TYPE_IPV6_IFINDEX;
        nexthop->gate.ipv6 = *ipv6;
        nexthop->ifindex = ifindex;
+       if (CHECK_FLAG(re->flags, ZEBRA_FLAG_EVPN_ROUTE))
+               SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ONLINK);
 
        route_entry_nexthop_add(re, nexthop);
 
@@ -421,6 +420,10 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                re->nexthop_mtu = 0;
        }
 
+       /* Next hops (remote VTEPs) for EVPN routes are fully resolved. */
+       if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN_RVTEP))
+               return 1;
+
        /* Skip nexthops that have been filtered out due to route-map */
        /* The nexthops are specific to this route and so the same */
        /* nexthop for a different route may not have this flag set */
@@ -507,7 +510,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
 
                if (match->type == ZEBRA_ROUTE_CONNECT) {
                        /* Directly point connected route. */
-                       newhop = match->nexthop;
+                       newhop = match->ng.nexthop;
                        if (newhop) {
                                if (nexthop->type == NEXTHOP_TYPE_IPV4
                                    || nexthop->type == NEXTHOP_TYPE_IPV6)
@@ -516,7 +519,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                        return 1;
                } else if (CHECK_FLAG(re->flags, ZEBRA_FLAG_ALLOW_RECURSION)) {
                        resolved = 0;
-                       for (ALL_NEXTHOPS(match->nexthop, newhop)) {
+                       for (ALL_NEXTHOPS(match->ng, newhop)) {
                                if (!CHECK_FLAG(newhop->flags,
                                                NEXTHOP_FLAG_FIB))
                                        continue;
@@ -539,7 +542,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
                        return resolved;
                } else if (re->type == ZEBRA_ROUTE_STATIC) {
                        resolved = 0;
-                       for (ALL_NEXTHOPS(match->nexthop, newhop)) {
+                       for (ALL_NEXTHOPS(match->ng, newhop)) {
                                if (!CHECK_FLAG(newhop->flags,
                                                NEXTHOP_FLAG_FIB))
                                        continue;
@@ -610,7 +613,7 @@ struct route_entry *rib_match(afi_t afi, safi_t safi, vrf_id_t vrf_id,
                } else {
                        if (match->type != ZEBRA_ROUTE_CONNECT) {
                                int found = 0;
-                               for (ALL_NEXTHOPS(match->nexthop, newhop))
+                               for (ALL_NEXTHOPS(match->ng, newhop))
                                        if (CHECK_FLAG(newhop->flags,
                                                       NEXTHOP_FLAG_FIB)) {
                                                found = 1;
@@ -679,7 +682,8 @@ struct route_entry *rib_match_ipv4_multicast(vrf_id_t vrf_id,
                char buf[BUFSIZ];
                inet_ntop(AF_INET, &addr, buf, BUFSIZ);
 
-               zlog_debug("%s: %s: found %s, using %s", __func__, buf,
+               zlog_debug("%s: %s: vrf: %u found %s, using %s",
+                          __func__, buf, vrf_id,
                           mre ? (ure ? "MRIB+URIB" : "MRIB")
                               : ure ? "URIB" : "nothing",
                           re == ure ? "URIB" : re == mre ? "MRIB" : "none");
@@ -733,7 +737,7 @@ struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *p, vrf_id_t vrf_id)
        if (match->type == ZEBRA_ROUTE_CONNECT)
                return match;
 
-       for (ALL_NEXTHOPS(match->nexthop, nexthop))
+       for (ALL_NEXTHOPS(match->ng, nexthop))
                if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB))
                        return match;
 
@@ -793,7 +797,7 @@ int rib_lookup_ipv4_route(struct prefix_ipv4 *p, union sockunion *qgate,
 
        /* Ok, we have a cood candidate, let's check it's nexthop list... */
        nexthops_active = 0;
-       for (ALL_NEXTHOPS(match->nexthop, nexthop))
+       for (ALL_NEXTHOPS(match->ng, nexthop))
                if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) {
                        nexthops_active = 1;
                        if (nexthop->gate.ipv4.s_addr == sockunion2ip(qgate))
@@ -859,9 +863,7 @@ static unsigned nexthop_active_check(struct route_node *rn,
        case NEXTHOP_TYPE_IPV4:
        case NEXTHOP_TYPE_IPV4_IFINDEX:
                family = AFI_IP;
-               if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN_RVTEP))
-                       SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
-               else if (nexthop_active(AFI_IP, re, nexthop, set, rn))
+               if (nexthop_active(AFI_IP, re, nexthop, set, rn))
                        SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
                else
                        UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
@@ -959,7 +961,7 @@ static int nexthop_active_update(struct route_node *rn, struct route_entry *re,
        re->nexthop_active_num = 0;
        UNSET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
 
-       for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next) {
+       for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next) {
                /* No protocol daemon provides src and so we're skipping
                 * tracking it */
                prev_src = nexthop->rmap_src;
@@ -1003,7 +1005,7 @@ int zebra_rib_labeled_unicast(struct route_entry *re)
        if (re->type != ZEBRA_ROUTE_BGP)
                return 0;
 
-       for (ALL_NEXTHOPS(re->nexthop, nexthop))
+       for (ALL_NEXTHOPS(re->ng, nexthop))
                if (!nexthop->nh_label || !nexthop->nh_label->num_labels)
                        return 0;
 
@@ -1023,7 +1025,7 @@ void kernel_route_rib_pass_fail(struct route_node *rn, struct prefix *p,
        switch (res) {
        case SOUTHBOUND_INSTALL_SUCCESS:
                dest->selected_fib = re;
-               for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+               for (ALL_NEXTHOPS(re->ng, nexthop)) {
                        if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
                                continue;
 
@@ -1056,8 +1058,10 @@ void kernel_route_rib_pass_fail(struct route_node *rn, struct prefix *p,
                 */
                if (dest->selected_fib == re)
                        dest->selected_fib = NULL;
-               for (ALL_NEXTHOPS(re->nexthop, nexthop))
+               for (ALL_NEXTHOPS(re->ng, nexthop))
                        UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
+
+               zsend_route_notify_owner(re, p, ZAPI_ROUTE_REMOVED);
                break;
        case SOUTHBOUND_DELETE_FAILURE:
                /*
@@ -1067,6 +1071,8 @@ void kernel_route_rib_pass_fail(struct route_node *rn, struct prefix *p,
                dest->selected_fib = NULL;
                zlog_warn("%u:%s: Route Deletion failure", re->vrf_id,
                          prefix2str(p, buf, sizeof(buf)));
+
+               zsend_route_notify_owner(re, p, ZAPI_ROUTE_REMOVE_FAIL);
                break;
        }
 }
@@ -1085,15 +1091,15 @@ void rib_install_kernel(struct route_node *rn, struct route_entry *re,
        srcdest_rnode_prefixes(rn, &p, &src_p);
 
        if (info->safi != SAFI_UNICAST) {
-               for (ALL_NEXTHOPS(re->nexthop, nexthop))
+               for (ALL_NEXTHOPS(re->ng, nexthop))
                        SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
                return;
        } else {
                struct nexthop *prev;
 
-               for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
-                       UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_DUPLICATE);
-                       for (ALL_NEXTHOPS(re->nexthop, prev)) {
+               for (ALL_NEXTHOPS(re->ng, nexthop)) {
+                       UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_DUPLICATE);
+                       for (ALL_NEXTHOPS(re->ng, prev)) {
                                if (prev == nexthop)
                                        break;
                                if (nexthop_same_firsthop(nexthop, prev)) {
@@ -1134,7 +1140,7 @@ void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re)
        srcdest_rnode_prefixes(rn, &p, &src_p);
 
        if (info->safi != SAFI_UNICAST) {
-               for (ALL_NEXTHOPS(re->nexthop, nexthop))
+               for (ALL_NEXTHOPS(re->ng, nexthop))
                        UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
                return;
        }
@@ -1384,7 +1390,7 @@ static void rib_process_update_fib(struct zebra_vrf *zvrf,
                                        if (!RIB_SYSTEM_ROUTE(old))
                                                rib_uninstall_kernel(rn, old);
                                } else {
-                                       for (nexthop = old->nexthop; nexthop;
+                                       for (nexthop = old->ng.nexthop; nexthop;
                                             nexthop = nexthop->next)
                                                UNSET_FLAG(nexthop->flags,
                                                           NEXTHOP_FLAG_FIB);
@@ -1440,7 +1446,7 @@ static void rib_process_update_fib(struct zebra_vrf *zvrf,
                if (!RIB_SYSTEM_ROUTE(new)) {
                        bool in_fib = false;
 
-                       for (ALL_NEXTHOPS(new->nexthop, nexthop))
+                       for (ALL_NEXTHOPS(new->ng, nexthop))
                                if (CHECK_FLAG(nexthop->flags,
                                               NEXTHOP_FLAG_FIB)) {
                                        in_fib = true;
@@ -1600,9 +1606,9 @@ static void rib_process(struct route_node *rn)
                                if (re != old_selected) {
                                        if (IS_ZEBRA_DEBUG_RIB)
                                                zlog_debug(
-                                                       "%s: %s: imported via import-table but denied "
+                                                       "%s: %u:%s: imported via import-table but denied "
                                                        "by the ip protocol table route-map",
-                                                       __func__, buf);
+                                                       __func__, vrf_id, buf);
                                        rib_unlink(rn, re);
                                } else
                                        SET_FLAG(re->status,
@@ -1672,13 +1678,16 @@ static void rib_process(struct route_node *rn)
 
        /* Redistribute SELECTED entry */
        if (old_selected != new_selected || selected_changed) {
-               struct nexthop *nexthop;
+               struct nexthop *nexthop = NULL;
 
                /* Check if we have a FIB route for the destination, otherwise,
                 * don't redistribute it */
-               for (ALL_NEXTHOPS(new_fib ? new_fib->nexthop : NULL, nexthop)) {
-                       if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) {
-                               break;
+               if (new_fib) {
+                       for (ALL_NEXTHOPS(new_fib->ng, nexthop)) {
+                               if (CHECK_FLAG(nexthop->flags,
+                                              NEXTHOP_FLAG_FIB)) {
+                                       break;
+                               }
                        }
                }
                if (!nexthop)
@@ -2112,9 +2121,9 @@ void rib_unlink(struct route_node *rn, struct route_entry *re)
 
        /* free RE and nexthops */
        if (re->type == ZEBRA_ROUTE_STATIC)
-               zebra_deregister_rnh_static_nexthops(re->vrf_id, re->nexthop,
+               zebra_deregister_rnh_static_nexthops(re->vrf_id, re->ng.nexthop,
                                                     rn);
-       nexthops_free(re->nexthop);
+       nexthops_free(re->ng.nexthop);
        XFREE(MTYPE_RE, re);
 }
 
@@ -2178,11 +2187,11 @@ void _route_entry_dump(const char *func, union prefixconstptr pp,
        zlog_debug("%s: nexthop_num == %u, nexthop_active_num == %u", func,
                   re->nexthop_num, re->nexthop_active_num);
 
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
                inet_ntop(p->family, &nexthop->gate, straddr, INET6_ADDRSTRLEN);
-               zlog_debug("%s: %s %s[%u] with flags %s%s%s", func,
+               zlog_debug("%s: %s %s[%u] vrf %u with flags %s%s%s", func,
                           (nexthop->rparent ? "  NH" : "NH"), straddr,
-                          nexthop->ifindex,
+                          nexthop->ifindex, nexthop->vrf_id,
                           (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE)
                                    ? "ACTIVE "
                                    : ""),
@@ -2210,7 +2219,8 @@ void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id)
        /* Lookup table.  */
        table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id);
        if (!table) {
-               zlog_err("%s: zebra_vrf_table() returned NULL", __func__);
+               zlog_err("%s:%u zebra_vrf_table() returned NULL",
+                        __func__, vrf_id);
                return;
        }
 
@@ -2219,7 +2229,7 @@ void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id)
 
        /* No route for this prefix. */
        if (!rn) {
-               zlog_debug("%s: lookup failed for %s", __func__,
+               zlog_debug("%s:%u lookup failed for %s", __func__, vrf_id,
                           prefix2str((struct prefix *)p, prefix_buf,
                                      sizeof(prefix_buf)));
                return;
@@ -2230,8 +2240,9 @@ void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id)
 
        /* let's go */
        RNODE_FOREACH_RE (rn, re) {
-               zlog_debug("%s: rn %p, re %p: %s, %s", __func__, (void *)rn,
-                          (void *)re,
+               zlog_debug("%s:%u rn %p, re %p: %s, %s",
+                          __func__, vrf_id,
+                          (void *)rn, (void *)re,
                           (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED)
                                    ? "removed"
                                    : "NOT removed"),
@@ -2255,7 +2266,8 @@ void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id)
        rib_dest_t *dest;
 
        if (NULL == (table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id))) {
-               zlog_err("%s: zebra_vrf_table() returned NULL", __func__);
+               zlog_err("%s:%u zebra_vrf_table() returned NULL",
+                        __func__, vrf_id);
                return;
        }
 
@@ -2353,7 +2365,7 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
 
        /* If this route is kernel route, set FIB flag to the route. */
        if (RIB_SYSTEM_ROUTE(re))
-               for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
+               for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next)
                        SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
 
        /* Link new re to node.*/
@@ -2439,7 +2451,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                        continue;
                if (re->type == ZEBRA_ROUTE_KERNEL && re->metric != metric)
                        continue;
-               if (re->type == ZEBRA_ROUTE_CONNECT && (rtnh = re->nexthop)
+               if (re->type == ZEBRA_ROUTE_CONNECT && (rtnh = re->ng.nexthop)
                    && rtnh->type == NEXTHOP_TYPE_IFINDEX && nh) {
                        if (rtnh->ifindex != nh->ifindex)
                                continue;
@@ -2452,7 +2464,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                                same = re;
                                break;
                        }
-                       for (ALL_NEXTHOPS(re->nexthop, rtnh))
+                       for (ALL_NEXTHOPS(re->ng, rtnh))
                                if (nexthop_same_no_recurse(rtnh, nh)) {
                                        same = re;
                                        break;
@@ -2489,7 +2501,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                        }
                        if (allow_delete) {
                                /* Unset flags. */
-                               for (rtnh = fib->nexthop; rtnh;
+                               for (rtnh = fib->ng.nexthop; rtnh;
                                     rtnh = rtnh->next)
                                        UNSET_FLAG(rtnh->flags,
                                                   NEXTHOP_FLAG_FIB);
@@ -2543,14 +2555,21 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                if (CHECK_FLAG(flags, ZEBRA_FLAG_EVPN_ROUTE)) {
                        struct nexthop *tmp_nh;
 
-                       for (ALL_NEXTHOPS(re->nexthop, tmp_nh)) {
+                       for (ALL_NEXTHOPS(re->ng, tmp_nh)) {
                                struct ipaddr vtep_ip;
 
                                memset(&vtep_ip, 0, sizeof(struct ipaddr));
-                               vtep_ip.ipa_type = IPADDR_V4;
-                               memcpy(&(vtep_ip.ipaddr_v4),
-                                      &(tmp_nh->gate.ipv4),
-                                      sizeof(struct in_addr));
+                               if (afi == AFI_IP) {
+                                       vtep_ip.ipa_type = IPADDR_V4;
+                                       memcpy(&(vtep_ip.ipaddr_v4),
+                                              &(tmp_nh->gate.ipv4),
+                                              sizeof(struct in_addr));
+                               } else {
+                                       vtep_ip.ipa_type = IPADDR_V6;
+                                       memcpy(&(vtep_ip.ipaddr_v6),
+                                              &(tmp_nh->gate.ipv6),
+                                              sizeof(struct in6_addr));
+                               }
                                zebra_vxlan_evpn_vrf_route_del(re->vrf_id, rmac,
                                                               &vtep_ip, p);
                        }
@@ -2638,7 +2657,7 @@ static void rib_update_table(struct route_table *table,
                                        continue;
                                }
 
-                               for (nh = re->nexthop; nh; nh = nh->next)
+                               for (nh = re->ng.nexthop; nh; nh = nh->next)
                                        if (!(nh->type == NEXTHOP_TYPE_IPV4
                                              || nh->type == NEXTHOP_TYPE_IPV6))
                                                break;
@@ -2683,40 +2702,8 @@ void rib_update(vrf_id_t vrf_id, rib_update_event_t event)
                rib_update_table(table, event);
 }
 
-/* Remove all routes which comes from non main table.  */
-static void rib_weed_table(struct route_table *table)
-{
-       struct route_node *rn;
-       struct route_entry *re;
-       struct route_entry *next;
-
-       if (table)
-               for (rn = route_top(table); rn; rn = srcdest_route_next(rn))
-                       RNODE_FOREACH_RE_SAFE (rn, re, next) {
-                               if (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED))
-                                       continue;
-
-                               if (re->table != zebrad.rtm_table_default
-                                   && re->table != RT_TABLE_MAIN)
-                                       rib_delnode(rn, re);
-                       }
-}
-
-/* Delete all routes from non main table. */
-void rib_weed_tables(void)
-{
-       struct vrf *vrf;
-       struct zebra_vrf *zvrf;
-
-       RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id)
-               if ((zvrf = vrf->info) != NULL) {
-                       rib_weed_table(zvrf->table[AFI_IP][SAFI_UNICAST]);
-                       rib_weed_table(zvrf->table[AFI_IP6][SAFI_UNICAST]);
-               }
-}
-
 /* Delete self installed routes after zebra is relaunched.  */
-static void rib_sweep_table(struct route_table *table)
+void rib_sweep_table(struct route_table *table)
 {
        struct route_node *rn;
        struct route_entry *re;
@@ -2755,7 +2742,7 @@ static void rib_sweep_table(struct route_table *table)
                         * to a different spot (ie startup )
                         * this decision needs to be revisited
                         */
-                       for (ALL_NEXTHOPS(re->nexthop, nexthop))
+                       for (ALL_NEXTHOPS(re->ng, nexthop))
                                SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
 
                        rib_uninstall_kernel(rn, re);
@@ -2777,11 +2764,13 @@ void rib_sweep_route(void)
                rib_sweep_table(zvrf->table[AFI_IP][SAFI_UNICAST]);
                rib_sweep_table(zvrf->table[AFI_IP6][SAFI_UNICAST]);
        }
+
+       zebra_ns_sweep_route();
 }
 
 /* Remove specific by protocol routes from 'table'. */
-static unsigned long rib_score_proto_table(u_char proto, u_short instance,
-                                          struct route_table *table)
+unsigned long rib_score_proto_table(u_char proto, u_short instance,
+                                   struct route_table *table)
 {
        struct route_node *rn;
        struct route_entry *re;
@@ -2818,6 +2807,8 @@ unsigned long rib_score_proto(u_char proto, u_short instance)
                                         proto, instance,
                                         zvrf->table[AFI_IP6][SAFI_UNICAST]);
 
+       cnt += zebra_ns_score_proto(proto, instance);
+
        return cnt;
 }
 
index 1e9fe875e10a88d2add5c75f93addf1e416cf672..48f9f4f366b2be6badf1a27f08436d4d1bb13d21 100644 (file)
@@ -355,7 +355,8 @@ static int zebra_rnh_apply_nht_rmap(int family, struct route_node *prn,
        rmap_family = (family == AF_INET) ? AFI_IP : AFI_IP6;
 
        if (prn && re) {
-               for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next) {
+               for (nexthop = re->ng.nexthop; nexthop;
+                    nexthop = nexthop->next) {
                        ret = zebra_nht_route_map_check(rmap_family, proto,
                                                        &prn->p, re, nexthop);
                        if (ret != RMAP_DENYMATCH) {
@@ -428,7 +429,7 @@ static void zebra_rnh_eval_import_check_entry(vrf_id_t vrfid, int family,
        struct nexthop *nexthop;
 
        if (re && (rnh->state == NULL)) {
-               for (ALL_NEXTHOPS(re->nexthop, nexthop))
+               for (ALL_NEXTHOPS(re->ng, nexthop))
                        if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) {
                                state_changed = 1;
                                break;
@@ -559,7 +560,7 @@ static void zebra_rnh_process_static_routes(vrf_id_t vrfid, int family,
                         * be having multiple. We care here only about
                         * registered nexthops.
                         */
-                       for (nexthop = sre->nexthop; nexthop;
+                       for (nexthop = sre->ng.nexthop; nexthop;
                             nexthop = nexthop->next) {
                                switch (nexthop->type) {
                                case NEXTHOP_TYPE_IPV4:
@@ -673,7 +674,7 @@ zebra_rnh_resolve_nexthop_entry(vrf_id_t vrfid, int family,
                                if (re->type == ZEBRA_ROUTE_NHRP) {
                                        struct nexthop *nexthop;
 
-                                       for (nexthop = re->nexthop; nexthop;
+                                       for (nexthop = re->ng.nexthop; nexthop;
                                             nexthop = nexthop->next)
                                                if (nexthop->type
                                                    == NEXTHOP_TYPE_IFINDEX)
@@ -925,8 +926,8 @@ static void free_state(vrf_id_t vrf_id, struct route_entry *re,
                return;
 
        /* free RE and nexthops */
-       zebra_deregister_rnh_static_nexthops(vrf_id, re->nexthop, rn);
-       nexthops_free(re->nexthop);
+       zebra_deregister_rnh_static_nexthops(vrf_id, re->ng.nexthop, rn);
+       nexthops_free(re->ng.nexthop);
        XFREE(MTYPE_RE, re);
 }
 
@@ -949,7 +950,7 @@ static void copy_state(struct rnh *rnh, struct route_entry *re,
        state->metric = re->metric;
        state->vrf_id = re->vrf_id;
 
-       route_entry_copy_nexthops(state, re->nexthop);
+       route_entry_copy_nexthops(state, re->ng.nexthop);
        rnh->state = state;
 }
 
@@ -985,7 +986,7 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
        struct route_entry *re;
        unsigned long nump;
        u_char num;
-       struct nexthop *nexthop;
+       struct nexthop *nh;
        struct route_node *rn;
        int cmd = (type == RNH_IMPORT_CHECK_TYPE) ? ZEBRA_IMPORT_CHECK_UPDATE
                                                  : ZEBRA_NEXTHOP_UPDATE;
@@ -994,8 +995,7 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
        re = rnh->state;
 
        /* Get output stream. */
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, vrf_id);
 
@@ -1022,32 +1022,40 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
                num = 0;
                nump = stream_get_endp(s);
                stream_putc(s, 0);
-               for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
-                       if ((CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)
-                            || CHECK_FLAG(nexthop->flags,
-                                          NEXTHOP_FLAG_RECURSIVE))
-                           && CHECK_FLAG(nexthop->flags,
-                                         NEXTHOP_FLAG_ACTIVE)) {
-                               stream_putc(s, nexthop->type);
-                               switch (nexthop->type) {
+               for (nh = re->ng.nexthop; nh; nh = nh->next)
+                       if ((CHECK_FLAG(nh->flags, NEXTHOP_FLAG_FIB)
+                            || CHECK_FLAG(nh->flags, NEXTHOP_FLAG_RECURSIVE))
+                           && CHECK_FLAG(nh->flags, NEXTHOP_FLAG_ACTIVE)) {
+                               stream_putc(s, nh->type);
+                               switch (nh->type) {
                                case NEXTHOP_TYPE_IPV4:
                                case NEXTHOP_TYPE_IPV4_IFINDEX:
-                                       stream_put_in_addr(s,
-                                                          &nexthop->gate.ipv4);
-                                       stream_putl(s, nexthop->ifindex);
+                                       stream_put_in_addr(s, &nh->gate.ipv4);
+                                       stream_putl(s, nh->ifindex);
                                        break;
                                case NEXTHOP_TYPE_IFINDEX:
-                                       stream_putl(s, nexthop->ifindex);
+                                       stream_putl(s, nh->ifindex);
                                        break;
                                case NEXTHOP_TYPE_IPV6:
                                case NEXTHOP_TYPE_IPV6_IFINDEX:
-                                       stream_put(s, &nexthop->gate.ipv6, 16);
-                                       stream_putl(s, nexthop->ifindex);
+                                       stream_put(s, &nh->gate.ipv6, 16);
+                                       stream_putl(s, nh->ifindex);
                                        break;
                                default:
                                        /* do nothing */
                                        break;
                                }
+                               if (nh->nh_label) {
+                                       stream_putc(s,
+                                                   nh->nh_label->num_labels);
+                                       if (nh->nh_label->num_labels)
+                                               stream_put(
+                                                       s,
+                                                       &nh->nh_label->label[0],
+                                                       nh->nh_label->num_labels
+                                                               * sizeof(mpls_label_t));
+                               } else
+                                       stream_putc(s, 0);
                                num++;
                        }
                stream_putc_at(s, nump, num);
@@ -1062,7 +1070,7 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
 
        client->nh_last_upd_time = monotime(NULL);
        client->last_write_cmd = cmd;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 static void print_nh(struct nexthop *nexthop, struct vty *vty)
@@ -1115,7 +1123,7 @@ static void print_rnh(struct route_node *rn, struct vty *vty)
        if (rnh->state) {
                vty_out(vty, " resolved via %s\n",
                        zebra_route_string(rnh->state->type));
-               for (nexthop = rnh->state->nexthop; nexthop;
+               for (nexthop = rnh->state->ng.nexthop; nexthop;
                     nexthop = nexthop->next)
                        print_nh(nexthop, vty);
        } else
index 48218effd1090283aea0c2fd96db4827e7f68494..3ab208d30b545edde7eade49f45e2e093c49032b 100644 (file)
@@ -285,8 +285,8 @@ static void check_replace(struct route_node *np2, struct route_entry *re2,
                return;
        }
 
-       if (in_addr_cmp((u_char *)&(*re)->nexthop->gate.ipv4,
-                       (u_char *)&re2->nexthop->gate.ipv4)
+       if (in_addr_cmp((u_char *)&(*re)->ng.nexthop->gate.ipv4,
+                       (u_char *)&re2->ng.nexthop->gate.ipv4)
            <= 0)
                return;
 
@@ -370,9 +370,9 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
                for (*np = route_top(table); *np; *np = route_next(*np)) {
                        if (!in_addr_cmp(&(*np)->p.u.prefix, (u_char *)&dest)) {
                                RNODE_FOREACH_RE (*np, *re) {
-                                       if (!in_addr_cmp((u_char *)&(*re)
-                                                                ->nexthop->gate
-                                                                .ipv4,
+                                       if (!in_addr_cmp(
+                                                   (u_char *)&(*re)
+                                                   ->ng.nexthop->gate.ipv4,
                                                         (u_char *)&nexthop))
                                                if (proto
                                                    == proto_trans((*re)->type))
@@ -404,9 +404,10 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
                                if ((policy < policy2)
                                    || ((policy == policy2) && (proto < proto2))
                                    || ((policy == policy2) && (proto == proto2)
-                                       && (in_addr_cmp((u_char *)&re2->nexthop
-                                                               ->gate.ipv4,
-                                                       (u_char *)&nexthop)
+                                       && (in_addr_cmp(
+                                                   (u_char *)&re2->ng.nexthop
+                                                   ->gate.ipv4,
+                                                   (u_char *)&nexthop)
                                            >= 0)))
                                        check_replace(np2, re2, np, re);
                        }
@@ -430,7 +431,7 @@ static void get_fwtable_route_node(struct variable *v, oid objid[],
        {
                struct nexthop *nexthop;
 
-               nexthop = (*re)->nexthop;
+               nexthop = (*re)->ng.nexthop;
                if (nexthop) {
                        pnt = (u_char *)&nexthop->gate.ipv4;
                        for (i = 0; i < 4; i++)
@@ -459,7 +460,7 @@ static u_char *ipFwTable(struct variable *v, oid objid[], size_t *objid_len,
        if (!np)
                return NULL;
 
-       nexthop = re->nexthop;
+       nexthop = re->ng.nexthop;
        if (!nexthop)
                return NULL;
 
index b4c5b70da04dcee936f242611d629a01c2b7f811..f3921790a6c97e2b24c19c0448a6f98cac4cac6e 100644 (file)
@@ -300,7 +300,7 @@ void static_uninstall_route(afi_t afi, safi_t safi, struct prefix *p,
        }
 
        /* Lookup nexthop. */
-       for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
+       for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next)
                if (static_nexthop_same(nexthop, si))
                        break;
 
index 9e13f4ed6e01a477d4b5a004527f58d4b28a85b0..f7877f71b6c0063a5718fbec24ea4856ea35552c 100644 (file)
@@ -39,6 +39,7 @@
 #include "zebra/interface.h"
 #include "zebra/zebra_mpls.h"
 #include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_netns_notify.h"
 
 extern struct zebra_t zebrad;
 
@@ -161,6 +162,12 @@ static int zebra_vrf_enable(struct vrf *vrf)
                                }
                }
 
+       /*
+        * We may have static routes that are now possible to
+        * insert into the appropriate tables
+        */
+       static_config_install_delayed_routes(zvrf);
+
        /* Kick off any VxLAN-EVPN processing. */
        zebra_vxlan_vrf_enable(zvrf);
 
@@ -568,7 +575,6 @@ static int vrf_config_write(struct vty *vty)
                                                ? " prefix-routes-only"
                                                : "");
                        zebra_ns_config_write(vty, (struct ns *)vrf->ns_ctxt);
-                       vty_out(vty, "!\n");
                }
 
                static_config(vty, zvrf, AFI_IP, SAFI_UNICAST, "ip route");
@@ -587,5 +593,5 @@ void zebra_vrf_init(void)
        vrf_init(zebra_vrf_new, zebra_vrf_enable, zebra_vrf_disable,
                 zebra_vrf_delete);
 
-       vrf_cmd_init(vrf_config_write);
+       vrf_cmd_init(vrf_config_write, &zserv_privs);
 }
index 582ff3110bef5a3a595961d4ff428df5547cee19..35d4bd533d3c29b3d43aaf39a19b4197b08c9890 100644 (file)
@@ -29,6 +29,7 @@
 #include "rib.h"
 #include "nexthop.h"
 #include "vrf.h"
+#include "linklist.h"
 #include "mpls.h"
 #include "routemap.h"
 #include "srcdest_table.h"
@@ -76,7 +77,190 @@ static void vty_show_ip_route_summary_prefix(struct vty *vty,
 /* VNI range as per RFC 7432 */
 #define CMD_VNI_RANGE "(1-16777215)"
 
+struct static_hold_route {
+       char *vrf_name;
+       char *nhvrf_name;
+       afi_t afi;
+       safi_t safi;
+       char *dest_str;
+       char *mask_str;
+       char *src_str;
+       char *gate_str;
+       char *ifname;
+       char *flag_str;
+       char *tag_str;
+       char *distance_str;
+       char *label_str;
+};
+
+static struct list *static_list;
+
+static int static_list_compare_helper(const char *s1, const char *s2)
+{
+       /* Are Both NULL */
+       if (s1 == s2)
+               return 0;
+
+       if (!s1 && s2)
+               return -1;
+
+       if (s1 && !s2)
+               return 1;
+
+       return strcmp(s1, s2);
+}
+
+static void static_list_delete(struct static_hold_route *shr)
+{
+       if (shr->vrf_name)
+               XFREE(MTYPE_STATIC_ROUTE, shr->vrf_name);
+       if (shr->nhvrf_name)
+               XFREE(MTYPE_STATIC_ROUTE, shr->nhvrf_name);
+       if (shr->dest_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->dest_str);
+       if (shr->mask_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->mask_str);
+       if (shr->src_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->src_str);
+       if (shr->gate_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->gate_str);
+       if (shr->ifname)
+               XFREE(MTYPE_STATIC_ROUTE, shr->ifname);
+       if (shr->flag_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->flag_str);
+       if (shr->tag_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->tag_str);
+       if (shr->distance_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->distance_str);
+       if (shr->label_str)
+               XFREE(MTYPE_STATIC_ROUTE, shr->label_str);
+
+       XFREE(MTYPE_STATIC_ROUTE, shr);
+}
+
+static int static_list_compare(void *arg1, void *arg2)
+{
+       struct static_hold_route *shr1 = arg1;
+       struct static_hold_route *shr2 = arg2;
+       int ret;
+
+       ret = strcmp(shr1->vrf_name, shr2->vrf_name);
+       if (ret)
+               return ret;
+
+       ret = strcmp(shr2->nhvrf_name, shr2->nhvrf_name);
+       if (ret)
+               return ret;
+
+       ret = shr1->afi - shr2->afi;
+       if (ret)
+               return ret;
+
+       ret = shr1->safi - shr2->afi;
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->dest_str, shr2->dest_str);
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->mask_str, shr2->mask_str);
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->src_str, shr2->src_str);
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->gate_str, shr2->gate_str);
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->ifname, shr2->ifname);
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->flag_str, shr2->flag_str);
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->tag_str, shr2->tag_str);
+       if (ret)
+               return ret;
+
+       ret = static_list_compare_helper(shr1->distance_str,
+                                        shr2->distance_str);
+       if (ret)
+               return ret;
+
+       return static_list_compare_helper(shr1->label_str, shr2->label_str);
+}
+
+
 /* General function for static route. */
+static int zebra_static_route_holdem(struct zebra_vrf *zvrf,
+                                    struct zebra_vrf *nh_zvrf,
+                                    afi_t afi, safi_t safi,
+                                    const char *negate, const char *dest_str,
+                                    const char *mask_str, const char *src_str,
+                                    const char *gate_str, const char *ifname,
+                                    const char *flag_str, const char *tag_str,
+                                    const char *distance_str,
+                                    const char *label_str)
+{
+       struct static_hold_route *shr, *lookup;
+       struct listnode *node;
+
+       shr = XCALLOC(MTYPE_STATIC_ROUTE, sizeof(*shr));
+       shr->vrf_name = XSTRDUP(MTYPE_STATIC_ROUTE, zvrf->vrf->name);
+       shr->nhvrf_name = XSTRDUP(MTYPE_STATIC_ROUTE, nh_zvrf->vrf->name);
+       shr->afi = afi;
+       shr->safi = safi;
+       if (dest_str)
+               shr->dest_str = XSTRDUP(MTYPE_STATIC_ROUTE, dest_str);
+       if (mask_str)
+               shr->mask_str = XSTRDUP(MTYPE_STATIC_ROUTE, mask_str);
+       if (src_str)
+               shr->src_str = XSTRDUP(MTYPE_STATIC_ROUTE, src_str);
+       if (gate_str)
+               shr->gate_str = XSTRDUP(MTYPE_STATIC_ROUTE, gate_str);
+       if (ifname)
+               shr->ifname = XSTRDUP(MTYPE_STATIC_ROUTE, ifname);
+       if (flag_str)
+               shr->flag_str = XSTRDUP(MTYPE_STATIC_ROUTE, flag_str);
+       if (tag_str)
+               shr->tag_str = XSTRDUP(MTYPE_STATIC_ROUTE, tag_str);
+       if (distance_str)
+               shr->distance_str = XSTRDUP(MTYPE_STATIC_ROUTE, distance_str);
+       if (label_str)
+               shr->label_str = XSTRDUP(MTYPE_STATIC_ROUTE, label_str);
+
+       for (ALL_LIST_ELEMENTS_RO(static_list, node, lookup)) {
+               if (static_list_compare(shr, lookup) == 0)
+                       break;
+       }
+
+       if (lookup) {
+               if (negate) {
+                       listnode_delete(static_list, lookup);
+                       static_list_delete(shr);
+                       static_list_delete(lookup);
+
+                       return CMD_SUCCESS;
+               }
+
+               /*
+                * If a person enters the same line again
+                * we need to silently accept it
+                */
+               return CMD_SUCCESS;
+       }
+
+       listnode_add_sort(static_list, shr);
+
+       return CMD_SUCCESS;
+}
+
 static int zebra_static_route_leak(
        struct vty *vty, struct zebra_vrf *zvrf, struct zebra_vrf *nh_zvrf,
        afi_t afi, safi_t safi, const char *negate, const char *dest_str,
@@ -98,17 +282,34 @@ static int zebra_static_route_leak(
 
        ret = str2prefix(dest_str, &p);
        if (ret <= 0) {
-               vty_out(vty, "%% Malformed address\n");
+               if (vty)
+                       vty_out(vty, "%% Malformed address\n");
+               else
+                       zlog_warn("%s: Malformed address: %s",
+                                 __PRETTY_FUNCTION__, dest_str);
                return CMD_WARNING_CONFIG_FAILED;
        }
 
+       if (zvrf->vrf->vrf_id == VRF_UNKNOWN
+           || nh_zvrf->vrf->vrf_id == VRF_UNKNOWN) {
+               vrf_set_user_cfged(zvrf->vrf);
+               return zebra_static_route_holdem(
+                       zvrf, nh_zvrf, afi, safi, negate, dest_str, mask_str,
+                       src_str, gate_str, ifname, flag_str, tag_str,
+                       distance_str, label_str);
+       }
        switch (afi) {
        case AFI_IP:
                /* Cisco like mask notation. */
                if (mask_str) {
                        ret = inet_aton(mask_str, &mask);
                        if (ret == 0) {
-                               vty_out(vty, "%% Malformed address\n");
+                               if (vty)
+                                       vty_out(vty, "%% Malformed address\n");
+                               else
+                                       zlog_warn("%s: Malformed address: %s",
+                                                 __PRETTY_FUNCTION__,
+                                                 mask_str);
                                return CMD_WARNING_CONFIG_FAILED;
                        }
                        p.prefixlen = ip_masklen(mask);
@@ -119,7 +320,13 @@ static int zebra_static_route_leak(
                if (src_str) {
                        ret = str2prefix(src_str, &src);
                        if (ret <= 0 || src.family != AF_INET6) {
-                               vty_out(vty, "%% Malformed source address\n");
+                               if (vty)
+                                       vty_out(vty,
+                                               "%% Malformed source address\n");
+                               else
+                                       zlog_warn(
+                                               "%s: Malformed Source address: %s",
+                                               __PRETTY_FUNCTION__, src_str);
                                return CMD_WARNING_CONFIG_FAILED;
                        }
                        src_p = (struct prefix_ipv6 *)&src;
@@ -146,8 +353,13 @@ static int zebra_static_route_leak(
        memset(&snh_label, 0, sizeof(struct static_nh_label));
        if (label_str) {
                if (!mpls_enabled) {
-                       vty_out(vty,
-                               "%% MPLS not turned on in kernel, ignoring command\n");
+                       if (vty)
+                               vty_out(vty,
+                                       "%% MPLS not turned on in kernel, ignoring command\n");
+                       else
+                               zlog_warn(
+                                       "%s: MPLS not turned on in kernel ignoring static route to %s",
+                                       __PRETTY_FUNCTION__, dest_str);
                        return CMD_WARNING_CONFIG_FAILED;
                }
                int rc = mpls_str2label(label_str, &snh_label.num_labels,
@@ -155,18 +367,37 @@ static int zebra_static_route_leak(
                if (rc < 0) {
                        switch (rc) {
                        case -1:
-                               vty_out(vty, "%% Malformed label(s)\n");
+                               if (vty)
+                                       vty_out(vty, "%% Malformed label(s)\n");
+                               else
+                                       zlog_warn(
+                                               "%s: Malformed labels specified for route %s",
+                                               __PRETTY_FUNCTION__, dest_str);
                                break;
                        case -2:
-                               vty_out(vty,
-                                       "%% Cannot use reserved label(s) (%d-%d)\n",
-                                       MPLS_LABEL_RESERVED_MIN,
-                                       MPLS_LABEL_RESERVED_MAX);
+                               if (vty)
+                                       vty_out(vty,
+                                               "%% Cannot use reserved label(s) (%d-%d)\n",
+                                               MPLS_LABEL_RESERVED_MIN,
+                                               MPLS_LABEL_RESERVED_MAX);
+                               else
+                                       zlog_warn(
+                                               "%s: Cannot use reserved labels (%d-%d) for %s",
+                                               __PRETTY_FUNCTION__,
+                                               MPLS_LABEL_RESERVED_MIN,
+                                               MPLS_LABEL_RESERVED_MAX,
+                                               dest_str);
                                break;
                        case -3:
-                               vty_out(vty,
-                                       "%% Too many labels. Enter %d or fewer\n",
-                                       MPLS_MAX_LABELS);
+                               if (vty)
+                                       vty_out(vty,
+                                               "%% Too many labels. Enter %d or fewer\n",
+                                               MPLS_MAX_LABELS);
+                               else
+                                       zlog_warn(
+                                               "%s: Too many labels, Enter %d or fewer for %s",
+                                               __PRETTY_FUNCTION__,
+                                               MPLS_MAX_LABELS, dest_str);
                                break;
                        }
                        return CMD_WARNING_CONFIG_FAILED;
@@ -178,8 +409,13 @@ static int zebra_static_route_leak(
                if (strncasecmp(ifname, "Null0", strlen(ifname)) == 0
                    || strncasecmp(ifname, "reject", strlen(ifname)) == 0
                    || strncasecmp(ifname, "blackhole", strlen(ifname)) == 0) {
-                       vty_out(vty,
-                               "%% Nexthop interface cannot be Null0, reject or blackhole\n");
+                       if (vty)
+                               vty_out(vty,
+                                       "%% Nexthop interface cannot be Null0, reject or blackhole\n");
+                       else
+                               zlog_warn(
+                                       "%s: Nexthop interface cannot be Null0, reject or blackhole for %s",
+                                       __PRETTY_FUNCTION__, dest_str);
                        return CMD_WARNING_CONFIG_FAILED;
                }
        }
@@ -197,15 +433,28 @@ static int zebra_static_route_leak(
                        bh_type = STATIC_BLACKHOLE_NULL;
                        break;
                default:
-                       vty_out(vty, "%% Malformed flag %s \n", flag_str);
+                       if (vty)
+                               vty_out(vty, "%% Malformed flag %s \n",
+                                       flag_str);
+                       else
+                               zlog_warn("%s: Malformed flag %s for %s",
+                                         __PRETTY_FUNCTION__, flag_str,
+                                         dest_str);
                        return CMD_WARNING_CONFIG_FAILED;
                }
        }
 
        if (gate_str) {
                if (inet_pton(afi2family(afi), gate_str, &gate) != 1) {
-                       vty_out(vty, "%% Malformed nexthop address %s\n",
-                               gate_str);
+                       if (vty)
+                               vty_out(vty,
+                                       "%% Malformed nexthop address %s\n",
+                                       gate_str);
+                       else
+                               zlog_warn(
+                                       "%s: Malformed nexthop address %s for %s",
+                                       __PRETTY_FUNCTION__, gate_str,
+                                       dest_str);
                        return CMD_WARNING_CONFIG_FAILED;
                }
                gatep = &gate;
@@ -244,6 +493,34 @@ static int zebra_static_route_leak(
        return CMD_SUCCESS;
 }
 
+static struct zebra_vrf *zebra_vty_get_unknown_vrf(struct vty *vty,
+                                                  const char *vrf_name)
+{
+       struct zebra_vrf *zvrf;
+       struct vrf *vrf;
+
+       zvrf = zebra_vrf_lookup_by_name(vrf_name);
+
+       if (zvrf)
+               return zvrf;
+
+       vrf = vrf_get(VRF_UNKNOWN, vrf_name);
+       if (!vrf) {
+               vty_out(vty, "%% Could not create vrf %s\n", vrf_name);
+               return NULL;
+       }
+       zvrf = vrf->info;
+       if (!zvrf) {
+               vty_out(vty, "%% Could not create vrf-info %s\n",
+                       vrf_name);
+               return NULL;
+       }
+       /* Mark as having FRR configuration */
+       vrf_set_user_cfged(vrf);
+
+       return zvrf;
+}
+
 static int zebra_static_route(struct vty *vty, afi_t afi, safi_t safi,
                              const char *negate, const char *dest_str,
                              const char *mask_str, const char *src_str,
@@ -253,7 +530,6 @@ static int zebra_static_route(struct vty *vty, afi_t afi, safi_t safi,
                              const char *label_str)
 {
        struct zebra_vrf *zvrf;
-       struct vrf *vrf;
 
        /* VRF id */
        zvrf = zebra_vrf_lookup_by_name(vrf_name);
@@ -268,26 +544,47 @@ static int zebra_static_route(struct vty *vty, afi_t afi, safi_t safi,
         * Note: The VRF isn't active until we hear about it from the kernel.
         */
        if (!zvrf) {
-               vrf = vrf_get(VRF_UNKNOWN, vrf_name);
-               if (!vrf) {
-                       vty_out(vty, "%% Could not create vrf %s\n", vrf_name);
-                       return CMD_WARNING_CONFIG_FAILED;
-               }
-               zvrf = vrf->info;
-               if (!zvrf) {
-                       vty_out(vty, "%% Could not create vrf-info %s\n",
-                               vrf_name);
+               zvrf = zebra_vty_get_unknown_vrf(vty, vrf_name);
+               if (!zvrf)
                        return CMD_WARNING_CONFIG_FAILED;
-               }
-               /* Mark as having FRR configuration */
-               vrf_set_user_cfged(vrf);
        }
        return zebra_static_route_leak(
                vty, zvrf, zvrf, afi, safi, negate, dest_str, mask_str, src_str,
                gate_str, ifname, flag_str, tag_str, distance_str, label_str);
 }
 
+void static_config_install_delayed_routes(struct zebra_vrf *zvrf)
+{
+       struct listnode *node, *nnode;
+       struct static_hold_route *shr;
+       struct zebra_vrf *ozvrf, *nh_zvrf;
+       int installed;
+
+       for (ALL_LIST_ELEMENTS(static_list, node, nnode, shr)) {
+               ozvrf = zebra_vrf_lookup_by_name(shr->vrf_name);
+               nh_zvrf = zebra_vrf_lookup_by_name(shr->nhvrf_name);
+
+               if (ozvrf != zvrf && nh_zvrf != zvrf)
+                       continue;
+
+               if (ozvrf->vrf->vrf_id == VRF_UNKNOWN
+                   || nh_zvrf->vrf->vrf_id == VRF_UNKNOWN)
+                       continue;
+
+               installed = zebra_static_route_leak(
+                       NULL, ozvrf, nh_zvrf, shr->afi, shr->safi, NULL,
+                       shr->dest_str, shr->mask_str, shr->src_str,
+                       shr->gate_str, shr->ifname, shr->flag_str, shr->tag_str,
+                       shr->distance_str, shr->label_str);
 
+               if (installed != CMD_SUCCESS)
+                       zlog_debug(
+                               "%s: Attempt to install %s as a route and it was rejected",
+                               __PRETTY_FUNCTION__, shr->dest_str);
+               listnode_delete(static_list, shr);
+               static_list_delete(shr);
+       }
+}
 /* Static unicast routes for multicast RPF lookup. */
 DEFPY (ip_mroute_dist,
        ip_mroute_dist_cmd,
@@ -501,14 +798,14 @@ DEFPY(ip_route_address_interface,
                ifname = NULL;
        }
 
-       zvrf = zebra_vrf_lookup_by_name(vrf);
+       zvrf = zebra_vty_get_unknown_vrf(vty, vrf);
        if (!zvrf) {
                vty_out(vty, "%% vrf %s is not defined\n", vrf);
                return CMD_WARNING_CONFIG_FAILED;
        }
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -559,7 +856,7 @@ DEFPY(ip_route_address_interface_vrf,
        }
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -608,14 +905,14 @@ DEFPY(ip_route,
                ifname = NULL;
        }
 
-       zvrf = zebra_vrf_lookup_by_name(vrf);
+       zvrf = zebra_vty_get_unknown_vrf(vty, vrf);
        if (!zvrf) {
                vty_out(vty, "%% vrf %s is not defined\n", vrf);
                return CMD_WARNING_CONFIG_FAILED;
        }
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -665,7 +962,7 @@ DEFPY(ip_route_vrf,
        }
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -743,7 +1040,7 @@ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn,
                                tm->tm_hour);
                vty_out(vty, " ago\n");
 
-               for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+               for (ALL_NEXTHOPS(re->ng, nexthop)) {
                        char addrstr[32];
 
                        vty_out(vty, "  %c%s",
@@ -922,7 +1219,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
 
                json_object_string_add(json_route, "uptime", buf);
 
-               for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
+               for (ALL_NEXTHOPS(re->ng, nexthop)) {
                        json_nexthop = json_object_new_object();
 
                        if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_DUPLICATE))
@@ -1088,8 +1385,8 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
        }
 
        /* Nexthop information. */
-       for (ALL_NEXTHOPS(re->nexthop, nexthop)) {
-               if (nexthop == re->nexthop) {
+       for (ALL_NEXTHOPS(re->ng, nexthop)) {
+               if (nexthop == re->ng.nexthop) {
                        /* Prefix information. */
                        len = vty_out(vty, "%c", zebra_route_char(re->type));
                        if (re->instance)
@@ -1842,7 +2139,7 @@ static void vty_show_ip_route_summary_prefix(struct vty *vty,
                         * In case of ECMP, count only once.
                         */
                        cnt = 0;
-                       for (nexthop = re->nexthop; (!cnt && nexthop);
+                       for (nexthop = re->ng.nexthop; (!cnt && nexthop);
                             nexthop = nexthop->next) {
                                cnt++;
                                rib_cnt[ZEBRA_ROUTE_TOTAL]++;
@@ -1894,6 +2191,8 @@ static void vty_show_ip_route_summary_prefix(struct vty *vty,
 int static_config(struct vty *vty, struct zebra_vrf *zvrf, afi_t afi,
                  safi_t safi, const char *cmd)
 {
+       struct static_hold_route *shr;
+       struct listnode *node;
        char spacing[100];
        struct route_node *rn;
        struct static_route *si;
@@ -1907,6 +2206,40 @@ int static_config(struct vty *vty, struct zebra_vrf *zvrf, afi_t afi,
        sprintf(spacing, "%s%s", (zvrf->vrf->vrf_id == VRF_DEFAULT) ? "" : " ",
                cmd);
 
+       /*
+        * Static routes for vrfs not fully inited
+        */
+       for (ALL_LIST_ELEMENTS_RO(static_list, node, shr)) {
+               if (shr->afi != afi || shr->safi != safi)
+                       continue;
+
+               if (strcmp(zvrf->vrf->name, shr->vrf_name) != 0)
+                       continue;
+
+               vty_out(vty, "%s ", spacing);
+               if (shr->dest_str)
+                       vty_out(vty, "%s ", shr->dest_str);
+               if (shr->mask_str)
+                       vty_out(vty, "%s ", shr->mask_str);
+               if (shr->src_str)
+                       vty_out(vty, "from %s ", shr->src_str);
+               if (shr->gate_str)
+                       vty_out(vty, "%s ", shr->gate_str);
+               if (shr->ifname)
+                       vty_out(vty, "%s ", shr->ifname);
+               if (shr->flag_str)
+                       vty_out(vty, "%s ", shr->flag_str);
+               if (shr->tag_str)
+                       vty_out(vty, "tag %s ", shr->tag_str);
+               if (shr->distance_str)
+                       vty_out(vty, "%s ", shr->distance_str);
+               if (shr->label_str)
+                       vty_out(vty, "label %s ", shr->label_str);
+               if (strcmp(shr->vrf_name, shr->nhvrf_name) != 0)
+                       vty_out(vty, "nexthop-vrf %s", shr->nhvrf_name);
+               vty_out(vty, "\n");
+       }
+
        for (rn = route_top(stable); rn; rn = srcdest_route_next(rn))
                for (si = rn->info; si; si = si->next) {
                        vty_out(vty, "%s %s", spacing,
@@ -2076,14 +2409,14 @@ DEFPY(ipv6_route_address_interface,
        struct zebra_vrf *zvrf;
        struct zebra_vrf *nh_zvrf;
 
-       zvrf = zebra_vrf_lookup_by_name(vrf);
+       zvrf = zebra_vty_get_unknown_vrf(vty, vrf);
        if (!zvrf) {
                vty_out(vty, "%% vrf %s is not defined\n", vrf);
                return CMD_WARNING_CONFIG_FAILED;
        }
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -2127,7 +2460,7 @@ DEFPY(ipv6_route_address_interface_vrf,
        struct zebra_vrf *nh_zvrf;
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -2170,14 +2503,14 @@ DEFPY(ipv6_route,
        struct zebra_vrf *zvrf;
        struct zebra_vrf *nh_zvrf;
 
-       zvrf = zebra_vrf_lookup_by_name(vrf);
+       zvrf = zebra_vty_get_unknown_vrf(vty, vrf);
        if (!zvrf) {
                vty_out(vty, "%% vrf %s is not defined\n", vrf);
                return CMD_WARNING_CONFIG_FAILED;
        }
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -2220,7 +2553,7 @@ DEFPY(ipv6_route_vrf,
        struct zebra_vrf *nh_zvrf;
 
        if (nexthop_vrf)
-               nh_zvrf = zebra_vrf_lookup_by_name(nexthop_vrf);
+               nh_zvrf = zebra_vty_get_unknown_vrf(vty, nexthop_vrf);
        else
                nh_zvrf = zvrf;
 
@@ -3409,4 +3742,8 @@ void zebra_vty_init(void)
        install_element(CONFIG_NODE, &no_default_vrf_vni_mapping_cmd);
        install_element(VRF_NODE, &vrf_vni_mapping_cmd);
        install_element(VRF_NODE, &no_vrf_vni_mapping_cmd);
+
+       static_list = list_new();
+       static_list->cmp = (int (*)(void *, void *))static_list_compare;
+       static_list->del = (void (*)(void *))static_list_delete;
 }
index d3ede66fb0cae0379c77adfe53d8e6ab1ab26fe6..256fa9e4b71009a7b8a65b8496e855c1b5c44d27 100644 (file)
@@ -1157,8 +1157,7 @@ static int zvni_macip_send_msg_to_client(vni_t vni, struct ethaddr *macaddr,
        if (!client)
                return 0;
 
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, VRF_DEFAULT);
        stream_putl(s, vni);
@@ -1195,7 +1194,7 @@ static int zvni_macip_send_msg_to_client(vni_t vni, struct ethaddr *macaddr,
        else
                client->macipdel_cnt++;
 
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /*
@@ -2565,8 +2564,7 @@ static int zvni_send_add_to_client(zebra_vni_t *zvni)
        if (!client)
                return 0;
 
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_VNI_ADD, VRF_DEFAULT);
        stream_putl(s, zvni->vni);
@@ -2583,7 +2581,7 @@ static int zvni_send_add_to_client(zebra_vni_t *zvni)
                           zebra_route_string(client->proto));
 
        client->vniadd_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /*
@@ -2599,7 +2597,7 @@ static int zvni_send_del_to_client(vni_t vni)
        if (!client)
                return 0;
 
-       s = client->obuf;
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
        stream_reset(s);
 
        zclient_create_header(s, ZEBRA_VNI_DEL, VRF_DEFAULT);
@@ -2613,7 +2611,7 @@ static int zvni_send_del_to_client(vni_t vni)
                           zebra_route_string(client->proto));
 
        client->vnidel_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /*
@@ -3550,8 +3548,7 @@ static int zl3vni_send_add_to_client(zebra_l3vni_t *zl3vni)
        memset(&rmac, 0, sizeof(struct ethaddr));
        zl3vni_get_rmac(zl3vni, &rmac);
 
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_L3VNI_ADD, zl3vni_vrf_id(zl3vni));
        stream_putl(s, zl3vni->vni);
@@ -3574,7 +3571,7 @@ static int zl3vni_send_add_to_client(zebra_l3vni_t *zl3vni)
                        zebra_route_string(client->proto));
 
        client->l3vniadd_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /*
@@ -3590,8 +3587,7 @@ static int zl3vni_send_del_to_client(zebra_l3vni_t *zl3vni)
        if (!client)
                return 0;
 
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_L3VNI_DEL, zl3vni_vrf_id(zl3vni));
        stream_putl(s, zl3vni->vni);
@@ -3605,7 +3601,7 @@ static int zl3vni_send_del_to_client(zebra_l3vni_t *zl3vni)
                           zebra_route_string(client->proto));
 
        client->l3vnidel_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 static void zebra_vxlan_process_l3vni_oper_up(zebra_l3vni_t *zl3vni)
@@ -3723,8 +3719,7 @@ static int ip_prefix_send_to_client(vrf_id_t vrf_id, struct prefix *p,
        if (!client)
                return 0;
 
-       s = client->obuf;
-       stream_reset(s);
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, vrf_id);
        stream_put(s, p, sizeof(struct prefix));
@@ -3743,7 +3738,7 @@ static int ip_prefix_send_to_client(vrf_id_t vrf_id, struct prefix *p,
        else
                client->prefixdel_cnt++;
 
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /* re-add remote rmac if needed */
@@ -4863,8 +4858,7 @@ int zebra_vxlan_local_neigh_add_update(struct interface *ifp,
 /*
  * Handle message from client to delete a remote MACIP for a VNI.
  */
-int zebra_vxlan_remote_macip_del(struct zserv *client, u_short length,
-                                struct zebra_vrf *zvrf)
+void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        vni_t vni;
@@ -4884,9 +4878,9 @@ int zebra_vxlan_remote_macip_del(struct zserv *client, u_short length,
        memset(&ip, 0, sizeof(struct ipaddr));
        memset(&vtep_ip, 0, sizeof(struct in_addr));
 
-       s = client->ibuf;
+       s = msg;
 
-       while (l < length) {
+       while (l < hdr->length) {
                /* Obtain each remote MACIP and process. */
                /* Message contains VNI, followed by MAC followed by IP (if any)
                 * followed by remote VTEP IP.
@@ -5008,7 +5002,7 @@ int zebra_vxlan_remote_macip_del(struct zserv *client, u_short length,
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /*
@@ -5016,8 +5010,7 @@ stream_failure:
  * could be just the add of a MAC address or the add of a neighbor
  * (IP+MAC).
  */
-int zebra_vxlan_remote_macip_add(struct zserv *client, u_short length,
-                                struct zebra_vrf *zvrf)
+void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        vni_t vni;
@@ -5045,12 +5038,12 @@ int zebra_vxlan_remote_macip_add(struct zserv *client, u_short length,
                zlog_warn(
                        "%s: EVPN Not turned on yet we have received a remote_macip add zapi callback",
                        __PRETTY_FUNCTION__);
-               return -1;
+               return;
        }
 
-       s = client->ibuf;
+       s = msg;
 
-       while (l < length) {
+       while (l < hdr->length) {
                /* Obtain each remote MACIP and process. */
                /* Message contains VNI, followed by MAC followed by IP (if any)
                 * followed by remote VTEP IP.
@@ -5159,7 +5152,7 @@ int zebra_vxlan_remote_macip_add(struct zserv *client, u_short length,
                                                prefix_mac2str(&macaddr, buf,
                                                               sizeof(buf)),
                                                vni, inet_ntoa(vtep_ip));
-                                       return -1;
+                                       return;
                                }
 
                                /* Is this MAC created for a MACIP? */
@@ -5212,7 +5205,7 @@ int zebra_vxlan_remote_macip_add(struct zserv *client, u_short length,
                                                prefix_mac2str(&macaddr, buf,
                                                               sizeof(buf)),
                                                vni, inet_ntoa(vtep_ip));
-                                       return -1;
+                                       return;
                                }
 
                        } else if (memcmp(&n->emac, &macaddr, sizeof(macaddr))
@@ -5240,7 +5233,7 @@ int zebra_vxlan_remote_macip_add(struct zserv *client, u_short length,
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /*
@@ -5543,8 +5536,7 @@ int zebra_vxlan_local_mac_add_update(struct interface *ifp,
 /*
  * Handle message from client to delete a remote VTEP for a VNI.
  */
-int zebra_vxlan_remote_vtep_del(struct zserv *client, u_short length,
-                               struct zebra_vrf *zvrf)
+void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        u_short l = 0;
@@ -5559,18 +5551,18 @@ int zebra_vxlan_remote_vtep_del(struct zserv *client, u_short length,
                zlog_warn(
                        "%s: EVPN is not enabled yet we have received a vtep del command",
                        __PRETTY_FUNCTION__);
-               return -1;
+               return;
        }
 
        if (zvrf_id(zvrf) != VRF_DEFAULT) {
                zlog_err("Recv MACIP DEL for non-default VRF %u",
                         zvrf_id(zvrf));
-               return -1;
+               return;
        }
 
-       s = client->ibuf;
+       s = msg;
 
-       while (l < length) {
+       while (l < hdr->length) {
                /* Obtain each remote VTEP and process. */
                STREAM_GETL(s, vni);
                l += 4;
@@ -5623,14 +5615,13 @@ int zebra_vxlan_remote_vtep_del(struct zserv *client, u_short length,
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /*
  * Handle message from client to add a remote VTEP for a VNI.
  */
-int zebra_vxlan_remote_vtep_add(struct zserv *client, u_short length,
-                               struct zebra_vrf *zvrf)
+void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        u_short l = 0;
@@ -5644,18 +5635,18 @@ int zebra_vxlan_remote_vtep_add(struct zserv *client, u_short length,
                zlog_warn(
                        "%s: EVPN not enabled yet we received a vtep_add zapi call",
                        __PRETTY_FUNCTION__);
-               return -1;
+               return;
        }
 
        if (zvrf_id(zvrf) != VRF_DEFAULT) {
                zlog_err("Recv MACIP ADD for non-default VRF %u",
                         zvrf_id(zvrf));
-               return -1;
+               return;
        }
 
-       s = client->ibuf;
+       s = msg;
 
-       while (l < length) {
+       while (l < hdr->length) {
                /* Obtain each remote VTEP and process. */
                STREAM_GETL(s, vni);
                l += 4;
@@ -5705,7 +5696,7 @@ int zebra_vxlan_remote_vtep_add(struct zserv *client, u_short length,
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /*
@@ -6512,8 +6503,7 @@ int zebra_vxlan_vrf_delete(struct zebra_vrf *zvrf)
  * Handle message from client to enable/disable advertisement of g/w macip
  * routes
  */
-int zebra_vxlan_advertise_subnet(struct zserv *client, u_short length,
-                                struct zebra_vrf *zvrf)
+void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        int advertise;
@@ -6527,19 +6517,19 @@ int zebra_vxlan_advertise_subnet(struct zserv *client, u_short length,
        if (zvrf_id(zvrf) != VRF_DEFAULT) {
                zlog_err("EVPN GW-MACIP Adv for non-default VRF %u",
                         zvrf_id(zvrf));
-               return -1;
+               return;
        }
 
-       s = client->ibuf;
+       s = msg;
        advertise = stream_getc(s);
        vni = stream_get3(s);
 
        zvni = zvni_lookup(vni);
        if (!zvni)
-               return 0;
+               return;
 
        if (zvni->advertise_subnet == advertise)
-               return 0;
+               return;
 
        if (IS_ZEBRA_DEBUG_VXLAN)
                zlog_debug("EVPN subnet Adv %s on VNI %d , currently %s",
@@ -6551,35 +6541,32 @@ int zebra_vxlan_advertise_subnet(struct zserv *client, u_short length,
 
        ifp = zvni->vxlan_if;
        if (!ifp)
-               return 0;
+               return;
 
        zif = ifp->info;
 
        /* If down or not mapped to a bridge, we're done. */
        if (!if_is_operative(ifp) || !zif->brslave_info.br_if)
-               return 0;
+               return;
 
        zl2_info = zif->l2info.vxl;
 
        vlan_if =
                zvni_map_to_svi(zl2_info.access_vlan, zif->brslave_info.br_if);
        if (!vlan_if)
-               return 0;
+               return;
 
        if (zvni->advertise_subnet)
                zvni_advertise_subnet(zvni, vlan_if, 1);
        else
                zvni_advertise_subnet(zvni, vlan_if, 0);
-
-       return 0;
 }
 
 /*
  * Handle message from client to enable/disable advertisement of g/w macip
  * routes
  */
-int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length,
-                                  struct zebra_vrf *zvrf)
+void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        int advertise;
@@ -6590,10 +6577,10 @@ int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length,
        if (zvrf_id(zvrf) != VRF_DEFAULT) {
                zlog_err("EVPN GW-MACIP Adv for non-default VRF %u",
                         zvrf_id(zvrf));
-               return -1;
+               return;
        }
 
-       s = client->ibuf;
+       s = msg;
        STREAM_GETC(s, advertise);
        STREAM_GET(&vni, s, 3);
 
@@ -6606,7 +6593,7 @@ int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length,
                                           : "disabled");
 
                if (zvrf->advertise_gw_macip == advertise)
-                       return 0;
+                       return;
 
                zvrf->advertise_gw_macip = advertise;
 
@@ -6625,7 +6612,7 @@ int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length,
 
                zvni = zvni_lookup(vni);
                if (!zvni)
-                       return 0;
+                       return;
 
                if (IS_ZEBRA_DEBUG_VXLAN)
                        zlog_debug(
@@ -6635,26 +6622,26 @@ int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length,
                                                                 : "disabled");
 
                if (zvni->advertise_gw_macip == advertise)
-                       return 0;
+                       return;
 
                zvni->advertise_gw_macip = advertise;
 
                ifp = zvni->vxlan_if;
                if (!ifp)
-                       return 0;
+                       return;
 
                zif = ifp->info;
 
                /* If down or not mapped to a bridge, we're done. */
                if (!if_is_operative(ifp) || !zif->brslave_info.br_if)
-                       return 0;
+                       return;
 
                zl2_info = zif->l2info.vxl;
 
                vlan_if = zvni_map_to_svi(zl2_info.access_vlan,
                                          zif->brslave_info.br_if);
                if (!vlan_if)
-                       return 0;
+                       return;
 
                if (advertise_gw_macip_enabled(zvni)) {
                        /* Add primary SVI MAC-IP */
@@ -6676,7 +6663,7 @@ int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length,
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 
@@ -6686,8 +6673,7 @@ stream_failure:
  * when disabled, the entries should be deleted and remote VTEPs and MACs
  * uninstalled from the kernel.
  */
-int zebra_vxlan_advertise_all_vni(struct zserv *client, u_short length,
-                                 struct zebra_vrf *zvrf)
+void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS)
 {
        struct stream *s = NULL;
        int advertise = 0;
@@ -6695,10 +6681,10 @@ int zebra_vxlan_advertise_all_vni(struct zserv *client, u_short length,
 
        if (zvrf_id(zvrf) != VRF_DEFAULT) {
                zlog_err("EVPN VNI Adv for non-default VRF %u", zvrf_id(zvrf));
-               return -1;
+               return;
        }
 
-       s = client->ibuf;
+       s = msg;
        STREAM_GETC(s, advertise);
 
        if (IS_ZEBRA_DEBUG_VXLAN)
@@ -6707,7 +6693,7 @@ int zebra_vxlan_advertise_all_vni(struct zserv *client, u_short length,
                           is_evpn_enabled() ? "enabled" : "disabled");
 
        if (zvrf->advertise_all_vni == advertise)
-               return 0;
+               return;
 
        zvrf->advertise_all_vni = advertise;
        if (is_evpn_enabled()) {
@@ -6732,13 +6718,13 @@ int zebra_vxlan_advertise_all_vni(struct zserv *client, u_short length,
                /* cleanup all l3vnis */
                zns = zebra_ns_lookup(NS_DEFAULT);
                if (!zns)
-                       return -1;
+                       return;
 
                hash_iterate(zns->l3vni_table, zl3vni_cleanup_all, NULL);
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /*
index 7abf0050fcfb429b96717a49fdb9ba4adcdffc74..6f25ad1e24ae99a0e67818994542525860233090 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "lib/json.h"
 #include "zebra/zebra_vrf.h"
+#include "zebra/zserv.h"
 
 /* Is EVPN enabled? */
 #define EVPN_ENABLED(zvrf)  (zvrf)->advertise_all_vni
@@ -51,6 +52,15 @@ static inline int is_evpn_enabled()
 
 #define VNI_STR_LEN 32
 
+/* ZAPI message handlers */
+extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
+
 extern int is_l3vni_for_prefix_routes_only(vni_t vni);
 extern ifindex_t get_l3vni_svi_ifindex(vrf_id_t vrf_id);
 extern int zebra_vxlan_vrf_delete(struct zebra_vrf *zvrf);
@@ -117,10 +127,6 @@ extern int zebra_vxlan_local_neigh_add_update(
 extern int zebra_vxlan_local_neigh_del(struct interface *ifp,
                                       struct interface *link_if,
                                       struct ipaddr *ip);
-extern int zebra_vxlan_remote_macip_add(struct zserv *client, u_short length,
-                                       struct zebra_vrf *zvrf);
-extern int zebra_vxlan_remote_macip_del(struct zserv *client, u_short length,
-                                       struct zebra_vrf *zvrf);
 extern int zebra_vxlan_local_mac_add_update(struct interface *ifp,
                                            struct interface *br_if,
                                            struct ethaddr *mac, vlanid_t vid,
@@ -140,16 +146,6 @@ extern int zebra_vxlan_if_down(struct interface *ifp);
 extern int zebra_vxlan_if_add(struct interface *ifp);
 extern int zebra_vxlan_if_update(struct interface *ifp, u_int16_t chgflags);
 extern int zebra_vxlan_if_del(struct interface *ifp);
-extern int zebra_vxlan_remote_vtep_add(struct zserv *client, u_short length,
-                                      struct zebra_vrf *zvrf);
-extern int zebra_vxlan_remote_vtep_del(struct zserv *client, u_short length,
-                                      struct zebra_vrf *zvrf);
-extern int zebra_vxlan_advertise_subnet(struct zserv *client, u_short length,
-                                       struct zebra_vrf *zvrf);
-extern int zebra_vxlan_advertise_gw_macip(struct zserv *client, u_short length,
-                                         struct zebra_vrf *zvrf);
-extern int zebra_vxlan_advertise_all_vni(struct zserv *client, u_short length,
-                                        struct zebra_vrf *zvrf);
 extern int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf, vni_t vni,
                                           char *err, int err_str_sz,
                                           int filter, int add);
index 8275ee1a3c1ea451a5866a14f9c5d70c49908821..fc23d4e0dd024474bc89ff94db9e717fb1fc941d 100644 (file)
 #include "zebra/label_manager.h"
 #include "zebra/zebra_vxlan.h"
 #include "zebra/rt.h"
+#include "zebra/zebra_pbr.h"
 
 /* Event list of zebra. */
-enum event { ZEBRA_SERV, ZEBRA_READ, ZEBRA_WRITE };
-
-static void zebra_event(enum event event, int sock, struct zserv *client);
-
+enum event { ZEBRA_READ, ZEBRA_WRITE };
+/* privileges */
 extern struct zebra_privs_t zserv_privs;
+/* post event into client */
+static void zebra_event(struct zserv *client, enum event event);
 
-static void zebra_client_close(struct zserv *client);
-
-static int zserv_delayed_close(struct thread *thread)
-{
-       struct zserv *client = THREAD_ARG(thread);
 
-       client->t_suicide = NULL;
-       zebra_client_close(client);
-       return 0;
-}
+/* Public interface ======================================================== */
 
-static int zserv_flush_data(struct thread *thread)
+int zebra_server_send_message(struct zserv *client, struct stream *msg)
 {
-       struct zserv *client = THREAD_ARG(thread);
-
-       client->t_write = NULL;
-       if (client->t_suicide) {
-               zebra_client_close(client);
-               return -1;
-       }
-       switch (buffer_flush_available(client->wb, client->sock)) {
-       case BUFFER_ERROR:
-               zlog_warn(
-                       "%s: buffer_flush_available failed on zserv client fd %d, "
-                       "closing",
-                       __func__, client->sock);
-               zebra_client_close(client);
-               client = NULL;
-               break;
-       case BUFFER_PENDING:
-               client->t_write = NULL;
-               thread_add_write(zebrad.master, zserv_flush_data, client,
-                                client->sock, &client->t_write);
-               break;
-       case BUFFER_EMPTY:
-               break;
-       }
-
-       if (client)
-               client->last_write_time = monotime(NULL);
+       stream_fifo_push(client->obuf_fifo, msg);
+       zebra_event(client, ZEBRA_WRITE);
        return 0;
 }
 
-int zebra_server_send_message(struct zserv *client)
-{
-       if (client->t_suicide)
-               return -1;
-
-       if (client->is_synchronous)
-               return 0;
-
-       stream_set_getp(client->obuf, 0);
-       client->last_write_cmd = stream_getw_from(client->obuf, 6);
-       switch (buffer_write(client->wb, client->sock,
-                            STREAM_DATA(client->obuf),
-                            stream_get_endp(client->obuf))) {
-       case BUFFER_ERROR:
-               zlog_warn(
-                       "%s: buffer_write failed to zserv client fd %d, closing",
-                       __func__, client->sock);
-               /* Schedule a delayed close since many of the functions that
-                  call this
-                  one do not check the return code.  They do not allow for the
-                  possibility that an I/O error may have caused the client to
-                  be
-                  deleted. */
-               client->t_suicide = NULL;
-               thread_add_event(zebrad.master, zserv_delayed_close, client, 0,
-                                &client->t_suicide);
-               return -1;
-       case BUFFER_EMPTY:
-               THREAD_OFF(client->t_write);
-               break;
-       case BUFFER_PENDING:
-               thread_add_write(zebrad.master, zserv_flush_data, client,
-                                client->sock, &client->t_write);
-               break;
-       }
-
-       client->last_write_time = monotime(NULL);
-       return 0;
-}
+/* Encoding helpers -------------------------------------------------------- */
 
 static void zserv_encode_interface(struct stream *s, struct interface *ifp)
 {
@@ -201,6 +131,34 @@ static void zserv_encode_vrf(struct stream *s, struct zebra_vrf *zvrf)
        stream_putw_at(s, 0, stream_get_endp(s));
 }
 
+static int zserv_encode_nexthop(struct stream *s, struct nexthop *nexthop)
+{
+       stream_putc(s, nexthop->type);
+       switch (nexthop->type) {
+       case NEXTHOP_TYPE_IPV4:
+       case NEXTHOP_TYPE_IPV4_IFINDEX:
+               stream_put_in_addr(s, &nexthop->gate.ipv4);
+               stream_putl(s, nexthop->ifindex);
+               break;
+       case NEXTHOP_TYPE_IPV6:
+               stream_put(s, &nexthop->gate.ipv6, 16);
+               break;
+       case NEXTHOP_TYPE_IPV6_IFINDEX:
+               stream_put(s, &nexthop->gate.ipv6, 16);
+               stream_putl(s, nexthop->ifindex);
+               break;
+       case NEXTHOP_TYPE_IFINDEX:
+               stream_putl(s, nexthop->ifindex);
+               break;
+       default:
+               /* do nothing */
+               break;
+       }
+       return 1;
+}
+
+/* Send handlers ----------------------------------------------------------- */
+
 /* Interface is added. Send ZEBRA_INTERFACE_ADD to client. */
 /*
  * This function is called in the following situations:
@@ -214,74 +172,65 @@ static void zserv_encode_vrf(struct stream *s, struct zebra_vrf *zvrf)
  */
 int zsend_interface_add(struct zserv *client, struct interface *ifp)
 {
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_INTERFACE_ADD, ifp->vrf_id);
        zserv_encode_interface(s, ifp);
 
        client->ifadd_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /* Interface deletion from zebra daemon. */
 int zsend_interface_delete(struct zserv *client, struct interface *ifp)
 {
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_INTERFACE_DELETE, ifp->vrf_id);
        zserv_encode_interface(s, ifp);
 
        client->ifdel_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 int zsend_vrf_add(struct zserv *client, struct zebra_vrf *zvrf)
 {
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_VRF_ADD, zvrf_id(zvrf));
        zserv_encode_vrf(s, zvrf);
 
        client->vrfadd_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /* VRF deletion from zebra daemon. */
 int zsend_vrf_delete(struct zserv *client, struct zebra_vrf *zvrf)
-{
-       struct stream *s;
 
-       s = client->obuf;
-       stream_reset(s);
+{
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_VRF_DELETE, zvrf_id(zvrf));
        zserv_encode_vrf(s, zvrf);
 
        client->vrfdel_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 int zsend_interface_link_params(struct zserv *client, struct interface *ifp)
 {
-       struct stream *s;
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        /* Check this client need interface information. */
-       if (!client->ifinfo)
+       if (!client->ifinfo) {
+               stream_free(s);
                return 0;
+       }
 
-       if (!ifp->link_params)
+       if (!ifp->link_params) {
+               stream_free(s);
                return 0;
-       s = client->obuf;
-       stream_reset(s);
+       }
 
        zclient_create_header(s, ZEBRA_INTERFACE_LINK_PARAMS, ifp->vrf_id);
 
@@ -289,13 +238,15 @@ int zsend_interface_link_params(struct zserv *client, struct interface *ifp)
        stream_putl(s, ifp->ifindex);
 
        /* Then TE Link Parameters */
-       if (zebra_interface_link_params_write(s, ifp) == 0)
+       if (zebra_interface_link_params_write(s, ifp) == 0) {
+               stream_free(s);
                return 0;
+       }
 
        /* Write packet size. */
        stream_putw_at(s, 0, stream_get_endp(s));
 
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /* Interface address is added/deleted. Send ZEBRA_INTERFACE_ADDRESS_ADD or
@@ -340,11 +291,8 @@ int zsend_interface_address(int cmd, struct zserv *client,
                            struct interface *ifp, struct connected *ifc)
 {
        int blen;
-       struct stream *s;
        struct prefix *p;
-
-       s = client->obuf;
-       stream_reset(s);
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, ifp->vrf_id);
        stream_putl(s, ifp->ifindex);
@@ -377,7 +325,7 @@ int zsend_interface_address(int cmd, struct zserv *client,
        stream_putw_at(s, 0, stream_get_endp(s));
 
        client->connected_rt_add_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 static int zsend_interface_nbr_address(int cmd, struct zserv *client,
@@ -385,12 +333,9 @@ static int zsend_interface_nbr_address(int cmd, struct zserv *client,
                                       struct nbr_connected *ifc)
 {
        int blen;
-       struct stream *s;
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
        struct prefix *p;
 
-       s = client->obuf;
-       stream_reset(s);
-
        zclient_create_header(s, cmd, ifp->vrf_id);
        stream_putl(s, ifp->ifindex);
 
@@ -411,7 +356,7 @@ static int zsend_interface_nbr_address(int cmd, struct zserv *client,
        /* Write packet size. */
        stream_putw_at(s, 0, stream_get_endp(s));
 
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /* Interface address addition. */
@@ -497,10 +442,7 @@ int zsend_interface_addresses(struct zserv *client, struct interface *ifp)
 int zsend_interface_vrf_update(struct zserv *client, struct interface *ifp,
                               vrf_id_t vrf_id)
 {
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, ZEBRA_INTERFACE_VRF_UPDATE, ifp->vrf_id);
 
@@ -512,7 +454,7 @@ int zsend_interface_vrf_update(struct zserv *client, struct interface *ifp,
        stream_putw_at(s, 0, stream_get_endp(s));
 
        client->if_vrfchg_cnt++;
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 /* Add new nbr connected IPv6 address */
@@ -574,10 +516,7 @@ void nbr_connected_delete_ipv6(struct interface *ifp, struct in6_addr *address)
  */
 int zsend_interface_update(int cmd, struct zserv *client, struct interface *ifp)
 {
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
 
        zclient_create_header(s, cmd, ifp->vrf_id);
        zserv_encode_interface(s, ifp);
@@ -587,7 +526,7 @@ int zsend_interface_update(int cmd, struct zserv *client, struct interface *ifp)
        else
                client->ifdown_cnt++;
 
-       return zebra_server_send_message(client);
+       return zebra_server_send_message(client, s);
 }
 
 int zsend_redistribute_route(int cmd, struct zserv *client, struct prefix *p,
@@ -616,7 +555,7 @@ int zsend_redistribute_route(int cmd, struct zserv *client, struct prefix *p,
                SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP);
                api.nexthop_num = re->nexthop_active_num;
        }
-       for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next) {
+       for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next) {
                if (!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
                        continue;
 
@@ -659,153 +598,305 @@ int zsend_redistribute_route(int cmd, struct zserv *client, struct prefix *p,
        SET_FLAG(api.message, ZAPI_MESSAGE_MTU);
        api.mtu = re->mtu;
 
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+
        /* Encode route and send. */
-       if (zapi_route_encode(cmd, client->obuf, &api) < 0)
+       if (zapi_route_encode(cmd, s, &api) < 0) {
+               stream_free(s);
                return -1;
-       return zebra_server_send_message(client);
-}
+       }
 
-static int zsend_write_nexthop(struct stream *s, struct nexthop *nexthop)
-{
-       stream_putc(s, nexthop->type);
-       switch (nexthop->type) {
-       case NEXTHOP_TYPE_IPV4:
-       case NEXTHOP_TYPE_IPV4_IFINDEX:
-               stream_put_in_addr(s, &nexthop->gate.ipv4);
-               stream_putl(s, nexthop->ifindex);
-               break;
-       case NEXTHOP_TYPE_IPV6:
-               stream_put(s, &nexthop->gate.ipv6, 16);
-               break;
-       case NEXTHOP_TYPE_IPV6_IFINDEX:
-               stream_put(s, &nexthop->gate.ipv6, 16);
-               stream_putl(s, nexthop->ifindex);
-               break;
-       case NEXTHOP_TYPE_IFINDEX:
-               stream_putl(s, nexthop->ifindex);
-               break;
-       default:
-               /* do nothing */
-               break;
+       if (IS_ZEBRA_DEBUG_SEND) {
+               char buf_prefix[PREFIX_STRLEN];
+               prefix2str(&api.prefix, buf_prefix, sizeof(buf_prefix));
+
+               zlog_debug("%s: %s to client %s: type %s, vrf_id %d, p %s",
+                          __func__, zserv_command_string(cmd),
+                          zebra_route_string(client->proto),
+                          zebra_route_string(api.type), api.vrf_id,
+                          buf_prefix);
        }
-       return 1;
+       return zebra_server_send_message(client, s);
 }
 
-/* Nexthop register */
-static int zserv_rnh_register(struct zserv *client, u_short length,
-                             rnh_type_t type, struct zebra_vrf *zvrf)
+/*
+ * Modified version of zsend_ipv4_nexthop_lookup(): Query unicast rib if
+ * nexthop is not found on mrib. Returns both route metric and protocol
+ * distance.
+ */
+static int zsend_ipv4_nexthop_lookup_mrib(struct zserv *client,
+                                         struct in_addr addr,
+                                         struct route_entry *re,
+                                         struct zebra_vrf *zvrf)
 {
-       struct rnh *rnh;
        struct stream *s;
-       struct prefix p;
-       u_short l = 0;
-       u_char flags = 0;
-
-       if (IS_ZEBRA_DEBUG_NHT)
-               zlog_debug(
-                       "rnh_register msg from client %s: length=%d, type=%s\n",
-                       zebra_route_string(client->proto), length,
-                       (type == RNH_NEXTHOP_TYPE) ? "nexthop" : "route");
+       unsigned long nump;
+       u_char num;
+       struct nexthop *nexthop;
 
-       s = client->ibuf;
+       /* Get output stream. */
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+       stream_reset(s);
 
-       client->nh_reg_time = monotime(NULL);
+       /* Fill in result. */
+       zclient_create_header(s, ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB, zvrf_id(zvrf));
+       stream_put_in_addr(s, &addr);
 
-       while (l < length) {
-               STREAM_GETC(s, flags);
-               STREAM_GETW(s, p.family);
-               STREAM_GETC(s, p.prefixlen);
-               l += 4;
-               if (p.family == AF_INET) {
-                       if (p.prefixlen > IPV4_MAX_BITLEN) {
-                               zlog_warn(
-                                       "%s: Specified prefix length %d is too large for a v4 address",
-                                       __PRETTY_FUNCTION__, p.prefixlen);
-                               return -1;
-                       }
-                       STREAM_GET(&p.u.prefix4.s_addr, s, IPV4_MAX_BYTELEN);
-                       l += IPV4_MAX_BYTELEN;
-               } else if (p.family == AF_INET6) {
-                       if (p.prefixlen > IPV6_MAX_BITLEN) {
-                               zlog_warn(
-                                       "%s: Specified prefix length %d is to large for a v6 address",
-                                       __PRETTY_FUNCTION__, p.prefixlen);
-                               return -1;
-                       }
-                       STREAM_GET(&p.u.prefix6, s, IPV6_MAX_BYTELEN);
-                       l += IPV6_MAX_BYTELEN;
-               } else {
-                       zlog_err(
-                               "rnh_register: Received unknown family type %d\n",
-                               p.family);
-                       return -1;
-               }
-               rnh = zebra_add_rnh(&p, zvrf_id(zvrf), type);
-               if (type == RNH_NEXTHOP_TYPE) {
-                       if (flags
-                           && !CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED))
-                               SET_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED);
-                       else if (!flags
-                                && CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED))
-                               UNSET_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED);
-               } else if (type == RNH_IMPORT_CHECK_TYPE) {
-                       if (flags
-                           && !CHECK_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH))
-                               SET_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH);
-                       else if (!flags && CHECK_FLAG(rnh->flags,
-                                                     ZEBRA_NHT_EXACT_MATCH))
-                               UNSET_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH);
-               }
+       if (re) {
+               stream_putc(s, re->distance);
+               stream_putl(s, re->metric);
+               num = 0;
+               nump = stream_get_endp(
+                       s);     /* remember position for nexthop_num */
+               stream_putc(s, 0); /* reserve room for nexthop_num */
+               /* Only non-recursive routes are elegible to resolve the nexthop
+                * we
+                * are looking up. Therefore, we will just iterate over the top
+                * chain of nexthops. */
+               for (nexthop = re->ng.nexthop; nexthop; nexthop = nexthop->next)
+                       if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
+                               num += zserv_encode_nexthop(s, nexthop);
 
-               zebra_add_rnh_client(rnh, client, type, zvrf_id(zvrf));
-               /* Anything not AF_INET/INET6 has been filtered out above */
-               zebra_evaluate_rnh(zvrf_id(zvrf), p.family, 1, type, &p);
+               stream_putc_at(s, nump, num); /* store nexthop_num */
+       } else {
+               stream_putc(s, 0); /* distance */
+               stream_putl(s, 0); /* metric */
+               stream_putc(s, 0); /* nexthop_num */
        }
 
-stream_failure:
-       return 0;
+       stream_putw_at(s, 0, stream_get_endp(s));
+
+       return zebra_server_send_message(client, s);
 }
 
-/* Nexthop register */
-static int zserv_rnh_unregister(struct zserv *client, u_short length,
-                               rnh_type_t type, struct zebra_vrf *zvrf)
+int zsend_route_notify_owner(struct route_entry *re, struct prefix *p,
+                            enum zapi_route_notify_owner note)
 {
-       struct rnh *rnh;
+       struct zserv *client;
        struct stream *s;
-       struct prefix p;
-       u_short l = 0;
+       uint8_t blen;
 
-       if (IS_ZEBRA_DEBUG_NHT)
-               zlog_debug("rnh_unregister msg from client %s: length=%d\n",
-                          zebra_route_string(client->proto), length);
+       client = zebra_find_client(re->type, re->instance);
+       if (!client || !client->notify_owner) {
+               if (IS_ZEBRA_DEBUG_PACKET) {
+                       char buff[PREFIX_STRLEN];
 
-       s = client->ibuf;
+                       zlog_debug(
+                               "Not Notifying Owner: %u about prefix %s(%u) %d vrf: %u",
+                               re->type, prefix2str(p, buff, sizeof(buff)),
+                               re->table, note, re->vrf_id);
+               }
+               return 0;
+       }
 
-       while (l < length) {
-               uint8_t flags;
+       if (IS_ZEBRA_DEBUG_PACKET) {
+               char buff[PREFIX_STRLEN];
 
-               STREAM_GETC(s, flags);
-               if (flags != 0)
-                       goto stream_failure;
+               zlog_debug("Notifying Owner: %u about prefix %s(%u) %d vrf: %u",
+                          re->type, prefix2str(p, buff, sizeof(buff)),
+                          re->table, note, re->vrf_id);
+       }
 
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+       stream_reset(s);
+
+       zclient_create_header(s, ZEBRA_ROUTE_NOTIFY_OWNER, re->vrf_id);
+
+       stream_put(s, &note, sizeof(note));
+
+       stream_putc(s, p->family);
+
+       blen = prefix_blen(p);
+       stream_putc(s, p->prefixlen);
+       stream_put(s, &p->u.prefix, blen);
+
+       stream_putl(s, re->table);
+
+       stream_putw_at(s, 0, stream_get_endp(s));
+
+       return zebra_server_send_message(client, s);
+}
+
+void zsend_rule_notify_owner(struct zebra_pbr_rule *rule,
+                            enum zapi_rule_notify_owner note)
+{
+       struct listnode *node;
+       struct zserv *client;
+       struct stream *s;
+
+       if (IS_ZEBRA_DEBUG_PACKET) {
+               zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__,
+                          rule->unique);
+       }
+
+       for (ALL_LIST_ELEMENTS_RO(zebrad.client_list, node, client)) {
+               if (rule->sock == client->sock)
+                       break;
+       }
+
+       if (!client)
+               return;
+
+       s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+       stream_reset(s);
+
+       zclient_create_header(s, ZEBRA_RULE_NOTIFY_OWNER, VRF_DEFAULT);
+       stream_put(s, &note, sizeof(note));
+       stream_putl(s, rule->seq);
+       stream_putl(s, rule->priority);
+       stream_putl(s, rule->unique);
+       if (rule->ifp)
+               stream_putl(s, rule->ifp->ifindex);
+       else
+               stream_putl(s, 0);
+
+       stream_putw_at(s, 0, stream_get_endp(s));
+
+       zebra_server_send_message(client, s);
+}
+
+/* Router-id is updated. Send ZEBRA_ROUTER_ID_ADD to client. */
+int zsend_router_id_update(struct zserv *client, struct prefix *p,
+                          vrf_id_t vrf_id)
+{
+       int blen;
+
+       /* Check this client need interface information. */
+       if (!vrf_bitmap_check(client->ridinfo, vrf_id))
+               return 0;
+
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+
+       /* Message type. */
+       zclient_create_header(s, ZEBRA_ROUTER_ID_UPDATE, vrf_id);
+
+       /* Prefix information. */
+       stream_putc(s, p->family);
+       blen = prefix_blen(p);
+       stream_put(s, &p->u.prefix, blen);
+       stream_putc(s, p->prefixlen);
+
+       /* Write packet size. */
+       stream_putw_at(s, 0, stream_get_endp(s));
+
+       return zebra_server_send_message(client, s);
+}
+
+/*
+ * Function used by Zebra to send a PW status update to LDP daemon
+ */
+int zsend_pw_update(struct zserv *client, struct zebra_pw *pw)
+{
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+
+       zclient_create_header(s, ZEBRA_PW_STATUS_UPDATE, pw->vrf_id);
+       stream_write(s, pw->ifname, IF_NAMESIZE);
+       stream_putl(s, pw->ifindex);
+       stream_putl(s, pw->status);
+
+       /* Put length at the first point of the stream. */
+       stream_putw_at(s, 0, stream_get_endp(s));
+
+       return zebra_server_send_message(client, s);
+}
+
+/* Send response to a get label chunk request to client */
+static int zsend_assign_label_chunk_response(struct zserv *client,
+                                            vrf_id_t vrf_id,
+                                            struct label_manager_chunk *lmc)
+{
+       int ret;
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+
+       zclient_create_header(s, ZEBRA_GET_LABEL_CHUNK, vrf_id);
+
+       if (lmc) {
+               /* keep */
+               stream_putc(s, lmc->keep);
+               /* start and end labels */
+               stream_putl(s, lmc->start);
+               stream_putl(s, lmc->end);
+       }
+
+       /* Write packet size. */
+       stream_putw_at(s, 0, stream_get_endp(s));
+
+       ret = writen(client->sock, s->data, stream_get_endp(s));
+       stream_free(s);
+       return ret;
+}
+
+/* Send response to a label manager connect request to client */
+static int zsend_label_manager_connect_response(struct zserv *client,
+                                               vrf_id_t vrf_id, u_short result)
+{
+       int ret;
+       struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
+
+       zclient_create_header(s, ZEBRA_LABEL_MANAGER_CONNECT, vrf_id);
+
+       /* result */
+       stream_putc(s, result);
+
+       /* Write packet size. */
+       stream_putw_at(s, 0, stream_get_endp(s));
+
+       ret = writen(client->sock, s->data, stream_get_endp(s));
+       stream_free(s);
+
+       return ret;
+}
+
+/* Inbound message handling ------------------------------------------------ */
+
+int cmd2type[] = {
+       [ZEBRA_NEXTHOP_REGISTER] = RNH_NEXTHOP_TYPE,
+       [ZEBRA_NEXTHOP_UNREGISTER] = RNH_NEXTHOP_TYPE,
+       [ZEBRA_IMPORT_ROUTE_REGISTER] = RNH_IMPORT_CHECK_TYPE,
+       [ZEBRA_IMPORT_ROUTE_UNREGISTER] = RNH_IMPORT_CHECK_TYPE,
+};
+
+/* Nexthop register */
+static void zread_rnh_register(ZAPI_HANDLER_ARGS)
+{
+       struct rnh *rnh;
+       struct stream *s;
+       struct prefix p;
+       u_short l = 0;
+       u_char flags = 0;
+       uint16_t type = cmd2type[hdr->command];
+
+       if (IS_ZEBRA_DEBUG_NHT)
+               zlog_debug(
+                       "rnh_register msg from client %s: hdr->length=%d, type=%s vrf=%u\n",
+                       zebra_route_string(client->proto), hdr->length,
+                       (type == RNH_NEXTHOP_TYPE) ? "nexthop" : "route",
+                       zvrf->vrf->vrf_id);
+
+       s = msg;
+
+       client->nh_reg_time = monotime(NULL);
+
+       while (l < hdr->length) {
+               STREAM_GETC(s, flags);
                STREAM_GETW(s, p.family);
                STREAM_GETC(s, p.prefixlen);
                l += 4;
                if (p.family == AF_INET) {
                        if (p.prefixlen > IPV4_MAX_BITLEN) {
                                zlog_warn(
-                                       "%s: Specified prefix length %d is to large for a v4 address",
+                                       "%s: Specified prefix hdr->length %d is too large for a v4 address",
                                        __PRETTY_FUNCTION__, p.prefixlen);
-                               return -1;
+                               return;
                        }
                        STREAM_GET(&p.u.prefix4.s_addr, s, IPV4_MAX_BYTELEN);
                        l += IPV4_MAX_BYTELEN;
                } else if (p.family == AF_INET6) {
                        if (p.prefixlen > IPV6_MAX_BITLEN) {
                                zlog_warn(
-                                       "%s: Specified prefix length %d is to large for a v6 address",
+                                       "%s: Specified prefix hdr->length %d is to large for a v6 address",
                                        __PRETTY_FUNCTION__, p.prefixlen);
-                               return -1;
+                               return;
                        }
                        STREAM_GET(&p.u.prefix6, s, IPV6_MAX_BYTELEN);
                        l += IPV6_MAX_BYTELEN;
@@ -813,7 +904,85 @@ static int zserv_rnh_unregister(struct zserv *client, u_short length,
                        zlog_err(
                                "rnh_register: Received unknown family type %d\n",
                                p.family);
-                       return -1;
+                       return;
+               }
+               rnh = zebra_add_rnh(&p, zvrf_id(zvrf), type);
+               if (type == RNH_NEXTHOP_TYPE) {
+                       if (flags
+                           && !CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED))
+                               SET_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED);
+                       else if (!flags
+                                && CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED))
+                               UNSET_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED);
+               } else if (type == RNH_IMPORT_CHECK_TYPE) {
+                       if (flags
+                           && !CHECK_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH))
+                               SET_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH);
+                       else if (!flags
+                                && CHECK_FLAG(rnh->flags,
+                                              ZEBRA_NHT_EXACT_MATCH))
+                               UNSET_FLAG(rnh->flags, ZEBRA_NHT_EXACT_MATCH);
+               }
+
+               zebra_add_rnh_client(rnh, client, type, zvrf_id(zvrf));
+               /* Anything not AF_INET/INET6 has been filtered out above */
+               zebra_evaluate_rnh(zvrf_id(zvrf), p.family, 1, type, &p);
+       }
+
+stream_failure:
+       return;
+}
+
+/* Nexthop register */
+static void zread_rnh_unregister(ZAPI_HANDLER_ARGS)
+{
+       struct rnh *rnh;
+       struct stream *s;
+       struct prefix p;
+       u_short l = 0;
+       uint16_t type = cmd2type[hdr->command];
+
+       if (IS_ZEBRA_DEBUG_NHT)
+               zlog_debug(
+                       "rnh_unregister msg from client %s: hdr->length=%d vrf: %u\n",
+                       zebra_route_string(client->proto), hdr->length,
+                       zvrf->vrf->vrf_id);
+
+       s = msg;
+
+       while (l < hdr->length) {
+               uint8_t flags;
+
+               STREAM_GETC(s, flags);
+               if (flags != 0)
+                       goto stream_failure;
+
+               STREAM_GETW(s, p.family);
+               STREAM_GETC(s, p.prefixlen);
+               l += 4;
+               if (p.family == AF_INET) {
+                       if (p.prefixlen > IPV4_MAX_BITLEN) {
+                               zlog_warn(
+                                       "%s: Specified prefix hdr->length %d is to large for a v4 address",
+                                       __PRETTY_FUNCTION__, p.prefixlen);
+                               return;
+                       }
+                       STREAM_GET(&p.u.prefix4.s_addr, s, IPV4_MAX_BYTELEN);
+                       l += IPV4_MAX_BYTELEN;
+               } else if (p.family == AF_INET6) {
+                       if (p.prefixlen > IPV6_MAX_BITLEN) {
+                               zlog_warn(
+                                       "%s: Specified prefix hdr->length %d is to large for a v6 address",
+                                       __PRETTY_FUNCTION__, p.prefixlen);
+                               return;
+                       }
+                       STREAM_GET(&p.u.prefix6, s, IPV6_MAX_BYTELEN);
+                       l += IPV6_MAX_BYTELEN;
+               } else {
+                       zlog_err(
+                               "rnh_register: Received unknown family type %d\n",
+                               p.family);
+                       return;
                }
                rnh = zebra_lookup_rnh(&p, zvrf_id(zvrf), type);
                if (rnh) {
@@ -822,38 +991,37 @@ static int zserv_rnh_unregister(struct zserv *client, u_short length,
                }
        }
 stream_failure:
-       return 0;
+       return;
 }
 
 #define ZEBRA_MIN_FEC_LENGTH 5
 
 /* FEC register */
-static int zserv_fec_register(struct zserv *client, u_short length)
+static void zread_fec_register(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
-       struct zebra_vrf *zvrf;
        u_short l = 0;
        struct prefix p;
-       u_int16_t flags;
-       u_int32_t label_index = MPLS_INVALID_LABEL_INDEX;
+       uint16_t flags;
+       uint32_t label_index = MPLS_INVALID_LABEL_INDEX;
 
-       s = client->ibuf;
+       s = msg;
        zvrf = vrf_info_lookup(VRF_DEFAULT);
        if (!zvrf)
-               return 0; // unexpected
+               return; // unexpected
 
        /*
         * The minimum amount of data that can be sent for one fec
         * registration
         */
-       if (length < ZEBRA_MIN_FEC_LENGTH) {
+       if (hdr->length < ZEBRA_MIN_FEC_LENGTH) {
                zlog_err(
-                       "fec_register: Received a fec register of length %d, it is of insufficient size to properly decode",
-                       length);
-               return -1;
+                       "fec_register: Received a fec register of hdr->length %d, it is of insufficient size to properly decode",
+                       hdr->length);
+               return;
        }
 
-       while (l < length) {
+       while (l < hdr->length) {
                STREAM_GETW(s, flags);
                memset(&p, 0, sizeof(p));
                STREAM_GETW(s, p.family);
@@ -861,16 +1029,16 @@ static int zserv_fec_register(struct zserv *client, u_short length)
                        zlog_err(
                                "fec_register: Received unknown family type %d\n",
                                p.family);
-                       return -1;
+                       return;
                }
                STREAM_GETC(s, p.prefixlen);
                if ((p.family == AF_INET && p.prefixlen > IPV4_MAX_BITLEN)
                    || (p.family == AF_INET6
                        && p.prefixlen > IPV6_MAX_BITLEN)) {
                        zlog_warn(
-                               "%s: Specified prefix length: %d is to long for %d",
+                               "%s: Specified prefix hdr->length: %d is to long for %d",
                                __PRETTY_FUNCTION__, p.prefixlen, p.family);
-                       return -1;
+                       return;
                }
                l += 5;
                STREAM_GET(&p.u.prefix, s, PSIZE(p.prefixlen));
@@ -884,35 +1052,34 @@ static int zserv_fec_register(struct zserv *client, u_short length)
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /* FEC unregister */
-static int zserv_fec_unregister(struct zserv *client, u_short length)
+static void zread_fec_unregister(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
-       struct zebra_vrf *zvrf;
        u_short l = 0;
        struct prefix p;
        uint16_t flags;
 
-       s = client->ibuf;
+       s = msg;
        zvrf = vrf_info_lookup(VRF_DEFAULT);
        if (!zvrf)
-               return 0; // unexpected
+               return; // unexpected
 
        /*
         * The minimum amount of data that can be sent for one
         * fec unregistration
         */
-       if (length < ZEBRA_MIN_FEC_LENGTH) {
+       if (hdr->length < ZEBRA_MIN_FEC_LENGTH) {
                zlog_err(
-                       "fec_unregister: Received a fec unregister of length %d, it is of insufficient size to properly decode",
-                       length);
-               return -1;
+                       "fec_unregister: Received a fec unregister of hdr->length %d, it is of insufficient size to properly decode",
+                       hdr->length);
+               return;
        }
 
-       while (l < length) {
+       while (l < hdr->length) {
                STREAM_GETW(s, flags);
                if (flags != 0)
                        goto stream_failure;
@@ -923,16 +1090,16 @@ static int zserv_fec_unregister(struct zserv *client, u_short length)
                        zlog_err(
                                "fec_unregister: Received unknown family type %d\n",
                                p.family);
-                       return -1;
+                       return;
                }
                STREAM_GETC(s, p.prefixlen);
                if ((p.family == AF_INET && p.prefixlen > IPV4_MAX_BITLEN)
                    || (p.family == AF_INET6
                        && p.prefixlen > IPV6_MAX_BITLEN)) {
                        zlog_warn(
-                               "%s: Received prefix length %d which is greater than %d can support",
+                               "%s: Received prefix hdr->length %d which is greater than %d can support",
                                __PRETTY_FUNCTION__, p.prefixlen, p.family);
-                       return -1;
+                       return;
                }
                l += 5;
                STREAM_GET(&p.u.prefix, s, PSIZE(p.prefixlen));
@@ -941,161 +1108,15 @@ static int zserv_fec_unregister(struct zserv *client, u_short length)
        }
 
 stream_failure:
-       return 0;
-}
-
-/*
-  Modified version of zsend_ipv4_nexthop_lookup():
-  Query unicast rib if nexthop is not found on mrib.
-  Returns both route metric and protocol distance.
-*/
-static int zsend_ipv4_nexthop_lookup_mrib(struct zserv *client,
-                                         struct in_addr addr,
-                                         struct route_entry *re,
-                                         struct zebra_vrf *zvrf)
-{
-       struct stream *s;
-       unsigned long nump;
-       u_char num;
-       struct nexthop *nexthop;
-
-       /* Get output stream. */
-       s = client->obuf;
-       stream_reset(s);
-
-       /* Fill in result. */
-       zclient_create_header(s, ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB, zvrf_id(zvrf));
-       stream_put_in_addr(s, &addr);
-
-       if (re) {
-               stream_putc(s, re->distance);
-               stream_putl(s, re->metric);
-               num = 0;
-               nump = stream_get_endp(
-                       s);     /* remember position for nexthop_num */
-               stream_putc(s, 0); /* reserve room for nexthop_num */
-               /* Only non-recursive routes are elegible to resolve the nexthop
-                * we
-                * are looking up. Therefore, we will just iterate over the top
-                * chain of nexthops. */
-               for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
-                       if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
-                               num += zsend_write_nexthop(s, nexthop);
-
-               stream_putc_at(s, nump, num); /* store nexthop_num */
-       } else {
-               stream_putc(s, 0); /* distance */
-               stream_putl(s, 0); /* metric */
-               stream_putc(s, 0); /* nexthop_num */
-       }
-
-       stream_putw_at(s, 0, stream_get_endp(s));
-
-       return zebra_server_send_message(client);
-}
-
-int zsend_route_notify_owner(struct route_entry *re, struct prefix *p,
-                            enum zapi_route_notify_owner note)
-{
-       struct zserv *client;
-       struct stream *s;
-       uint8_t blen;
-
-       client = zebra_find_client(re->type, re->instance);
-       if (!client || !client->notify_owner) {
-               if (IS_ZEBRA_DEBUG_PACKET) {
-                       char buff[PREFIX_STRLEN];
-
-                       zlog_debug(
-                               "Not Notifying Owner: %u about prefix %s(%u) %d",
-                               re->type, prefix2str(p, buff, sizeof(buff)),
-                               re->table, note);
-               }
-               return 0;
-       }
-
-       if (IS_ZEBRA_DEBUG_PACKET) {
-               char buff[PREFIX_STRLEN];
-
-               zlog_debug("Notifying Owner: %u about prefix %s(%u) %d",
-                          re->type, prefix2str(p, buff, sizeof(buff)),
-                          re->table, note);
-       }
-
-       s = client->obuf;
-       stream_reset(s);
-
-       zclient_create_header(s, ZEBRA_ROUTE_NOTIFY_OWNER, re->vrf_id);
-
-       stream_put(s, &note, sizeof(note));
-
-       stream_putc(s, p->family);
-
-       blen = prefix_blen(p);
-       stream_putc(s, p->prefixlen);
-       stream_put(s, &p->u.prefix, blen);
-
-       stream_putl(s, re->table);
-
-       stream_putw_at(s, 0, stream_get_endp(s));
-
-       return zebra_server_send_message(client);
+       return;
 }
 
-/* Router-id is updated. Send ZEBRA_ROUTER_ID_ADD to client. */
-int zsend_router_id_update(struct zserv *client, struct prefix *p,
-                          vrf_id_t vrf_id)
-{
-       struct stream *s;
-       int blen;
-
-       /* Check this client need interface information. */
-       if (!vrf_bitmap_check(client->ridinfo, vrf_id))
-               return 0;
-
-       s = client->obuf;
-       stream_reset(s);
-
-       /* Message type. */
-       zclient_create_header(s, ZEBRA_ROUTER_ID_UPDATE, vrf_id);
-
-       /* Prefix information. */
-       stream_putc(s, p->family);
-       blen = prefix_blen(p);
-       stream_put(s, &p->u.prefix, blen);
-       stream_putc(s, p->prefixlen);
-
-       /* Write packet size. */
-       stream_putw_at(s, 0, stream_get_endp(s));
-
-       return zebra_server_send_message(client);
-}
 
 /*
- * Function used by Zebra to send a PW status update to LDP daemon
+ * Register zebra server interface information.
+ * Send current all interface and address information.
  */
-int zsend_pw_update(struct zserv *client, struct zebra_pw *pw)
-{
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
-
-       zclient_create_header(s, ZEBRA_PW_STATUS_UPDATE, pw->vrf_id);
-       stream_write(s, pw->ifname, IF_NAMESIZE);
-       stream_putl(s, pw->ifindex);
-       stream_putl(s, pw->status);
-
-       /* Put length at the first point of the stream. */
-       stream_putw_at(s, 0, stream_get_endp(s));
-
-       return zebra_server_send_message(client);
-}
-
-/* Register zebra server interface information.  Send current all
-   interface and address information. */
-static int zread_interface_add(struct zserv *client, u_short length,
-                              struct zebra_vrf *zvrf)
+static void zread_interface_add(ZAPI_HANDLER_ARGS)
 {
        struct vrf *vrf;
        struct interface *ifp;
@@ -1109,22 +1130,16 @@ static int zread_interface_add(struct zserv *client, u_short length,
                        if (!CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE))
                                continue;
 
-                       if (zsend_interface_add(client, ifp) < 0)
-                               return -1;
-
-                       if (zsend_interface_addresses(client, ifp) < 0)
-                               return -1;
+                       zsend_interface_add(client, ifp);
+                       zsend_interface_addresses(client, ifp);
                }
        }
-       return 0;
 }
 
 /* Unregister zebra server interface information. */
-static int zread_interface_delete(struct zserv *client, u_short length,
-                                 struct zebra_vrf *zvrf)
+static void zread_interface_delete(ZAPI_HANDLER_ARGS)
 {
        vrf_bitmap_unset(client->ifinfo, zvrf_id(zvrf));
-       return 0;
 }
 
 void zserv_nexthop_num_warn(const char *caller, const struct prefix *p,
@@ -1139,8 +1154,7 @@ void zserv_nexthop_num_warn(const char *caller, const struct prefix *p,
        }
 }
 
-static int zread_route_add(struct zserv *client, u_short length,
-                          struct zebra_vrf *zvrf)
+static void zread_route_add(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        struct zapi_route api;
@@ -1151,10 +1165,20 @@ static int zread_route_add(struct zserv *client, u_short length,
        struct nexthop *nexthop = NULL;
        int i, ret;
        vrf_id_t vrf_id = 0;
+       struct ipaddr vtep_ip;
 
-       s = client->ibuf;
-       if (zapi_route_decode(s, &api) < 0)
-               return -1;
+       s = msg;
+       zapi_route_decode(s, &api);
+
+       if (IS_ZEBRA_DEBUG_RECV) {
+               char buf_prefix[PREFIX_STRLEN];
+               prefix2str(&api.prefix, buf_prefix, sizeof(buf_prefix));
+               zlog_debug("%s: p=%s, ZAPI_MESSAGE_LABEL: %sset, flags=0x%x",
+                          __func__, buf_prefix,
+                          (CHECK_FLAG(api.message, ZAPI_MESSAGE_LABEL) ? ""
+                                                                       : "un"),
+                          api.flags);
+       }
 
        /* Allocate new route. */
        vrf_id = zvrf_id(zvrf);
@@ -1164,26 +1188,44 @@ static int zread_route_add(struct zserv *client, u_short length,
        re->flags = api.flags;
        re->uptime = time(NULL);
        re->vrf_id = vrf_id;
-       re->table = zvrf->table_id;
+       if (api.tableid && vrf_id == VRF_DEFAULT)
+               re->table = api.tableid;
+       else
+               re->table = zvrf->table_id;
 
+       /*
+        * TBD should _all_ of the nexthop add operations use
+        * api_nh->vrf_id instead of re->vrf_id ? I only changed
+        * for cases NEXTHOP_TYPE_IPV4 and NEXTHOP_TYPE_IPV6.
+        */
        if (CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP)) {
                for (i = 0; i < api.nexthop_num; i++) {
                        api_nh = &api.nexthops[i];
                        ifindex_t ifindex = 0;
 
+                       if (IS_ZEBRA_DEBUG_RECV) {
+                               zlog_debug("nh type %d", api_nh->type);
+                       }
+
                        switch (api_nh->type) {
                        case NEXTHOP_TYPE_IFINDEX:
                                nexthop = route_entry_nexthop_ifindex_add(
                                        re, api_nh->ifindex, api_nh->vrf_id);
                                break;
                        case NEXTHOP_TYPE_IPV4:
+                               if (IS_ZEBRA_DEBUG_RECV) {
+                                       char nhbuf[INET6_ADDRSTRLEN] = {0};
+                                       inet_ntop(AF_INET, &api_nh->gate.ipv4,
+                                                 nhbuf, INET6_ADDRSTRLEN);
+                                       zlog_debug("%s: nh=%s, vrf_id=%d",
+                                                  __func__, nhbuf,
+                                                  api_nh->vrf_id);
+                               }
                                nexthop = route_entry_nexthop_ipv4_add(
                                        re, &api_nh->gate.ipv4, NULL,
                                        api_nh->vrf_id);
                                break;
-                       case NEXTHOP_TYPE_IPV4_IFINDEX: {
-
-                               struct ipaddr vtep_ip;
+                       case NEXTHOP_TYPE_IPV4_IFINDEX:
 
                                memset(&vtep_ip, 0, sizeof(struct ipaddr));
                                if (CHECK_FLAG(api.flags,
@@ -1193,12 +1235,21 @@ static int zread_route_add(struct zserv *client, u_short length,
                                        ifindex = api_nh->ifindex;
                                }
 
+                               if (IS_ZEBRA_DEBUG_RECV) {
+                                       char nhbuf[INET6_ADDRSTRLEN] = {0};
+                                       inet_ntop(AF_INET, &api_nh->gate.ipv4,
+                                                 nhbuf, INET6_ADDRSTRLEN);
+                                       zlog_debug(
+                                               "%s: nh=%s, vrf_id=%d (re->vrf_id=%d), ifindex=%d",
+                                               __func__, nhbuf, api_nh->vrf_id,
+                                               re->vrf_id, ifindex);
+                               }
                                nexthop = route_entry_nexthop_ipv4_ifindex_add(
                                        re, &api_nh->gate.ipv4, NULL, ifindex,
                                        api_nh->vrf_id);
 
                                /* if this an EVPN route entry,
-                                  program the nh as neigh
+                                * program the nh as neigh
                                 */
                                if (CHECK_FLAG(api.flags,
                                               ZEBRA_FLAG_EVPN_ROUTE)) {
@@ -1213,15 +1264,41 @@ static int zread_route_add(struct zserv *client, u_short length,
                                                &api.prefix);
                                }
                                break;
-                       }
                        case NEXTHOP_TYPE_IPV6:
                                nexthop = route_entry_nexthop_ipv6_add(
                                        re, &api_nh->gate.ipv6, api_nh->vrf_id);
                                break;
                        case NEXTHOP_TYPE_IPV6_IFINDEX:
+                               memset(&vtep_ip, 0, sizeof(struct ipaddr));
+                               if (CHECK_FLAG(api.flags,
+                                              ZEBRA_FLAG_EVPN_ROUTE)) {
+                                       ifindex =
+                                               get_l3vni_svi_ifindex(vrf_id);
+                               } else {
+                                       ifindex = api_nh->ifindex;
+                               }
+
                                nexthop = route_entry_nexthop_ipv6_ifindex_add(
-                                       re, &api_nh->gate.ipv6, api_nh->ifindex,
+                                       re, &api_nh->gate.ipv6, ifindex,
                                        api_nh->vrf_id);
+
+                               /* if this an EVPN route entry,
+                                * program the nh as neigh
+                                */
+                               if (CHECK_FLAG(api.flags,
+                                              ZEBRA_FLAG_EVPN_ROUTE)) {
+                                       SET_FLAG(nexthop->flags,
+                                                NEXTHOP_FLAG_EVPN_RVTEP);
+                                       vtep_ip.ipa_type = IPADDR_V6;
+                                       memcpy(&vtep_ip.ipaddr_v6,
+                                              &(api_nh->gate.ipv6),
+                                              sizeof(struct in6_addr));
+                                       zebra_vxlan_evpn_vrf_route_add(
+                                                               vrf_id,
+                                                               &api.rmac,
+                                                               &vtep_ip,
+                                                               &api.prefix);
+                               }
                                break;
                        case NEXTHOP_TYPE_BLACKHOLE:
                                nexthop = route_entry_nexthop_blackhole_add(
@@ -1233,9 +1310,9 @@ static int zread_route_add(struct zserv *client, u_short length,
                                zlog_warn(
                                        "%s: Nexthops Specified: %d but we failed to properly create one",
                                        __PRETTY_FUNCTION__, api.nexthop_num);
-                               nexthops_free(re->nexthop);
+                               nexthops_free(re->ng.nexthop);
                                XFREE(MTYPE_RE, re);
-                               return -1;
+                               return;
                        }
                        /* MPLS labels for BGP-LU or Segment Routing */
                        if (CHECK_FLAG(api.message, ZAPI_MESSAGE_LABEL)
@@ -1245,6 +1322,14 @@ static int zread_route_add(struct zserv *client, u_short length,
 
                                label_type =
                                        lsp_type_from_re_type(client->proto);
+
+                               if (IS_ZEBRA_DEBUG_RECV) {
+                                       zlog_debug(
+                                               "%s: adding %d labels of type %d (1st=%u)",
+                                               __func__, api_nh->label_num,
+                                               label_type, api_nh->labels[0]);
+                               }
+
                                nexthop_add_labels(nexthop, label_type,
                                                   api_nh->label_num,
                                                   &api_nh->labels[0]);
@@ -1265,9 +1350,9 @@ static int zread_route_add(struct zserv *client, u_short length,
        if (afi != AFI_IP6 && CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX)) {
                zlog_warn("%s: Received SRC Prefix but afi is not v6",
                          __PRETTY_FUNCTION__);
-               nexthops_free(re->nexthop);
+               nexthops_free(re->ng.nexthop);
                XFREE(MTYPE_RE, re);
-               return -1;
+               return;
        }
        if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX))
                src_p = &api.src_prefix;
@@ -1289,27 +1374,24 @@ static int zread_route_add(struct zserv *client, u_short length,
                        client->v6_route_upd8_cnt++;
                break;
        }
-
-       return 0;
 }
 
-static int zread_route_del(struct zserv *client, u_short length,
-                          struct zebra_vrf *zvrf)
+static void zread_route_del(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        struct zapi_route api;
        afi_t afi;
        struct prefix_ipv6 *src_p = NULL;
 
-       s = client->ibuf;
+       s = msg;
        if (zapi_route_decode(s, &api) < 0)
-               return -1;
+               return;
 
        afi = family2afi(api.prefix.family);
        if (afi != AFI_IP6 && CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX)) {
                zlog_warn("%s: Received a src prefix while afi is not v6",
                          __PRETTY_FUNCTION__);
-               return -1;
+               return;
        }
        if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX))
                src_p = &api.src_prefix;
@@ -1327,8 +1409,6 @@ static int zread_route_del(struct zserv *client, u_short length,
                client->v6_route_del_cnt++;
                break;
        }
-
-       return 0;
 }
 
 /* This function support multiple nexthop. */
@@ -1336,8 +1416,7 @@ static int zread_route_del(struct zserv *client, u_short length,
  * Parse the ZEBRA_IPV4_ROUTE_ADD sent from client. Update re and
  * add kernel route.
  */
-static int zread_ipv4_add(struct zserv *client, u_short length,
-                         struct zebra_vrf *zvrf)
+static void zread_ipv4_add(ZAPI_HANDLER_ARGS)
 {
        int i;
        struct route_entry *re;
@@ -1356,7 +1435,7 @@ static int zread_ipv4_add(struct zserv *client, u_short length,
        enum blackhole_type bh_type = BLACKHOLE_NULL;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        /* Allocate new re. */
        re = XCALLOC(MTYPE_RE, sizeof(struct route_entry));
@@ -1367,7 +1446,7 @@ static int zread_ipv4_add(struct zserv *client, u_short length,
                zlog_warn("%s: Specified route type %d is not a legal value\n",
                          __PRETTY_FUNCTION__, re->type);
                XFREE(MTYPE_RE, re);
-               return -1;
+               return;
        }
        STREAM_GETW(s, re->instance);
        STREAM_GETL(s, re->flags);
@@ -1384,7 +1463,7 @@ static int zread_ipv4_add(struct zserv *client, u_short length,
                        "%s: Specified prefix length %d is greater than what v4 can be",
                        __PRETTY_FUNCTION__, p.prefixlen);
                XFREE(MTYPE_RE, re);
-               return -1;
+               return;
        }
        STREAM_GET(&p.u.prefix4, s, PSIZE(p.prefixlen));
 
@@ -1434,9 +1513,9 @@ static int zread_ipv4_add(struct zserv *client, u_short length,
                                zlog_warn(
                                        "%s: Please use ZEBRA_ROUTE_ADD if you want to pass v6 nexthops",
                                        __PRETTY_FUNCTION__);
-                               nexthops_free(re->nexthop);
+                               nexthops_free(re->ng.nexthop);
                                XFREE(MTYPE_RE, re);
-                               return -1;
+                               return;
                                break;
                        case NEXTHOP_TYPE_BLACKHOLE:
                                route_entry_nexthop_blackhole_add(re, bh_type);
@@ -1445,9 +1524,9 @@ static int zread_ipv4_add(struct zserv *client, u_short length,
                                zlog_warn(
                                        "%s: Specified nexthop type: %d does not exist",
                                        __PRETTY_FUNCTION__, nexthop_type);
-                               nexthops_free(re->nexthop);
+                               nexthops_free(re->ng.nexthop);
                                XFREE(MTYPE_RE, re);
-                               return -1;
+                               return;
                        }
                }
        }
@@ -1482,24 +1561,22 @@ static int zread_ipv4_add(struct zserv *client, u_short length,
        else if (ret < 0)
                client->v4_route_upd8_cnt++;
 
-       return 0;
+       return;
 
 stream_failure:
-       nexthops_free(re->nexthop);
+       nexthops_free(re->ng.nexthop);
        XFREE(MTYPE_RE, re);
-       return -1;
 }
 
 /* Zebra server IPv4 prefix delete function. */
-static int zread_ipv4_delete(struct zserv *client, u_short length,
-                            struct zebra_vrf *zvrf)
+static void zread_ipv4_delete(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        struct zapi_ipv4 api;
        struct prefix p;
        u_int32_t table_id;
 
-       s = client->ibuf;
+       s = msg;
 
        /* Type, flags, message. */
        STREAM_GETC(s, api.type);
@@ -1515,7 +1592,7 @@ static int zread_ipv4_delete(struct zserv *client, u_short length,
        if (p.prefixlen > IPV4_MAX_BITLEN) {
                zlog_warn("%s: Passed in prefixlen %d is impossible",
                          __PRETTY_FUNCTION__, p.prefixlen);
-               return -1;
+               return;
        }
        STREAM_GET(&p.u.prefix4, s, PSIZE(p.prefixlen));
 
@@ -1526,28 +1603,25 @@ static int zread_ipv4_delete(struct zserv *client, u_short length,
        client->v4_route_del_cnt++;
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /* MRIB Nexthop lookup for IPv4. */
-static int zread_ipv4_nexthop_lookup_mrib(struct zserv *client, u_short length,
-                                         struct zebra_vrf *zvrf)
+static void zread_ipv4_nexthop_lookup_mrib(ZAPI_HANDLER_ARGS)
 {
        struct in_addr addr;
        struct route_entry *re;
 
-       STREAM_GET(&addr.s_addr, client->ibuf, IPV4_MAX_BYTELEN);
+       STREAM_GET(&addr.s_addr, msg, IPV4_MAX_BYTELEN);
        re = rib_match_ipv4_multicast(zvrf_id(zvrf), addr, NULL);
-       return zsend_ipv4_nexthop_lookup_mrib(client, addr, re, zvrf);
+       zsend_ipv4_nexthop_lookup_mrib(client, addr, re, zvrf);
 
 stream_failure:
-       return -1;
+       return;
 }
 
 /* Zebra server IPv6 prefix add function. */
-static int zread_ipv4_route_ipv6_nexthop_add(struct zserv *client,
-                                            u_short length,
-                                            struct zebra_vrf *zvrf)
+static void zread_ipv4_route_ipv6_nexthop_add(ZAPI_HANDLER_ARGS)
 {
        unsigned int i;
        struct stream *s;
@@ -1568,7 +1642,7 @@ static int zread_ipv4_route_ipv6_nexthop_add(struct zserv *client,
        enum blackhole_type bh_type = BLACKHOLE_NULL;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        memset(&nhop_addr, 0, sizeof(struct in6_addr));
 
@@ -1581,7 +1655,7 @@ static int zread_ipv4_route_ipv6_nexthop_add(struct zserv *client,
                zlog_warn("%s: Specified route type: %d is not a legal value\n",
                          __PRETTY_FUNCTION__, re->type);
                XFREE(MTYPE_RE, re);
-               return -1;
+               return;
        }
        STREAM_GETW(s, re->instance);
        STREAM_GETL(s, re->flags);
@@ -1598,7 +1672,7 @@ static int zread_ipv4_route_ipv6_nexthop_add(struct zserv *client,
                        "%s: Prefix Length %d is greater than what a v4 address can use",
                        __PRETTY_FUNCTION__, p.prefixlen);
                XFREE(MTYPE_RE, re);
-               return -1;
+               return;
        }
        STREAM_GET(&p.u.prefix4, s, PSIZE(p.prefixlen));
 
@@ -1651,9 +1725,9 @@ static int zread_ipv4_route_ipv6_nexthop_add(struct zserv *client,
                                zlog_warn(
                                        "%s: Please use ZEBRA_ROUTE_ADD if you want to pass non v6 nexthops",
                                        __PRETTY_FUNCTION__);
-                               nexthops_free(re->nexthop);
+                               nexthops_free(re->ng.nexthop);
                                XFREE(MTYPE_RE, re);
-                               return -1;
+                               return;
                        }
                }
 
@@ -1711,16 +1785,14 @@ static int zread_ipv4_route_ipv6_nexthop_add(struct zserv *client,
        else if (ret < 0)
                client->v4_route_upd8_cnt++;
 
-       return 0;
+       return;
 
 stream_failure:
-       nexthops_free(re->nexthop);
+       nexthops_free(re->ng.nexthop);
        XFREE(MTYPE_RE, re);
-       return -1;
 }
 
-static int zread_ipv6_add(struct zserv *client, u_short length,
-                         struct zebra_vrf *zvrf)
+static void zread_ipv6_add(ZAPI_HANDLER_ARGS)
 {
        unsigned int i;
        struct stream *s;
@@ -1743,7 +1815,7 @@ static int zread_ipv6_add(struct zserv *client, u_short length,
        enum blackhole_type bh_type = BLACKHOLE_NULL;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        memset(&nhop_addr, 0, sizeof(struct in6_addr));
 
@@ -1756,7 +1828,7 @@ static int zread_ipv6_add(struct zserv *client, u_short length,
                zlog_warn("%s: Specified route type: %d is not a legal value\n",
                          __PRETTY_FUNCTION__, re->type);
                XFREE(MTYPE_RE, re);
-               return -1;
+               return;
        }
        STREAM_GETW(s, re->instance);
        STREAM_GETL(s, re->flags);
@@ -1773,7 +1845,7 @@ static int zread_ipv6_add(struct zserv *client, u_short length,
                        "%s: Specified prefix length %d is to large for v6 prefix",
                        __PRETTY_FUNCTION__, p.prefixlen);
                XFREE(MTYPE_RE, re);
-               return -1;
+               return;
        }
        STREAM_GET(&p.u.prefix6, s, PSIZE(p.prefixlen));
 
@@ -1786,7 +1858,7 @@ static int zread_ipv6_add(struct zserv *client, u_short length,
                                "%s: Specified src prefix length %d is to large for v6 prefix",
                                __PRETTY_FUNCTION__, src_p.prefixlen);
                        XFREE(MTYPE_RE, re);
-                       return -1;
+                       return;
                }
                STREAM_GET(&src_p.prefix, s, PSIZE(src_p.prefixlen));
                src_pp = &src_p;
@@ -1847,9 +1919,9 @@ static int zread_ipv6_add(struct zserv *client, u_short length,
                                zlog_warn(
                                        "%s: Please use ZEBRA_ROUTE_ADD if you want to pass non v6 nexthops",
                                        __PRETTY_FUNCTION__);
-                               nexthops_free(re->nexthop);
+                               nexthops_free(re->ng.nexthop);
                                XFREE(MTYPE_RE, re);
-                               return -1;
+                               return;
                        }
                }
 
@@ -1905,25 +1977,22 @@ static int zread_ipv6_add(struct zserv *client, u_short length,
        else if (ret < 0)
                client->v6_route_upd8_cnt++;
 
-       return 0;
+       return;
 
 stream_failure:
-       nexthops_free(re->nexthop);
+       nexthops_free(re->ng.nexthop);
        XFREE(MTYPE_RE, re);
-
-       return -1;
 }
 
 /* Zebra server IPv6 prefix delete function. */
-static int zread_ipv6_delete(struct zserv *client, u_short length,
-                            struct zebra_vrf *zvrf)
+static void zread_ipv6_delete(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        struct zapi_ipv6 api;
        struct prefix p;
        struct prefix_ipv6 src_p, *src_pp;
 
-       s = client->ibuf;
+       s = msg;
 
        /* Type, flags, message. */
        STREAM_GETC(s, api.type);
@@ -1954,12 +2023,11 @@ static int zread_ipv6_delete(struct zserv *client, u_short length,
        client->v6_route_del_cnt++;
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /* Register zebra server router-id information.  Send current router-id */
-static int zread_router_id_add(struct zserv *client, u_short length,
-                              struct zebra_vrf *zvrf)
+static void zread_router_id_add(ZAPI_HANDLER_ARGS)
 {
        struct prefix p;
 
@@ -1968,36 +2036,35 @@ static int zread_router_id_add(struct zserv *client, u_short length,
 
        router_id_get(&p, zvrf_id(zvrf));
 
-       return zsend_router_id_update(client, &p, zvrf_id(zvrf));
+       zsend_router_id_update(client, &p, zvrf_id(zvrf));
 }
 
 /* Unregister zebra server router-id information. */
-static int zread_router_id_delete(struct zserv *client, u_short length,
-                                 struct zebra_vrf *zvrf)
+static void zread_router_id_delete(ZAPI_HANDLER_ARGS)
 {
        vrf_bitmap_unset(client->ridinfo, zvrf_id(zvrf));
-       return 0;
 }
 
 /* Tie up route-type and client->sock */
-static void zread_hello(struct zserv *client)
+static void zread_hello(ZAPI_HANDLER_ARGS)
 {
        /* type of protocol (lib/zebra.h) */
        u_char proto;
        u_short instance;
        u_char notify;
 
-       STREAM_GETC(client->ibuf, proto);
-       STREAM_GETW(client->ibuf, instance);
-       STREAM_GETC(client->ibuf, notify);
+       STREAM_GETC(msg, proto);
+       STREAM_GETW(msg, instance);
+       STREAM_GETC(msg, notify);
        if (notify)
                client->notify_owner = true;
 
        /* accept only dynamic routing protocols */
        if ((proto < ZEBRA_ROUTE_MAX) && (proto > ZEBRA_ROUTE_STATIC)) {
                zlog_notice(
-                       "client %d says hello and bids fair to announce only %s routes",
-                       client->sock, zebra_route_string(proto));
+                       "client %d says hello and bids fair to announce only %s routes vrf=%u",
+                       client->sock, zebra_route_string(proto),
+                       zvrf->vrf->vrf_id);
                if (instance)
                        zlog_notice("client protocol instance %d", instance);
 
@@ -2010,8 +2077,7 @@ stream_failure:
 }
 
 /* Unregister all information in a VRF. */
-static int zread_vrf_unregister(struct zserv *client, u_short length,
-                               struct zebra_vrf *zvrf)
+static void zread_vrf_unregister(ZAPI_HANDLER_ARGS)
 {
        int i;
        afi_t afi;
@@ -2022,12 +2088,9 @@ static int zread_vrf_unregister(struct zserv *client, u_short length,
        vrf_bitmap_unset(client->redist_default, zvrf_id(zvrf));
        vrf_bitmap_unset(client->ifinfo, zvrf_id(zvrf));
        vrf_bitmap_unset(client->ridinfo, zvrf_id(zvrf));
-
-       return 0;
 }
 
-static void zread_mpls_labels(int command, struct zserv *client, u_short length,
-                             struct zebra_vrf *zvrf)
+static void zread_mpls_labels(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        enum lsp_types_t type;
@@ -2039,7 +2102,7 @@ static void zread_mpls_labels(int command, struct zserv *client, u_short length,
        u_int8_t distance;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        /* Get data. */
        STREAM_GETC(s, type);
@@ -2097,12 +2160,12 @@ static void zread_mpls_labels(int command, struct zserv *client, u_short length,
        if (!mpls_enabled)
                return;
 
-       if (command == ZEBRA_MPLS_LABELS_ADD) {
+       if (hdr->command == ZEBRA_MPLS_LABELS_ADD) {
                mpls_lsp_install(zvrf, type, in_label, out_label, gtype, &gate,
                                 ifindex);
                mpls_ftn_update(1, zvrf, type, &prefix, gtype, &gate, ifindex,
                                distance, out_label);
-       } else if (command == ZEBRA_MPLS_LABELS_DELETE) {
+       } else if (hdr->command == ZEBRA_MPLS_LABELS_DELETE) {
                mpls_lsp_uninstall(zvrf, type, in_label, gtype, &gate, ifindex);
                mpls_ftn_update(0, zvrf, type, &prefix, gtype, &gate, ifindex,
                                distance, out_label);
@@ -2110,27 +2173,9 @@ static void zread_mpls_labels(int command, struct zserv *client, u_short length,
 stream_failure:
        return;
 }
-/* Send response to a label manager connect request to client */
-static int zsend_label_manager_connect_response(struct zserv *client,
-                                               vrf_id_t vrf_id, u_short result)
-{
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
-
-       zclient_create_header(s, ZEBRA_LABEL_MANAGER_CONNECT, vrf_id);
-
-       /* result */
-       stream_putc(s, result);
-
-       /* Write packet size. */
-       stream_putw_at(s, 0, stream_get_endp(s));
-
-       return writen(client->sock, s->data, stream_get_endp(s));
-}
 
-static void zread_label_manager_connect(struct zserv *client, vrf_id_t vrf_id)
+static void zread_label_manager_connect(struct zserv *client,
+                                       struct stream *msg, vrf_id_t vrf_id)
 {
        struct stream *s;
        /* type of protocol (lib/zebra.h) */
@@ -2138,7 +2183,7 @@ static void zread_label_manager_connect(struct zserv *client, vrf_id_t vrf_id)
        u_short instance;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        /* Get data. */
        STREAM_GETC(s, proto);
@@ -2151,8 +2196,8 @@ static void zread_label_manager_connect(struct zserv *client, vrf_id_t vrf_id)
                zsend_label_manager_connect_response(client, vrf_id, 1);
                return;
        }
-       zlog_notice("client %d with instance %u connected as %s", client->sock,
-                   instance, zebra_route_string(proto));
+       zlog_notice("client %d with vrf %u instance %u connected as %s",
+                   client->sock, vrf_id, instance, zebra_route_string(proto));
        client->proto = proto;
        client->instance = instance;
 
@@ -2163,41 +2208,17 @@ static void zread_label_manager_connect(struct zserv *client, vrf_id_t vrf_id)
        release_daemon_chunks(proto, instance);
 
        zlog_debug(
-               " Label Manager client connected: sock %d, proto %s, instance %u",
-               client->sock, zebra_route_string(proto), instance);
+               " Label Manager client connected: sock %d, proto %s, vrf %u instance %u",
+               client->sock, zebra_route_string(proto), vrf_id, instance);
        /* send response back */
        zsend_label_manager_connect_response(client, vrf_id, 0);
 
 stream_failure:
        return;
 }
-/* Send response to a get label chunk request to client */
-static int zsend_assign_label_chunk_response(struct zserv *client,
-                                            vrf_id_t vrf_id,
-                                            struct label_manager_chunk *lmc)
-{
-       struct stream *s;
-
-       s = client->obuf;
-       stream_reset(s);
-
-       zclient_create_header(s, ZEBRA_GET_LABEL_CHUNK, vrf_id);
-
-       if (lmc) {
-               /* keep */
-               stream_putc(s, lmc->keep);
-               /* start and end labels */
-               stream_putl(s, lmc->start);
-               stream_putl(s, lmc->end);
-       }
-
-       /* Write packet size. */
-       stream_putw_at(s, 0, stream_get_endp(s));
-
-       return writen(client->sock, s->data, stream_get_endp(s));
-}
 
-static void zread_get_label_chunk(struct zserv *client, vrf_id_t vrf_id)
+static void zread_get_label_chunk(struct zserv *client, struct stream *msg,
+                                 vrf_id_t vrf_id)
 {
        struct stream *s;
        u_char keep;
@@ -2205,7 +2226,7 @@ static void zread_get_label_chunk(struct zserv *client, vrf_id_t vrf_id)
        struct label_manager_chunk *lmc;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        /* Get data. */
        STREAM_GETC(s, keep);
@@ -2225,13 +2246,13 @@ stream_failure:
        return;
 }
 
-static void zread_release_label_chunk(struct zserv *client)
+static void zread_release_label_chunk(struct zserv *client, struct stream *msg)
 {
        struct stream *s;
        uint32_t start, end;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        /* Get data. */
        STREAM_GETL(s, start);
@@ -2242,20 +2263,20 @@ static void zread_release_label_chunk(struct zserv *client)
 stream_failure:
        return;
 }
-static void zread_label_manager_request(int cmd, struct zserv *client,
-                                       struct zebra_vrf *zvrf)
+static void zread_label_manager_request(ZAPI_HANDLER_ARGS)
 {
        /* to avoid sending other messages like ZERBA_INTERFACE_UP */
-       if (cmd == ZEBRA_LABEL_MANAGER_CONNECT)
+       if (hdr->command == ZEBRA_LABEL_MANAGER_CONNECT)
                client->is_synchronous = 1;
 
        /* external label manager */
        if (lm_is_external)
-               zread_relay_label_manager_request(cmd, client, zvrf_id(zvrf));
+               zread_relay_label_manager_request(hdr->command, client,
+                                                 zvrf_id(zvrf));
        /* this is a label manager */
        else {
-               if (cmd == ZEBRA_LABEL_MANAGER_CONNECT)
-                       zread_label_manager_connect(client, zvrf_id(zvrf));
+               if (hdr->command == ZEBRA_LABEL_MANAGER_CONNECT)
+                       zread_label_manager_connect(client, msg, zvrf_id(zvrf));
                else {
                        /* Sanity: don't allow 'unidentified' requests */
                        if (!client->proto) {
@@ -2263,16 +2284,16 @@ static void zread_label_manager_request(int cmd, struct zserv *client,
                                        "Got label request from an unidentified client");
                                return;
                        }
-                       if (cmd == ZEBRA_GET_LABEL_CHUNK)
-                               zread_get_label_chunk(client, zvrf_id(zvrf));
-                       else if (cmd == ZEBRA_RELEASE_LABEL_CHUNK)
-                               zread_release_label_chunk(client);
+                       if (hdr->command == ZEBRA_GET_LABEL_CHUNK)
+                               zread_get_label_chunk(client, msg,
+                                                     zvrf_id(zvrf));
+                       else if (hdr->command == ZEBRA_RELEASE_LABEL_CHUNK)
+                               zread_release_label_chunk(client, msg);
                }
        }
 }
 
-static int zread_pseudowire(int command, struct zserv *client, u_short length,
-                           struct zebra_vrf *zvrf)
+static void zread_pseudowire(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        char ifname[IF_NAMESIZE];
@@ -2288,7 +2309,7 @@ static int zread_pseudowire(int command, struct zserv *client, u_short length,
        struct zebra_pw *pw;
 
        /* Get input stream.  */
-       s = client->ibuf;
+       s = msg;
 
        /* Get data. */
        STREAM_GET(ifname, s, IF_NAMESIZE);
@@ -2303,7 +2324,7 @@ static int zread_pseudowire(int command, struct zserv *client, u_short length,
                STREAM_GET(&nexthop.ipv6, s, 16);
                break;
        default:
-               return -1;
+               return;
        }
        STREAM_GETL(s, local_label);
        STREAM_GETL(s, remote_label);
@@ -2312,13 +2333,13 @@ static int zread_pseudowire(int command, struct zserv *client, u_short length,
        protocol = client->proto;
 
        pw = zebra_pw_find(zvrf, ifname);
-       switch (command) {
+       switch (hdr->command) {
        case ZEBRA_PW_ADD:
                if (pw) {
                        zlog_warn("%s: pseudowire %s already exists [%s]",
                                  __func__, ifname,
-                                 zserv_command_string(command));
-                       return -1;
+                                 zserv_command_string(hdr->command));
+                       return;
                }
 
                zebra_pw_add(zvrf, ifname, protocol, client);
@@ -2326,8 +2347,8 @@ static int zread_pseudowire(int command, struct zserv *client, u_short length,
        case ZEBRA_PW_DELETE:
                if (!pw) {
                        zlog_warn("%s: pseudowire %s not found [%s]", __func__,
-                                 ifname, zserv_command_string(command));
-                       return -1;
+                                 ifname, zserv_command_string(hdr->command));
+                       return;
                }
 
                zebra_pw_del(zvrf, pw);
@@ -2336,11 +2357,11 @@ static int zread_pseudowire(int command, struct zserv *client, u_short length,
        case ZEBRA_PW_UNSET:
                if (!pw) {
                        zlog_warn("%s: pseudowire %s not found [%s]", __func__,
-                                 ifname, zserv_command_string(command));
-                       return -1;
+                                 ifname, zserv_command_string(hdr->command));
+                       return;
                }
 
-               switch (command) {
+               switch (hdr->command) {
                case ZEBRA_PW_SET:
                        pw->enabled = 1;
                        break;
@@ -2355,7 +2376,7 @@ static int zread_pseudowire(int command, struct zserv *client, u_short length,
        }
 
 stream_failure:
-       return 0;
+       return;
 }
 
 /* Cleanup registered nexthops (across VRFs) upon client disconnect. */
@@ -2385,12 +2406,242 @@ static void zebra_client_close_cleanup_rnh(struct zserv *client)
        }
 }
 
+static void zread_interface_set_master(ZAPI_HANDLER_ARGS)
+{
+       struct interface *master;
+       struct interface *slave;
+       struct stream *s = msg;
+       int ifindex;
+       vrf_id_t vrf_id;
+
+       STREAM_GETL(s, vrf_id);
+       STREAM_GETL(s, ifindex);
+       master = if_lookup_by_index(ifindex, vrf_id);
+
+       STREAM_GETL(s, vrf_id);
+       STREAM_GETL(s, ifindex);
+       slave = if_lookup_by_index(ifindex, vrf_id);
+
+       if (!master || !slave)
+               return;
+
+       kernel_interface_set_master(master, slave);
+
+stream_failure:
+       return;
+}
+
+
+static void zread_vrf_label(ZAPI_HANDLER_ARGS)
+{
+       struct interface *ifp;
+       mpls_label_t nlabel;
+       afi_t afi;
+       struct stream *s;
+       struct zebra_vrf *def_zvrf;
+       enum lsp_types_t ltype;
+
+       s = msg;
+       STREAM_GETL(s, nlabel);
+       STREAM_GETC(s, afi);
+       if (nlabel == zvrf->label[afi]) {
+               /*
+                * Nothing to do here move along
+                */
+               return;
+       }
+
+       STREAM_GETC(s, ltype);
+
+       if (zvrf->vrf->vrf_id != VRF_DEFAULT)
+               ifp = if_lookup_by_name(zvrf->vrf->name, zvrf->vrf->vrf_id);
+       else
+               ifp = if_lookup_by_name("lo", VRF_DEFAULT);
+
+       if (!ifp) {
+               zlog_debug("Unable to find specified Interface for %s",
+                          zvrf->vrf->name);
+               return;
+       }
+
+       def_zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
+
+       if (zvrf->label[afi] != MPLS_LABEL_NONE) {
+               afi_t scrubber;
+               bool really_remove;
+
+               really_remove = true;
+               for (scrubber = AFI_IP; scrubber < AFI_MAX; scrubber++) {
+                       if (scrubber == afi)
+                               continue;
+
+                       if (zvrf->label[scrubber] == MPLS_LABEL_NONE)
+                               continue;
+
+                       if (zvrf->label[afi] == zvrf->label[scrubber]) {
+                               really_remove = false;
+                               break;
+                       }
+               }
+
+               if (really_remove)
+                       mpls_lsp_uninstall(def_zvrf, ltype, zvrf->label[afi],
+                                          NEXTHOP_TYPE_IFINDEX, NULL,
+                                          ifp->ifindex);
+       }
+
+       if (nlabel != MPLS_LABEL_NONE)
+               mpls_lsp_install(def_zvrf, ltype, nlabel,
+                                MPLS_LABEL_IMPLICIT_NULL, NEXTHOP_TYPE_IFINDEX,
+                                NULL, ifp->ifindex);
+
+       zvrf->label[afi] = nlabel;
+stream_failure:
+       return;
+}
+
+static inline void zread_rule(ZAPI_HANDLER_ARGS)
+{
+       struct zebra_pbr_rule zpr;
+       struct stream *s;
+       uint32_t total, i;
+       ifindex_t ifindex;
+
+       s = msg;
+       STREAM_GETL(s, total);
+
+       for (i = 0; i < total; i++) {
+               memset(&zpr, 0, sizeof(zpr));
+
+               zpr.sock = client->sock;
+               STREAM_GETL(s, zpr.seq);
+               STREAM_GETL(s, zpr.priority);
+               STREAM_GETL(s, zpr.unique);
+               STREAM_GETC(s, zpr.filter.src_ip.family);
+               STREAM_GETC(s, zpr.filter.src_ip.prefixlen);
+               STREAM_GET(&zpr.filter.src_ip.u.prefix, s,
+                          prefix_blen(&zpr.filter.src_ip));
+               STREAM_GETW(s, zpr.filter.src_port);
+               STREAM_GETC(s, zpr.filter.dst_ip.family);
+               STREAM_GETC(s, zpr.filter.dst_ip.prefixlen);
+               STREAM_GET(&zpr.filter.dst_ip.u.prefix, s,
+                          prefix_blen(&zpr.filter.dst_ip));
+               STREAM_GETW(s, zpr.filter.dst_port);
+               STREAM_GETL(s, zpr.action.table);
+               STREAM_GETL(s, ifindex);
+
+               zpr.ifp = if_lookup_by_index(ifindex, VRF_UNKNOWN);
+               if (!zpr.ifp) {
+                       zlog_debug("FAiled to lookup ifindex: %u", ifindex);
+                       return;
+               }
+
+               if (!is_default_prefix(&zpr.filter.src_ip))
+                       zpr.filter.filter_bm |= PBR_FILTER_SRC_IP;
+
+               if (!is_default_prefix(&zpr.filter.dst_ip))
+                       zpr.filter.filter_bm |= PBR_FILTER_DST_IP;
+
+               if (zpr.filter.src_port)
+                       zpr.filter.filter_bm |= PBR_FILTER_SRC_PORT;
+
+               if (zpr.filter.dst_port)
+                       zpr.filter.filter_bm |= PBR_FILTER_DST_PORT;
+
+               if (hdr->command == ZEBRA_RULE_ADD)
+                       zebra_pbr_add_rule(zvrf->zns, &zpr);
+               else
+                       zebra_pbr_del_rule(zvrf->zns, &zpr);
+       }
+
+stream_failure:
+       return;
+}
+
+void (*zserv_handlers[])(ZAPI_HANDLER_ARGS) = {
+       [ZEBRA_ROUTER_ID_ADD] = zread_router_id_add,
+       [ZEBRA_ROUTER_ID_DELETE] = zread_router_id_delete,
+       [ZEBRA_INTERFACE_ADD] = zread_interface_add,
+       [ZEBRA_INTERFACE_DELETE] = zread_interface_delete,
+       [ZEBRA_ROUTE_ADD] = zread_route_add,
+       [ZEBRA_ROUTE_DELETE] = zread_route_del,
+       [ZEBRA_IPV4_ROUTE_ADD] = zread_ipv4_add,
+       [ZEBRA_IPV4_ROUTE_DELETE] = zread_ipv4_delete,
+       [ZEBRA_IPV4_ROUTE_IPV6_NEXTHOP_ADD] = zread_ipv4_route_ipv6_nexthop_add,
+       [ZEBRA_IPV6_ROUTE_ADD] = zread_ipv6_add,
+       [ZEBRA_IPV6_ROUTE_DELETE] = zread_ipv6_delete,
+       [ZEBRA_REDISTRIBUTE_ADD] = zebra_redistribute_add,
+       [ZEBRA_REDISTRIBUTE_DELETE] = zebra_redistribute_delete,
+       [ZEBRA_REDISTRIBUTE_DEFAULT_ADD] = zebra_redistribute_default_add,
+       [ZEBRA_REDISTRIBUTE_DEFAULT_DELETE] = zebra_redistribute_default_delete,
+       [ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB] = zread_ipv4_nexthop_lookup_mrib,
+       [ZEBRA_HELLO] = zread_hello,
+       [ZEBRA_NEXTHOP_REGISTER] = zread_rnh_register,
+       [ZEBRA_NEXTHOP_UNREGISTER] = zread_rnh_unregister,
+       [ZEBRA_IMPORT_ROUTE_REGISTER] = zread_rnh_register,
+       [ZEBRA_IMPORT_ROUTE_UNREGISTER] = zread_rnh_unregister,
+       [ZEBRA_BFD_DEST_UPDATE] = zebra_ptm_bfd_dst_register,
+       [ZEBRA_BFD_DEST_REGISTER] = zebra_ptm_bfd_dst_register,
+       [ZEBRA_BFD_DEST_DEREGISTER] = zebra_ptm_bfd_dst_deregister,
+       [ZEBRA_VRF_UNREGISTER] = zread_vrf_unregister,
+       [ZEBRA_VRF_LABEL] = zread_vrf_label,
+       [ZEBRA_BFD_CLIENT_REGISTER] = zebra_ptm_bfd_client_register,
+#if defined(HAVE_RTADV)
+       [ZEBRA_INTERFACE_ENABLE_RADV] = zebra_interface_radv_enable,
+       [ZEBRA_INTERFACE_DISABLE_RADV] = zebra_interface_radv_disable,
+#else
+       [ZEBRA_INTERFACE_ENABLE_RADV] = NULL,
+       [ZEBRA_INTERFACE_DISABLE_RADV] = NULL,
+#endif
+       [ZEBRA_MPLS_LABELS_ADD] = zread_mpls_labels,
+       [ZEBRA_MPLS_LABELS_DELETE] = zread_mpls_labels,
+       [ZEBRA_IPMR_ROUTE_STATS] = zebra_ipmr_route_stats,
+       [ZEBRA_LABEL_MANAGER_CONNECT] = zread_label_manager_request,
+       [ZEBRA_GET_LABEL_CHUNK] = zread_label_manager_request,
+       [ZEBRA_RELEASE_LABEL_CHUNK] = zread_label_manager_request,
+       [ZEBRA_FEC_REGISTER] = zread_fec_register,
+       [ZEBRA_FEC_UNREGISTER] = zread_fec_unregister,
+       [ZEBRA_ADVERTISE_DEFAULT_GW] = zebra_vxlan_advertise_gw_macip,
+       [ZEBRA_ADVERTISE_SUBNET] = zebra_vxlan_advertise_subnet,
+       [ZEBRA_ADVERTISE_ALL_VNI] = zebra_vxlan_advertise_all_vni,
+       [ZEBRA_REMOTE_VTEP_ADD] = zebra_vxlan_remote_vtep_add,
+       [ZEBRA_REMOTE_VTEP_DEL] = zebra_vxlan_remote_vtep_del,
+       [ZEBRA_REMOTE_MACIP_ADD] = zebra_vxlan_remote_macip_add,
+       [ZEBRA_REMOTE_MACIP_DEL] = zebra_vxlan_remote_macip_del,
+       [ZEBRA_INTERFACE_SET_MASTER] = zread_interface_set_master,
+       [ZEBRA_PW_ADD] = zread_pseudowire,
+       [ZEBRA_PW_DELETE] = zread_pseudowire,
+       [ZEBRA_PW_SET] = zread_pseudowire,
+       [ZEBRA_PW_UNSET] = zread_pseudowire,
+       [ZEBRA_RULE_ADD] = zread_rule,
+       [ZEBRA_RULE_DELETE] = zread_rule,
+};
+
+static inline void zserv_handle_commands(struct zserv *client,
+                                        struct zmsghdr *hdr,
+                                        struct stream *msg,
+                                        struct zebra_vrf *zvrf)
+{
+       if (hdr->command > array_size(zserv_handlers)
+           || zserv_handlers[hdr->command] == NULL)
+               zlog_info("Zebra received unknown command %d", hdr->command);
+       else
+               zserv_handlers[hdr->command](client, hdr, msg, zvrf);
+
+       stream_free(msg);
+}
+
+/* Lifecycle ---------------------------------------------------------------- */
+
 /* free zebra client information. */
 static void zebra_client_free(struct zserv *client)
 {
        /* Send client de-registration to BFD */
        zebra_ptm_bfd_client_deregister(client->proto);
 
+       /* Cleanup any rules installed from this client */
+       zebra_pbr_client_close_cleanup(client->sock);
+
        /* Cleanup any registered nexthops - across all VRFs. */
        zebra_client_close_cleanup_rnh(client);
 
@@ -2418,10 +2669,14 @@ static void zebra_client_free(struct zserv *client)
        }
 
        /* Free stream buffers. */
-       if (client->ibuf)
-               stream_free(client->ibuf);
-       if (client->obuf)
-               stream_free(client->obuf);
+       if (client->ibuf_work)
+               stream_free(client->ibuf_work);
+       if (client->obuf_work)
+               stream_free(client->obuf_work);
+       if (client->ibuf_fifo)
+               stream_fifo_free(client->ibuf_fifo);
+       if (client->obuf_fifo)
+               stream_fifo_free(client->obuf_fifo);
        if (client->wb)
                buffer_free(client->wb);
 
@@ -2445,6 +2700,9 @@ static void zebra_client_free(struct zserv *client)
        XFREE(MTYPE_TMP, client);
 }
 
+/*
+ * Called from client thread to terminate itself.
+ */
 static void zebra_client_close(struct zserv *client)
 {
        listnode_delete(zebrad.client_list, client);
@@ -2462,8 +2720,10 @@ static void zebra_client_create(int sock)
 
        /* Make client input/output buffer. */
        client->sock = sock;
-       client->ibuf = stream_new(ZEBRA_MAX_PACKET_SIZ);
-       client->obuf = stream_new(ZEBRA_MAX_PACKET_SIZ);
+       client->ibuf_fifo = stream_fifo_new();
+       client->obuf_fifo = stream_fifo_new();
+       client->ibuf_work = stream_new(ZEBRA_MAX_PACKET_SIZ);
+       client->obuf_work = stream_new(ZEBRA_MAX_PACKET_SIZ);
        client->wb = buffer_new(0);
 
        /* Set table number. */
@@ -2478,260 +2738,137 @@ static void zebra_client_create(int sock)
        client->ifinfo = vrf_bitmap_init();
        client->ridinfo = vrf_bitmap_init();
 
-       /* by default, it's not a synchronous client */
-       client->is_synchronous = 0;
-
-       /* Add this client to linked list. */
-       listnode_add(zebrad.client_list, client);
-
-       /* Make new read thread. */
-       zebra_event(ZEBRA_READ, sock, client);
-
-       zebra_vrf_update_all(client);
-}
-
-static int zread_interface_set_master(struct zserv *client, u_short length)
-{
-       struct interface *master;
-       struct interface *slave;
-       struct stream *s = client->ibuf;
-       int ifindex;
-       vrf_id_t vrf_id;
-
-       STREAM_GETL(s, vrf_id);
-       STREAM_GETL(s, ifindex);
-       master = if_lookup_by_index(ifindex, vrf_id);
-
-       STREAM_GETL(s, vrf_id);
-       STREAM_GETL(s, ifindex);
-       slave = if_lookup_by_index(ifindex, vrf_id);
+       /* by default, it's not a synchronous client */
+       client->is_synchronous = 0;
 
-       if (!master || !slave)
-               return 0;
+       /* Add this client to linked list. */
+       listnode_add(zebrad.client_list, client);
 
-       kernel_interface_set_master(master, slave);
+       zebra_vrf_update_all(client);
 
-stream_failure:
-       return 1;
+       /* start read loop */
+       zebra_event(client, ZEBRA_READ);
 }
 
-
-static void zread_vrf_label(struct zserv *client, struct zebra_vrf *zvrf)
+static int zserv_delayed_close(struct thread *thread)
 {
-       struct interface *ifp;
-       mpls_label_t nlabel;
-       afi_t afi;
-       struct stream *s;
-       struct zebra_vrf *def_zvrf;
-       enum lsp_types_t ltype;
+       struct zserv *client = THREAD_ARG(thread);
 
-       s = client->ibuf;
-       STREAM_GETL(s, nlabel);
-       STREAM_GETC(s, afi);
-       if (nlabel == zvrf->label[afi]) {
-               /*
-                * Nothing to do here move along
-                */
-               return;
-       }
+       client->t_suicide = NULL;
+       zebra_client_close(client);
+       return 0;
+}
 
-       STREAM_GETC(s, ltype);
+/*
+ * Log zapi message to zlog.
+ *
+ * errmsg (optional)
+ *    Debugging message
+ *
+ * msg
+ *    The message
+ *
+ * hdr (optional)
+ *    The message header
+ */
+static void zserv_log_message(const char *errmsg, struct stream *msg,
+                             struct zmsghdr *hdr)
+{
+       zlog_debug("Rx'd ZAPI message");
+       if (errmsg)
+               zlog_debug("%s", errmsg);
+       if (hdr) {
+               zlog_debug(" Length: %d", hdr->length);
+               zlog_debug("Command: %s", zserv_command_string(hdr->command));
+               zlog_debug("    VRF: %u", hdr->vrf_id);
+       }
+       zlog_hexdump(msg->data, STREAM_READABLE(msg));
+}
 
-       if (zvrf->vrf->vrf_id != VRF_DEFAULT)
-               ifp = if_lookup_by_name(zvrf->vrf->name, zvrf->vrf->vrf_id);
-       else
-               ifp = if_lookup_by_name("lo", VRF_DEFAULT);
+static int zserv_flush_data(struct thread *thread)
+{
+       struct zserv *client = THREAD_ARG(thread);
 
-       if (!ifp) {
-               zlog_debug("Unable to find specified Interface for %s",
-                          zvrf->vrf->name);
-               return;
+       client->t_write = NULL;
+       if (client->t_suicide) {
+               zebra_client_close(client);
+               return -1;
+       }
+       switch (buffer_flush_available(client->wb, client->sock)) {
+       case BUFFER_ERROR:
+               zlog_warn(
+                       "%s: buffer_flush_available failed on zserv client fd %d, closing",
+                       __func__, client->sock);
+               zebra_client_close(client);
+               client = NULL;
+               break;
+       case BUFFER_PENDING:
+               client->t_write = NULL;
+               thread_add_write(zebrad.master, zserv_flush_data, client,
+                                client->sock, &client->t_write);
+               break;
+       case BUFFER_EMPTY:
+               break;
        }
 
-       def_zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
-
-       if (zvrf->label[afi] != MPLS_LABEL_NONE) {
-               afi_t scrubber;
-               bool really_remove;
+       if (client)
+               client->last_write_time = monotime(NULL);
+       return 0;
+}
 
-               really_remove = true;
-               for (scrubber = AFI_IP; scrubber < AFI_MAX; scrubber++) {
-                       if (scrubber == afi)
-                               continue;
+/*
+ * Write a single packet.
+ */
+static int zserv_write(struct thread *thread)
+{
+       struct zserv *client = THREAD_ARG(thread);
+       struct stream *msg;
+       int writerv;
 
-                       if (zvrf->label[scrubber] == MPLS_LABEL_NONE)
-                               continue;
+       if (client->t_suicide)
+               return -1;
 
-                       if (zvrf->label[afi] == zvrf->label[scrubber]) {
-                               really_remove = false;
-                               break;
-                       }
-               }
+       if (client->is_synchronous)
+               return 0;
 
-               if (really_remove)
-                       mpls_lsp_uninstall(def_zvrf, ltype, zvrf->label[afi],
-                                          NEXTHOP_TYPE_IFINDEX, NULL,
-                                          ifp->ifindex);
-       }
+       msg = stream_fifo_pop(client->obuf_fifo);
+       stream_set_getp(msg, 0);
+       client->last_write_cmd = stream_getw_from(msg, 6);
 
-       if (nlabel != MPLS_LABEL_NONE)
-               mpls_lsp_install(def_zvrf, ltype, nlabel,
-                                MPLS_LABEL_IMPLICIT_NULL, NEXTHOP_TYPE_IFINDEX,
-                                NULL, ifp->ifindex);
+       writerv = buffer_write(client->wb, client->sock, STREAM_DATA(msg),
+                              stream_get_endp(msg));
 
-       zvrf->label[afi] = nlabel;
-stream_failure:
-       return;
-}
+       stream_free(msg);
 
-static inline void zserv_handle_commands(struct zserv *client, uint16_t command,
-                                        uint16_t length,
-                                        struct zebra_vrf *zvrf)
-{
-       switch (command) {
-       case ZEBRA_ROUTER_ID_ADD:
-               zread_router_id_add(client, length, zvrf);
-               break;
-       case ZEBRA_ROUTER_ID_DELETE:
-               zread_router_id_delete(client, length, zvrf);
-               break;
-       case ZEBRA_INTERFACE_ADD:
-               zread_interface_add(client, length, zvrf);
-               break;
-       case ZEBRA_INTERFACE_DELETE:
-               zread_interface_delete(client, length, zvrf);
-               break;
-       case ZEBRA_ROUTE_ADD:
-               zread_route_add(client, length, zvrf);
-               break;
-       case ZEBRA_ROUTE_DELETE:
-               zread_route_del(client, length, zvrf);
-               break;
-       case ZEBRA_IPV4_ROUTE_ADD:
-               zread_ipv4_add(client, length, zvrf);
-               break;
-       case ZEBRA_IPV4_ROUTE_DELETE:
-               zread_ipv4_delete(client, length, zvrf);
-               break;
-       case ZEBRA_IPV4_ROUTE_IPV6_NEXTHOP_ADD:
-               zread_ipv4_route_ipv6_nexthop_add(client, length, zvrf);
-               break;
-       case ZEBRA_IPV6_ROUTE_ADD:
-               zread_ipv6_add(client, length, zvrf);
-               break;
-       case ZEBRA_IPV6_ROUTE_DELETE:
-               zread_ipv6_delete(client, length, zvrf);
-               break;
-       case ZEBRA_REDISTRIBUTE_ADD:
-               zebra_redistribute_add(command, client, length, zvrf);
-               break;
-       case ZEBRA_REDISTRIBUTE_DELETE:
-               zebra_redistribute_delete(command, client, length, zvrf);
-               break;
-       case ZEBRA_REDISTRIBUTE_DEFAULT_ADD:
-               zebra_redistribute_default_add(command, client, length, zvrf);
-               break;
-       case ZEBRA_REDISTRIBUTE_DEFAULT_DELETE:
-               zebra_redistribute_default_delete(command, client, length,
-                                                 zvrf);
-               break;
-       case ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB:
-               zread_ipv4_nexthop_lookup_mrib(client, length, zvrf);
-               break;
-       case ZEBRA_HELLO:
-               zread_hello(client);
-               break;
-       case ZEBRA_NEXTHOP_REGISTER:
-               zserv_rnh_register(client, length, RNH_NEXTHOP_TYPE, zvrf);
-               break;
-       case ZEBRA_NEXTHOP_UNREGISTER:
-               zserv_rnh_unregister(client, length, RNH_NEXTHOP_TYPE, zvrf);
-               break;
-       case ZEBRA_IMPORT_ROUTE_REGISTER:
-               zserv_rnh_register(client, length, RNH_IMPORT_CHECK_TYPE, zvrf);
-               break;
-       case ZEBRA_IMPORT_ROUTE_UNREGISTER:
-               zserv_rnh_unregister(client, length, RNH_IMPORT_CHECK_TYPE,
-                                    zvrf);
-               break;
-       case ZEBRA_BFD_DEST_UPDATE:
-       case ZEBRA_BFD_DEST_REGISTER:
-               zebra_ptm_bfd_dst_register(client, length, command, zvrf);
-               break;
-       case ZEBRA_BFD_DEST_DEREGISTER:
-               zebra_ptm_bfd_dst_deregister(client, length, zvrf);
-               break;
-       case ZEBRA_VRF_UNREGISTER:
-               zread_vrf_unregister(client, length, zvrf);
-               break;
-       case ZEBRA_VRF_LABEL:
-               zread_vrf_label(client, zvrf);
-               break;
-       case ZEBRA_BFD_CLIENT_REGISTER:
-               zebra_ptm_bfd_client_register(client, length);
-               break;
-       case ZEBRA_INTERFACE_ENABLE_RADV:
-#if defined(HAVE_RTADV)
-               zebra_interface_radv_set(client, length, zvrf, 1);
-#endif
-               break;
-       case ZEBRA_INTERFACE_DISABLE_RADV:
-#if defined(HAVE_RTADV)
-               zebra_interface_radv_set(client, length, zvrf, 0);
-#endif
-               break;
-       case ZEBRA_MPLS_LABELS_ADD:
-       case ZEBRA_MPLS_LABELS_DELETE:
-               zread_mpls_labels(command, client, length, zvrf);
-               break;
-       case ZEBRA_IPMR_ROUTE_STATS:
-               zebra_ipmr_route_stats(client, length, zvrf);
-               break;
-       case ZEBRA_LABEL_MANAGER_CONNECT:
-       case ZEBRA_GET_LABEL_CHUNK:
-       case ZEBRA_RELEASE_LABEL_CHUNK:
-               zread_label_manager_request(command, client, zvrf);
-               break;
-       case ZEBRA_FEC_REGISTER:
-               zserv_fec_register(client, length);
-               break;
-       case ZEBRA_FEC_UNREGISTER:
-               zserv_fec_unregister(client, length);
-               break;
-       case ZEBRA_ADVERTISE_DEFAULT_GW:
-               zebra_vxlan_advertise_gw_macip(client, length, zvrf);
-               break;
-       case ZEBRA_ADVERTISE_SUBNET:
-               zebra_vxlan_advertise_subnet(client, length, zvrf);
-               break;
-       case ZEBRA_ADVERTISE_ALL_VNI:
-               zebra_vxlan_advertise_all_vni(client, length, zvrf);
-               break;
-       case ZEBRA_REMOTE_VTEP_ADD:
-               zebra_vxlan_remote_vtep_add(client, length, zvrf);
-               break;
-       case ZEBRA_REMOTE_VTEP_DEL:
-               zebra_vxlan_remote_vtep_del(client, length, zvrf);
-               break;
-       case ZEBRA_REMOTE_MACIP_ADD:
-               zebra_vxlan_remote_macip_add(client, length, zvrf);
-               break;
-       case ZEBRA_REMOTE_MACIP_DEL:
-               zebra_vxlan_remote_macip_del(client, length, zvrf);
-               break;
-       case ZEBRA_INTERFACE_SET_MASTER:
-               zread_interface_set_master(client, length);
-               break;
-       case ZEBRA_PW_ADD:
-       case ZEBRA_PW_DELETE:
-       case ZEBRA_PW_SET:
-       case ZEBRA_PW_UNSET:
-               zread_pseudowire(command, client, length, zvrf);
+       switch (writerv) {
+       case BUFFER_ERROR:
+               zlog_warn(
+                       "%s: buffer_write failed to zserv client fd %d, closing",
+                       __func__, client->sock);
+               /*
+                * Schedule a delayed close since many of the functions that
+                * call this one do not check the return code. They do not
+                * allow for the possibility that an I/O error may have caused
+                * the client to be deleted.
+                */
+               client->t_suicide = NULL;
+               thread_add_event(zebrad.master, zserv_delayed_close, client, 0,
+                                &client->t_suicide);
+               return -1;
+       case BUFFER_EMPTY:
+               THREAD_OFF(client->t_write);
                break;
-       default:
-               zlog_info("Zebra received unknown command %d", command);
+       case BUFFER_PENDING:
+               thread_add_write(zebrad.master, zserv_flush_data, client,
+                                client->sock, &client->t_write);
                break;
        }
+
+       if (client->obuf_fifo->count)
+               zebra_event(client, ZEBRA_WRITE);
+
+       client->last_write_time = monotime(NULL);
+       return 0;
 }
 
 #if defined(HANDLE_ZAPI_FUZZING)
@@ -2754,26 +2891,61 @@ static void zserv_write_incoming(struct stream *orig, uint16_t command)
 }
 #endif
 
+static int zserv_process_messages(struct thread *thread)
+{
+       struct zserv *client = THREAD_ARG(thread);
+       struct zebra_vrf *zvrf;
+       struct zmsghdr hdr;
+       struct stream *msg;
+       bool hdrvalid;
+
+       do {
+               msg = stream_fifo_pop(client->ibuf_fifo);
+
+               /* break if out of messages */
+               if (!msg)
+                       continue;
+
+               /* read & check header */
+               hdrvalid = zapi_parse_header(msg, &hdr);
+               if (!hdrvalid && IS_ZEBRA_DEBUG_PACKET && IS_ZEBRA_DEBUG_RECV) {
+                       const char *emsg = "Message has corrupt header";
+                       zserv_log_message(emsg, msg, NULL);
+               }
+               if (!hdrvalid)
+                       continue;
+
+               /* lookup vrf */
+               zvrf = zebra_vrf_lookup_by_id(hdr.vrf_id);
+               if (!zvrf && IS_ZEBRA_DEBUG_PACKET && IS_ZEBRA_DEBUG_RECV) {
+                       const char *emsg = "Message specifies unknown VRF";
+                       zserv_log_message(emsg, msg, &hdr);
+               }
+               if (!zvrf)
+                       continue;
+
+               /* process commands */
+               zserv_handle_commands(client, &hdr, msg, zvrf);
+
+       } while (msg);
+
+       return 0;
+}
+
 /* Handler of zebra service request. */
-static int zebra_client_read(struct thread *thread)
+static int zserv_read(struct thread *thread)
 {
        int sock;
        struct zserv *client;
        size_t already;
-       uint16_t length, command;
-       uint8_t marker, version;
-       vrf_id_t vrf_id;
-       struct zebra_vrf *zvrf;
 #if defined(HANDLE_ZAPI_FUZZING)
        int packets = 1;
 #else
        int packets = zebrad.packets_to_process;
 #endif
-
        /* Get thread data.  Reset reading thread because I'm running. */
        sock = THREAD_FD(thread);
        client = THREAD_ARG(thread);
-       client->t_read = NULL;
 
        if (client->t_suicide) {
                zebra_client_close(client);
@@ -2781,88 +2953,89 @@ static int zebra_client_read(struct thread *thread)
        }
 
        while (packets) {
+               struct zmsghdr hdr;
+               ssize_t nb;
+               bool hdrvalid;
+               char errmsg[256];
+
+               already = stream_get_endp(client->ibuf_work);
+
                /* Read length and command (if we don't have it already). */
-               if ((already = stream_get_endp(client->ibuf))
-                   < ZEBRA_HEADER_SIZE) {
-                       ssize_t nbyte;
-                       if (((nbyte = stream_read_try(client->ibuf, sock,
-                                                     ZEBRA_HEADER_SIZE
-                                                             - already))
-                            == 0)
-                           || (nbyte == -1)) {
-                               if (IS_ZEBRA_DEBUG_EVENT)
-                                       zlog_debug(
-                                               "connection closed socket [%d]",
-                                               sock);
-                               zebra_client_close(client);
-                               return -1;
-                       }
-                       if (nbyte != (ssize_t)(ZEBRA_HEADER_SIZE - already)) {
+               if (already < ZEBRA_HEADER_SIZE) {
+                       nb = stream_read_try(client->ibuf_work, sock,
+                                            ZEBRA_HEADER_SIZE - already);
+                       if ((nb == 0 || nb == -1) && IS_ZEBRA_DEBUG_EVENT)
+                               zlog_debug("connection closed socket [%d]",
+                                          sock);
+                       if ((nb == 0 || nb == -1))
+                               goto zread_fail;
+                       if (nb != (ssize_t)(ZEBRA_HEADER_SIZE - already)) {
                                /* Try again later. */
-                               zebra_event(ZEBRA_READ, sock, client);
-                               return 0;
+                               break;
                        }
                        already = ZEBRA_HEADER_SIZE;
                }
 
                /* Reset to read from the beginning of the incoming packet. */
-               stream_set_getp(client->ibuf, 0);
+               stream_set_getp(client->ibuf_work, 0);
 
                /* Fetch header values */
-               STREAM_GETW(client->ibuf, length);
-               STREAM_GETC(client->ibuf, marker);
-               STREAM_GETC(client->ibuf, version);
-               STREAM_GETL(client->ibuf, vrf_id);
-               STREAM_GETW(client->ibuf, command);
+               hdrvalid = zapi_parse_header(client->ibuf_work, &hdr);
 
-               if (marker != ZEBRA_HEADER_MARKER || version != ZSERV_VERSION) {
-                       zlog_err(
-                               "%s: socket %d version mismatch, marker %d, version %d",
-                               __func__, sock, marker, version);
-                       zebra_client_close(client);
-                       return -1;
+               if (!hdrvalid) {
+                       snprintf(errmsg, sizeof(errmsg),
+                                "%s: Message has corrupt header", __func__);
+                       zserv_log_message(errmsg, client->ibuf_work, NULL);
+                       goto zread_fail;
                }
-               if (length < ZEBRA_HEADER_SIZE) {
-                       zlog_warn(
-                               "%s: socket %d message length %u is less than header size %d",
-                               __func__, sock, length, ZEBRA_HEADER_SIZE);
-                       zebra_client_close(client);
-                       return -1;
+
+               /* Validate header */
+               if (hdr.marker != ZEBRA_HEADER_MARKER
+                   || hdr.version != ZSERV_VERSION) {
+                       snprintf(
+                               errmsg, sizeof(errmsg),
+                               "Message has corrupt header\n%s: socket %d version mismatch, marker %d, version %d",
+                               __func__, sock, hdr.marker, hdr.version);
+                       zserv_log_message(errmsg, client->ibuf_work, &hdr);
+                       goto zread_fail;
                }
-               if (length > STREAM_SIZE(client->ibuf)) {
-                       zlog_warn(
-                               "%s: socket %d message length %u exceeds buffer size %lu",
-                               __func__, sock, length,
-                               (u_long)STREAM_SIZE(client->ibuf));
-                       zebra_client_close(client);
-                       return -1;
+               if (hdr.length < ZEBRA_HEADER_SIZE) {
+                       snprintf(
+                               errmsg, sizeof(errmsg),
+                               "Message has corrupt header\n%s: socket %d message length %u is less than header size %d",
+                               __func__, sock, hdr.length, ZEBRA_HEADER_SIZE);
+                       zserv_log_message(errmsg, client->ibuf_work, &hdr);
+                       goto zread_fail;
+               }
+               if (hdr.length > STREAM_SIZE(client->ibuf_work)) {
+                       snprintf(
+                               errmsg, sizeof(errmsg),
+                               "Message has corrupt header\n%s: socket %d message length %u exceeds buffer size %lu",
+                               __func__, sock, hdr.length,
+                               (unsigned long)STREAM_SIZE(client->ibuf_work));
+                       goto zread_fail;
                }
 
                /* Read rest of data. */
-               if (already < length) {
-                       ssize_t nbyte;
-                       if (((nbyte = stream_read_try(client->ibuf, sock,
-                                                     length - already))
-                            == 0)
-                           || (nbyte == -1)) {
-                               if (IS_ZEBRA_DEBUG_EVENT)
-                                       zlog_debug(
-                                               "connection closed [%d] when reading zebra data",
-                                               sock);
-                               zebra_client_close(client);
-                               return -1;
-                       }
-                       if (nbyte != (ssize_t)(length - already)) {
+               if (already < hdr.length) {
+                       nb = stream_read_try(client->ibuf_work, sock,
+                                            hdr.length - already);
+                       if ((nb == 0 || nb == -1) && IS_ZEBRA_DEBUG_EVENT)
+                               zlog_debug(
+                                       "connection closed [%d] when reading zebra data",
+                                       sock);
+                       if ((nb == 0 || nb == -1))
+                               goto zread_fail;
+                       if (nb != (ssize_t)(hdr.length - already)) {
                                /* Try again later. */
-                               zebra_event(ZEBRA_READ, sock, client);
-                               return 0;
+                               break;
                        }
                }
 
 #if defined(HANDLE_ZAPI_FUZZING)
-               zserv_write_incoming(client->ibuf, command);
+               zserv_write_incoming(client->ibuf_work, command);
 #endif
-               length -= ZEBRA_HEADER_SIZE;
+               hdr.length -= ZEBRA_HEADER_SIZE;
 
                /* Debug packet information. */
                if (IS_ZEBRA_DEBUG_EVENT)
@@ -2870,41 +3043,54 @@ static int zebra_client_read(struct thread *thread)
                                   sock);
 
                if (IS_ZEBRA_DEBUG_PACKET && IS_ZEBRA_DEBUG_RECV)
-                       zlog_debug("zebra message received [%s] %d in VRF %u",
-                                  zserv_command_string(command), length,
-                                  vrf_id);
+                       zserv_log_message(NULL, client->ibuf_work, &hdr);
 
                client->last_read_time = monotime(NULL);
-               client->last_read_cmd = command;
-
-               zvrf = zebra_vrf_lookup_by_id(vrf_id);
-               if (!zvrf) {
-                       if (IS_ZEBRA_DEBUG_PACKET && IS_ZEBRA_DEBUG_RECV)
-                               zlog_debug("zebra received unknown VRF[%u]",
-                                          vrf_id);
-                       goto zclient_read_out;
-               }
+               client->last_read_cmd = hdr.command;
 
-               zserv_handle_commands(client, command, length, zvrf);
+               stream_set_getp(client->ibuf_work, 0);
+               struct stream *msg = stream_dup(client->ibuf_work);
 
-               if (client->t_suicide) {
-                       /* No need to wait for thread callback, just kill
-                        * immediately.
-                        */
-                       zebra_client_close(client);
-                       return -1;
-               }
-               packets -= 1;
-               stream_reset(client->ibuf);
+               stream_fifo_push(client->ibuf_fifo, msg);
+
+               if (client->t_suicide)
+                       goto zread_fail;
+
+               --packets;
+               stream_reset(client->ibuf_work);
        }
 
-stream_failure:
-zclient_read_out:
-       stream_reset(client->ibuf);
-       zebra_event(ZEBRA_READ, sock, client);
+       if (IS_ZEBRA_DEBUG_PACKET)
+               zlog_debug("Read %d packets",
+                          zebrad.packets_to_process - packets);
+
+       /* Schedule job to process those packets */
+       thread_add_event(zebrad.master, &zserv_process_messages, client, 0,
+                        NULL);
+
+       /* Reschedule ourselves */
+       zebra_event(client, ZEBRA_READ);
+
        return 0;
+
+zread_fail:
+       zebra_client_close(client);
+       return -1;
 }
 
+static void zebra_event(struct zserv *client, enum event event)
+{
+       switch (event) {
+       case ZEBRA_READ:
+               thread_add_read(zebrad.master, zserv_read, client, client->sock,
+                               &client->t_read);
+               break;
+       case ZEBRA_WRITE:
+               thread_add_write(zebrad.master, zserv_write, client,
+                                client->sock, &client->t_write);
+               break;
+       }
+}
 
 /* Accept code of zebra server socket. */
 static int zebra_accept(struct thread *thread)
@@ -2917,7 +3103,7 @@ static int zebra_accept(struct thread *thread)
        accept_sock = THREAD_FD(thread);
 
        /* Reregister myself. */
-       zebra_event(ZEBRA_SERV, accept_sock, NULL);
+       thread_add_read(zebrad.master, zebra_accept, NULL, accept_sock, NULL);
 
        len = sizeof(struct sockaddr_in);
        client_sock = accept(accept_sock, (struct sockaddr *)&client, &len);
@@ -3004,26 +3190,7 @@ void zebra_zserv_socket_init(char *path)
 
        umask(old_mask);
 
-       zebra_event(ZEBRA_SERV, sock, NULL);
-}
-
-
-static void zebra_event(enum event event, int sock, struct zserv *client)
-{
-       switch (event) {
-       case ZEBRA_SERV:
-               thread_add_read(zebrad.master, zebra_accept, client, sock,
-                               NULL);
-               break;
-       case ZEBRA_READ:
-               client->t_read = NULL;
-               thread_add_read(zebrad.master, zebra_client_read, client, sock,
-                               &client->t_read);
-               break;
-       case ZEBRA_WRITE:
-               /**/
-               break;
-       }
+       thread_add_read(zebrad.master, zebra_accept, NULL, sock, NULL);
 }
 
 #define ZEBRA_TIME_BUF 32
index 4f0f5b0461f8e0b3f35ec34247ccbe4b58e3a714..62707510c2ef79547d87fbcaeee7cab4f9174faf 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "zebra/zebra_ns.h"
 #include "zebra/zebra_pw.h"
+//#include "zebra/zebra_pbr.h"
 
 /* Default port information. */
 #define ZEBRA_VTY_PORT                2601
@@ -46,8 +47,12 @@ struct zserv {
        int sock;
 
        /* Input/output buffer to the client. */
-       struct stream *ibuf;
-       struct stream *obuf;
+       struct stream_fifo *ibuf_fifo;
+       struct stream_fifo *obuf_fifo;
+
+       /* Private I/O buffers */
+       struct stream *ibuf_work;
+       struct stream *obuf_work;
 
        /* Buffer of data waiting to be written to client. */
        struct buffer *wb;
@@ -128,6 +133,10 @@ struct zserv {
        int last_write_cmd;
 };
 
+#define ZAPI_HANDLER_ARGS                                                      \
+       struct zserv *client, struct zmsghdr *hdr, struct stream *msg,         \
+               struct zebra_vrf *zvrf
+
 /* Zebra instance */
 struct zebra_t {
        /* Thread master */
@@ -178,9 +187,13 @@ extern int zsend_pw_update(struct zserv *, struct zebra_pw *);
 extern int zsend_route_notify_owner(struct route_entry *re, struct prefix *p,
                                    enum zapi_route_notify_owner note);
 
+struct zebra_pbr_rule;
+extern void zsend_rule_notify_owner(struct zebra_pbr_rule *rule,
+                                   enum zapi_rule_notify_owner note);
+
 extern void zserv_nexthop_num_warn(const char *, const struct prefix *,
                                   const unsigned int);
-extern int zebra_server_send_message(struct zserv *client);
+extern int zebra_server_send_message(struct zserv *client, struct stream *msg);
 
 extern struct zserv *zebra_find_client(u_char proto, u_short instance);