--- quagga-0.99.9/bgpd/bgp_open.h 2007-08-06 08:17:45.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/bgpd/bgp_open.h 2008-06-02 09:23:52.000000000 -0700 @@ -44,7 +44,12 @@ struct capability_orf_entry struct { u_char type; u_char mode; +#if ( __GNUC__ == 2) + // did not compile in FreeBSD, gcc 2.95.4 + } orfs[0]; +#else } orfs[]; +#endif } __attribute__ ((packed)); #pragma pack() @@ -58,7 +63,12 @@ struct graceful_restart_af struct capability_gr { u_int16_t restart_flag_time; +#if ( __GNUC__ == 2) + // did not compile in FreeBSD, gcc 2.95.4 + struct graceful_restart_af gr[0]; +#else struct graceful_restart_af gr[]; +#endif }; /* Capability Code */ --- quagga-0.99.9/bgpd/bgp_route.c 2007-08-26 15:44:52.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/bgpd/bgp_route.c 2008-06-02 09:23:52.000000000 -0700 @@ -5802,9 +5803,16 @@ route_vty_out_tag (struct vty *vty, stru #ifdef HAVE_IPV6 else if (p->family == AF_INET6) { +/* gcc-2.95 won't let asserts before array declarations */ +#if ( __GNUC__ > 2) assert (attr->extra); +#endif char buf[BUFSIZ]; char buf1[BUFSIZ]; +/* Move it here */ +#if ( __GNUC__ == 2) + assert (attr->extra); +#endif if (attr->extra->mp_nexthop_len == 16) vty_out (vty, "%s", inet_ntop (AF_INET6, &attr->extra->mp_nexthop_global, --- quagga-0.99.9/configure 2007-09-07 09:54:55.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/configure 2008-06-02 09:23:53.000000000 -0700 @@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Quagga' PACKAGE_TARNAME='quagga' -PACKAGE_VERSION='0.99.9' -PACKAGE_STRING='Quagga 0.99.9' +PACKAGE_VERSION='0.99.9-ospfv3-manetmdr-2008-06-02' +PACKAGE_STRING='Quagga 0.99.9-ospfv3-manetmdr-2008-06-02' PACKAGE_BUGREPORT='http://bugzilla.quagga.net' ac_unique_file="lib/zebra.h" @@ -21323,6 +21323,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #include <$ac_header> @@ -21415,6 +21418,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif @@ -22871,6 +22877,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -22996,6 +23005,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -27698,6 +27710,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -27803,6 +27818,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -28397,6 +28415,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -29338,6 +29359,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -29481,6 +29505,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -29624,6 +29651,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -29767,6 +29797,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -29910,6 +29943,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -30053,6 +30089,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -30196,6 +30235,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -30339,6 +30381,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -30482,6 +30527,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -30625,6 +30673,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -30768,6 +30819,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -30911,6 +30965,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31054,6 +31111,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31199,6 +31259,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31320,6 +31383,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31464,6 +31530,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31585,6 +31654,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31729,6 +31801,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31850,6 +31925,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -31994,6 +32072,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -32115,6 +32196,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -32259,6 +32343,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -32380,6 +32467,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -32524,6 +32614,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -32645,6 +32738,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -32791,6 +32887,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -32932,6 +33031,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -33866,6 +33968,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include @@ -34178,6 +34283,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif #if HAVE_NET_IF_H # include --- quagga-0.99.9/configure.ac 2007-09-07 09:54:01.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/configure.ac 2008-06-02 09:23:53.000000000 -0700 @@ -8,7 +8,7 @@ ## $Id: configure.ac,v 1.139 2007/09/07 16:54:01 paul Exp $ AC_PREREQ(2.53) -AC_INIT(Quagga, 0.99.9, [http://bugzilla.quagga.net]) +AC_INIT(Quagga, 0.99.9-ospfv3-manetmdr-2008-06-02, [http://bugzilla.quagga.net]) AC_CONFIG_SRCDIR(lib/zebra.h) dnl ----------------------------------- @@ -416,6 +416,9 @@ m4_define([QUAGGA_INCLUDES], #if HAVE_NETINET_IN_H # include #endif +#if HAVE_NET_IF_H +# include +#endif ])dnl AC_CHECK_HEADERS([sys/un.h net/if.h netinet/in_systm.h netinet/in_var.h \ Binary files quagga-0.99.9/doc/imp_sim.pdf and quagga-0.99.9.ospfv3-manetmdr.tmp/doc/imp_sim.pdf differ --- quagga-0.99.9/doc/Makefile.am 2007-03-23 03:53:56.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/doc/Makefile.am 2008-06-02 09:23:51.000000000 -0700 @@ -46,7 +46,8 @@ quagga.pdf: $(info_TEXINFOS) $(figures_p $(TEXI2PDF) -o "$@" $< quagga_TEXINFOS = appendix.texi basic.texi bgpd.texi filter.texi install.texi \ - ipv6.texi kernel.texi main.texi ospf6d.texi ospfd.texi overview.texi \ + ipv6.texi kernel.texi main.texi ospf6d.texi \ + ospf6d-manet.texi ospf6d-af.texi ospfd.texi overview.texi \ protocol.texi ripd.texi ripngd.texi routemap.texi snmp.texi \ vtysh.texi routeserver.texi defines.texi $(figures_png) snmptrap.texi \ $(figures_txt) --- quagga-0.99.9/doc/Makefile.in 2007-09-07 09:54:56.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/doc/Makefile.in 2008-06-02 09:23:51.000000000 -0700 @@ -264,7 +264,8 @@ figures_txt := $(figures_names_parts:%=f BUILT_SOURCES = defines.texi info_TEXINFOS = quagga.texi quagga_TEXINFOS = appendix.texi basic.texi bgpd.texi filter.texi install.texi \ - ipv6.texi kernel.texi main.texi ospf6d.texi ospfd.texi overview.texi \ + ipv6.texi kernel.texi main.texi ospf6d.texi ospf6d-manet.texi \ + ospf6d-af.texi ospfd.texi overview.texi \ protocol.texi ripd.texi ripngd.texi routemap.texi snmp.texi \ vtysh.texi routeserver.texi defines.texi $(figures_png) snmptrap.texi \ $(figures_txt) --- quagga-0.99.9/doc/Makefile.no_doc 1969-12-31 16:00:00.000000000 -0800 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/doc/Makefile.no_doc 2008-06-02 09:23:51.000000000 -0700 @@ -0,0 +1,8 @@ +all: + echo "done" +clean: + echo "done" +distclean: + echo "done" +install: + echo "done" --- quagga-0.99.9/doc/ospf6d-af.texi 1969-12-31 16:00:00.000000000 -0800 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/doc/ospf6d-af.texi 2008-06-02 09:23:51.000000000 -0700 @@ -0,0 +1,119 @@ +@node OSPFv3 Address Families +@chapter OSPFv3 Address Families + +The following text describes the implementation of a mechanism for supporting +multiple address families in OSPFv3 using multiple instances. It +maps an address family (AF) to an OSPFv3 instance using the Instance ID +field in the OSPFv3 packet header. This approach is fairly simple +and minimizes extensions to OSPFv3 for supporting multiple AFs. + +This implementation also enables OSPF MANET to support IPv4 routing (next +chapter). + +@menu +* Overview-AF:: +* Enabling OSPF-AF:: +* Configuring OSPF-AF:: +* Running OSPF-AF:: +* Open Issues:: +@end menu + +@node Overview-AF +@section Overview + +For now, please see Section 2 of @uref{http://tools.ietf.org/html/draft-ietf-ospf-af-alt-05,, draft-ietf-ospf-af-alt-05}. + +@subsection Draft compliance +Support of Address Families (AF) in OSPFv3 is supported according to +@uref{http://tools.ietf.org/html/draft-ietf-ospf-af-alt-05,, draft-ietf-ospf-af-alt-05}. + +@subsection License and Contributing Code +This software builds on two projects (GTNetS and quagga) that are under +GNU General Public License (GPL). Our modifications are also under GPL. +Therefore, please consider this simulator as GPL'ed software. + +We would like to encourage people to send in bug fixes, extensions, +or to make their simulation scripts available (that produce their +simulation results). By default, we will not include any contributed +code, bug fixes, or patches unless you specify that you want to include +said code in our future releases of this simulator (also under GPL). + +@node Enabling OSPF-AF +@section Enabling OSPF-AF + +Address families is enabled by compiling the flag @code{OSPF6_AF} into the +source code. +By default this flag is compiled into the code. It must be removed from +configure.ac and config.h.in. + +All modified code is found in the directories lib/, zebra/, and ospf6/. +Each modification is flagged with the tag "OSPF6_AF". + +@node Configuring OSPF-AF +@section Configuring OSPF-AF + +Address Families can be configured in one of two ways. + +1. Add the following lines to the ospf6d.conf file + +@verbatim + interface + ipv6 ospf6 instance-id <0-255> +@end verbatim + +2. From the vtysh or telnet terminal type: +@verbatim + > conf t + > interface + > ipv6 ospf6 instance-id <0-255> + > exit + > exit +@end verbatim + +The value of the instance ID should one of the four ranges below. The most +comman ranges are 0 to 31 for unicast IPv6 routing (standard OSPFv3) and +64 to 95 for IPv4 unicast routing. +@verbatim + Instance ID # 0 - # 31 IPv6 unicast AF + Instance ID # 32 - # 63 IPv6 multicast AF + Instance ID # 64 - # 95 IPv4 unicast AF + Instance ID # 96 - # 127 IPv4 multicast AF + Instance ID # 128 - # 255 Unassigned +@end verbatim + +NOTE: The instance-id must be the same on all interfaces. Different Address +Families cannot be used within the same ospf6d process. The router will +fail if different ranges are used. + + +@node Running OSPF-AF +@section Running OSPF-AF + +From a vtysh or telnet terminal type: + +@verbatim +> show ipv6 ospf6 route +@end verbatim + +This should display the OSPFv3 routes. If IPv4 AFs are used then the +route will appear as an IPv6 route with zeros before the IPv4 route. +Next, type the following command for IPv4 or IPv6 + +@verbatim +> show ip route +> show ipv6 route +@end verbatim + +The entries with the "*" are going to be installed in the kernel routing +table. If these tables are correct then the kernel routing table +should be correct. + +@node Open Issues +@section Open Issues + +Enable different AFs to run in the same ospf6d instance. This would require +a IETF draft changes and a sepeartion of LSAs within the database. + +Known Issue: if instance IDs are not consistent on the interfaces then +routing will fail. + --- quagga-0.99.9/doc/ospf6d-gtnets.texi 1969-12-31 16:00:00.000000000 -0800 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/doc/ospf6d-gtnets.texi 2008-06-02 09:23:51.000000000 -0700 @@ -0,0 +1,1128 @@ +This section describes the implementation of MANET extensions to OSPFv3 +as an extension to the @code{quagga}@footnote{http://www.quagga.net} +OSPFv3 routing daemon and the Georgia Tech Network Simulator +(GTNetS).@uref{http://www.ece.gatech.edu/research/labs/MANIACS/GTNetS/,,www.ece.gatech.edu/research/labs/MANIACS/GTNetS/} +@ref{fig:sim_imp} illustrates how the same quagga software is +supported in an actual quagga implementation and also wrapped within the +GTNetS simulation framework; this enables moving between implementation +and simulation with the same code base, just by changing some compilation +flags. + +@float Figure,fig:sim_imp +@iftex +@image{imp_sim,8in,,,.pdf} +@end iftex +@caption{Architecture of Simulation and Implementation} +@end float + +This packet-level, discrete-event simulator has the following features: +@itemize +@item OSPFv3 for IPv6 based on recent @code{quagga} software +(version 0.99.9). +@item Support for enabling a proposal known as @strong{ MANET Designated Routers}, +contributed by Richard Ogier and Phil Spagnolo @uref{http://tools.ietf.org/html/draft-ietf-ospf-manet-mdr,,draft-ietf-ospf-manet-mdr} . +@item (slightly modified) 802.11 and wired channel models +@item detailed logging and tracing of simulation events, including all +quagga daemon logging +@end itemize + +We have not removed any features of GTNetS, which are described elsewhere +in the GTNetS documentation, or @code{quagga}, although we note that only +OSPFv3 is supported in the simulation (the full @code{quagga} routing daemon +is available if run as implementation code). Here, we focus on the types +of OSPF MANET simulations that we have done with this simulator. + +The next section describes the details for using this software in +@emph{simulation} mode. + +@subsection Simulation + +@subsubsection Patching the Quagga source code +Before using the simulator you must hook GTNetS and Quagga together. +Follow the following steps: +@itemize +@item Obtain the GTNetS and Quagga source code. +@item Obtain the MANET-MDR GTNetS for Quagga: quagga-0.99.9.ospfv3-manetmdr-gtnets.patch +@item Patch the source code: @code{patch -p1 < quagga-0.99.9.ospfv3-manetmdr-gtnets.patch} +@item Run @code{./configure} in the quagga directory +@item Comment out #define VERSION "0.99.9" in config.h +@item In GTNetS create a smybolic link to quagga in the SRC directory. EX: ln -s ~/quagga-0.99.9/ ~/gtnets/SRC/quagga +@end itemize + +@anchor{Building the Simulator} +@subsubsection Building the Simulator + +These instructions assume that you are using a recent distribution +of Linux. Other *nix variants probably work also, but haven't been tested. +@footnote{GTNetS has been compiled successfully on Linux with +g++-2.96, g++-3.3, Microsoft Windows with MSVC-7.0, and Sun Solaris with +SUNWS-CC version??. However, we have not tested anything except gcc-3.3.3 +since we did the OSPF MANET extensions. We observed a compilation problem +with the newer Fedora Core 3 distribution, which uses gcc-3.4-- contact +us if you need a patch to the file cpqtr.h to make that compiler work.} + + +There are two ways to build the simulator: optimized, and with debugging +symbols. Optimized runs slightly faster. To build, cd into the top level +GTNetS directory, and follow the README. To build everything: +@verbatim +make clean +make depend +make all +@end verbatim +Making "all" builds both an optimized and debugging (with debugging symbols) +binary of each test file. The optimized runs a bit faster. +There are other options in the Makefile to build subsets of the scripts. +For example, to start compilation over and build only the optimized +version of what is in the ietf directory: +@verbatim +make clean +make depend +@end verbatim +@code{make}~~ @emph{target}@code{-}@emph{type} + +@ref{Table: Targets and Types} displays how various +targets (example scripts, +ietf scripts, or validation scripts) can be combined +with the two options for build type (optimized or with debugging symbols). +For example, to compile only the scripts (programs) in the validation +directory, and only for optimized binaries, use @code{make valid-opt}. + +@anchor{Table: Targets and Types} +@float +@multitable @columnfractions .5 .5 +@headitem Possible @emph{targets} @tab Possible @emph{types} +@item examples @tab opt +@item ietf @tab opt or dbg +@item valid @tab opt +@end multitable +@caption{Various ways to combined Targets and Types} +@end float + + +@subheading Qt animation option +A default requirement is the Qt libraries from Trolltech. These are typically +included in Linux distributions if you use KDE. These are used if you +want to look at animations (e.g. @code{testwirelessgrid1.cc} in the +@code{EXAMPLES/} directory). + + +An alternative to configuring and installing a Qt distribution, if you +do not care about animation, is to comment +out the inclusion of the QT configuration script in the toplevel and +sub directory makefiles. + + +@code{include mk/qtcheck.mk} + + +This will allow building without Qt. + + +@strong{ Note:} If you are using Fedora Core 2 or something very recent, you might +have a multithreaded version of Qt installed. Even though Qt works, you +don't have the right header files for GTNetS compilation. In this case, +we suggest the following: + +@itemize +@item install the source package @code{qt-x11-free-3.3.3} in +the directory @code{/usr/local/src} +@item make a symbolic link @code{ln -s /usr/local/src/qt-x11-free-3.3.3 /usr/local/qt3} +@item when you @code{make examples-dbg}, you need to pass in the QTDIR environment variable as such: @code{make examples-dbg QTDIR=/usr/local/qt3/} +@end itemize + +@subsubsection Running the Simulator +Example simulation executables are stored in the EXAMPLES directory. Versions +that are built with debugging symbols contain the suffix "-dbg", and for +optimized, the suffix "-opt". + +Executables that we have been using are stored in the following directories: +@itemize +@item @code{ietf/random_waypoint_manet/} and +@item @code{ietf/link_matrix_manet}. +@end itemize + +Try running an example script such as +@code{ietf/random_waypoint_manet/random_waypoint_manet-opt}. +It should leave a +@code{random_waypoint_manet.stat} file, and print runtime +progress to standard output. + +The files in the @code{SRC/} directory are built as a library +@code{libGTNetS-debug.a,so} or +@code{libGTNetS-opt.a,so}. This +library is linked to whatever test program you are using. +The typical GNU debugger @code{gdb} can be used to debug if debugging +symbols are present. + +@subsubsection Configuring the Simulator + +This chapter describes common command-line interface configuration options, +and then walks through a sample program in Section @ref{Example Test Program}. + +@subheading Compile-Time Options +The default Makefile in the top level directory contains the following +compile-time options (the defaults enabled are shown below): +@verbatim +# To run OSPF6D, enable: +CFLAGS += -pg -fPIC -D$(OSNAME) +# The below defines provide general support for the MANET extensions +CFLAGS += -DETRACE -DETRACE_DEBUG +CFLAGS += -DGTNETS_REPLACE_SCHEDULER -DREPEATABLE_MOBILITY -DETHERNET_BOEING +CFLAGS += -DBOEING_ARGS +CFLAGS += -DMANET +# To add TDMA USAP, add the following: +CFLAGS += -DUSAP_ADDON +# Needed by quagga +CFLAGS += -DHAVE_CONFIG_H -DSYSCONFDIR="/usr/local/etc/quagga" + +# Flags to enable modified basic quagga behavior +CFLAGS += -DBUGFIX +CFLAGS += -DOSPF6_CONFIG +#Address Families +CFLAGS += -DOSPF6_AF +#Redistribution improvements +CFLAGS += -DREDISTRIBUTION +# To run OSPF MDR, add the following: +CFLAGS += -DOSPF6_MANET_MDR +CFLAGS += -DOSPF6_MANET_DIFF_HELLO +CFLAGS += -DOSPF6_DELAYED_FLOOD +CFLAGS += -DOSPF6_DD_OPT +#GTNETS Specific +CFLAGS += -DGTNETS +CFLAGS += -DGTNETS_ETRACE_STAT +CFLAGS += -DGTNETS_REPLACE_SCHEDULER +CFLAGS += -DOSPF6_JITTER +@end verbatim + +For many of these options, the above flags just enable support for the +extension but don't automatically turn them on. For example, to enable +Differential Hellos in a particular script, you need to do two things: +@itemize +@item enable @code{-DOSPF6_MANET_DIFF_HELLO} in the top-level Makefile +@item set the ospf6_inst interface variable "diff_hellos" to "true". +For an example of how to do this, see the +@code{random_waypoint_maney.cc} program; by appending +"diff_hellos" at the command line, it will enable differential hellos +with the follwoing code snippet: +@verbatim + ospf6_inst->SetInterfaceDiffHellos(*it, ca.diff_hellos); +@end verbatim +@end itemize + +Below, we discuss how these options can be selectively enabled and +disabled once they are compiled in. + +@subheading Configuring the Basics +The number of nodes in the MANET can set at the command line. By default, +20 nodes are used. The size of the square topology can be set at the command +line. By default, the topology is 500 meters by 500 meters. +The location of the nodes is defined by a random generator of x and y +coordinates with the max and min values being the size of the topology. +GTNetS provides various random variable types, so the distribution of node +positions can be changed by chaning the random variable in +@code{WirelessGridRectangular()}. + +GTNetS also has the ability to set the shape of the grid. Shapes are +found in documentation. We have only experimented with rectangular and +polar. + +The time at which the simulator is stopped can be configured by changing +the stop time at the command line. +However, if this value is set below start time then Ospfv3 +routers will never fully come up. A start time delay is useful to avoid +synchronization of Ospfv3 routers and to give the routers time to initialize +before staistics are collected and data is sent. + +@subheading Configuring Wireless Behavior +The Wireless mode is defined by the WirelessGrid constructor. See the +GTNetS documentation for further configuring the wireless model. +Mobility is set to random waypoint. The random waypoint pause and velocity +can be set at the command line. + +@subheading onfiguring OSPFv3 +Ospfv3 in GTNetS can be configured in any way that the Quagga +implementation can be configured. We have passed a select few of these +parameters from quagga into GTNetS. +The GTNetS Ospfv3 configuration functions write the configuration to a +standard quagga config file. A sample quagga config file is seen +at gtnets/SRC/quagga/ospf6d/ospf6d.conf. + +The GTNetS per Ospfv3 interface paramters are seen in Subsection +@ref{Ospf6 per Interface Configuration} and +@ref{Ospf6 per Interface Type Configuration}. +The most important parameter to set for wireless interface testing is +the interface type. Currently, two wireless interface types +are available, point-to-multipoint and manet-designated-router. The wireless +interface type can be modified at the command line by selecting 0 for +ptmp and 1 for manet. Differential hellos can be enabled on the manet +interface at the command line. + +The value of the hello interval can be changed from 2 seconds by +changing @code{HelloInteval}. The neighbor dead interval can be changed +from 6 seconds by changing @code{DeadInterval}. The +retransmit interval can be modified from the command line. The per +interface routing cost can be modified by changing @code{cost}. By default, +the interace cost is set to 1. + +Two additional parameters were added to GTNetS. +We added the ability to jitter all the Ospfv3 packets. The amount of +jitter is uniformally distributed between zero and @code{interface_jitter}. +The default jitter is 100 msec. In addition, we added a paramter to delay +the sending of LSAs. This enables us to coalesce LSAs in fewer LSUs. +The delay is by default 100 msec, and it can be changed by modifying +@code{interface_flood_delay}. + +@subheading Configuring Data Traffic +All scenarios that we have configured use CBR data traffic. +The level of traffic is configured on a network wide basis, so the same +load of data traffic is produced for any number of nodes when the +packet rate and packet size are fixed. The traffic +load can be configure on the command line by setting pktrate and +pktsize. The default packet rate is 10 packets per second, and the +packet size is 40 bytes. +All data to wireless nodes must be sent to their loopback addresses. +The loopback addresses on wireless nodes has been configured to be +0.0.RouterId.0/24. + +@subheading Example Test Program +@anchor{Example Test Program} + +This sample program, @code{ietf/random_waypoint_manet/random_waypoint_manet.cc}, +creates a scenario a simple randomly moving MANET. +The scenario consists of N mobile nodes in a L meter square grid. +Nodes move according to the random waypoint model where each node selects a +destination within the grid and a velocity between 0 and V m/s. +The node then moves to the destination, pauses for P seconds, +selects a new destination and velocity, and repeats the process. +Each node is a router and has a wireless interface with an +802.11b or TDMA radio at a carrier rate of 11Mbps. +Each router also has a loopback +interface. Each host generates constant bit rate (CBR) traffic to every other +node by sending periodic B byte packets at a packet rate of R pkt/sec. +Each simulation trial is M minutes long, of which the first D minutes of data +is discarded; each OSPF router is started at a random time in the +first D minutes. The wireless interface can be configured to use OSPFv3 +routing with either a point-to-multipoint or manet interface. + +@subheading Include Files +Necessary include files are listed below. + + +File application-cbr.h is for CBR traffic generation. +File args.h is used for processing command line input. +File ipaddr.h is a class for ipv4 addresses. +File mobility-random-waypoint.h provides random waypoint mobility. +File node.h is the base class for nodes. +File rng.h is for random variable operations. +File simulator.h is the base simulator class for GTNetS. +File validation.h is the method to parse command line input used by GTNetS. +File wireless-grid-rectangular.h is responsible for the number of nodes in the MANET, network topology, and wireless interface configuration. +File wlan.h supports a wireless link layer. +These last three files were developed by Boeing. +File application-ospf6d.h is the main driver of quagga ospf6d. +File etrace.h provides packet level tracing. +File estat.h provides global statistics. + +@verbatim +// Copyright 2004, The Boeing Company +#include +#include + +#include "application-cbr.h" +#include "application-ospf6d.h" +#include "args.h" +#include "estat.h" +#include "etrace.h" +#include "ipaddr.h" +#include "mobility-random-waypoint.h" +#include "node.h" +#include "rng.h" +#include "simulator.h" +#include "validation.h" +#include "wireless-grid-rectangular.h" +#include "wlan.h" +@end verbatim + +@subheading Set Seeds Function +@anchor{Set Seeds Function} +The function @code{set_global_seeds()} is used to set GTNets global seeds from +a single seed. When GTNets global seeds are set, results are repeatable when +rerunning a scenario with the same seed. The seed should be set greater than +or equal to one. +@verbatim +void set_global_seeds(int seed) +{ + // turn one seed into 6 repeatable seeds in the simulator using srand() + unsigned long seeds[6]; + srand(seed); + + seeds[0] = rand(); + seeds[1] = rand(); + seeds[2] = rand(); + seeds[3] = rand(); + seeds[4] = rand(); + seeds[5] = rand(); + + Random::GlobalSeed(seeds[0],seeds[1],seeds[2],seeds[3],seeds[4],seeds[5]); +} +@end verbatim + +@subheading Main Function Initialization +The start of the @code{main()} function begins in this subsection. +Here the objects in the main function are initialized. +@code{Validation::Init()} is used to set seeding, animation, +and tracing in GTNetS. The function, @code{set_ospf6_config_arguments} +sets all the default values used for ospf and stores them in +@code{ca}. Execute @code{random_waypoint_manet-opt,dbg -h} at +the command line to see the default values. Default values are +set in @code{args.cc}. +The function, @code{set_global_seeds()}, sets the +global seed by calling the function in Section @ref{Set Seeds Function}. + +@verbatim +int main(int argc, char** argv) +{ + struct ospf6_config_args ca; + Validation::Init(argc, argv); + Simulator s; + Interface *inter; + IFVec_t vInterface; + std::string tracefile, statfile; + char hostname[20], logfilename[20]; + IPAddr_t first_rtrid; + + // Default configuration arguments are located in SRC/args.cc file + if (!set_ospf6_config_arguments(argc, argv, &ca)) + return 0; + + set_global_seeds(seed); +@end verbatim + + +@subheading Output File Configuration +In this subsection, the tracefile and statfile names are set. If a tag was +defined at the command line, the tag string will be appended to the file +name. Stat files are ended with .stat and trace files are ended with .tr. +@verbatim + // If user specifies "tag=args", this means that the suffix appended + // to the .stat or .tr filename should be the concatenation of all command + // line arguments, e.g.: + // random-waypoint-mobility-opt-num_nodes=20.seed=72.stat + if (ca.tag == "args") { + ca.tag.erase(0,4); + for (int q = 1; q < argc; q++) { + if (!strcmp(argv[q],"tag=args") || + !strcmp(argv[q],"trace") || + !strcmp(argv[q],"etrace") || + !strcmp(argv[q],"ospfv3.log")) + continue; + ca.tag.append(argv[q]); + ca.tag.append("."); + } + ca.tag.erase(ca.tag.length()-1, 1); + } + + // Prepare output file names + tracefile.append(argv[0]); + tracefile.erase(tracefile.length()-4,4); //delete "-opt" or "-dbg" from name + statfile.append(argv[0]); + statfile.erase(statfile.length()-4,4); // delete "-opt" or "-dbg" from name + + // Make sure that output file names are less than 256 char limit + if ((statfile.length() + ca.tag.length() + 7) > 256) { + int overrun = statfile.length() + ca.tag.length() + 7 - 256; + ca.tag.erase(ca.tag.length()- overrun, overrun); + } + + if (ca.tag.size()) { + tracefile.append("."); + tracefile.append(ca.tag.c_str()); + } + tracefile.append(".tr"); + + if (ca.tag.size()) { + statfile.append("."); + statfile.append(ca.tag.c_str()); + } + statfile.append(".stat"); + + cout << statfile.c_str() << endl; + + // Capture command line arguments for logging purposes + for (int q = 0; q < argc; q++) { + argstring.append(argv[q]); + argstring.append(" "); + } +@end verbatim + +@subheading Topology Configuration +The topology of the network is configured in this subsection. +The ipv4 address of the wireless interface on node 0 is set to 10.0.0.1. +Each subsequent node's wireless interface will receive an address +incremented by 1 from the first. To use Ospfv3 with ipv4, the ip address +must be less than +128.0.0.0 because the first bit in the ipv4 address is used to indicate +a linklocal address when converting to an ipv6 addresses with ospfv3. +A square topology with the bottom left corner at location (0,0) and +sides @code{ca.grid_length} meters is created by +@code{WirelessGridRectangular()}. +The number of nodes is a constant defined by @code{ca.nNodes}. +The nodes are uniformly distributed on the square grid. +The wireless MAC layer is also specified in this function. +Random waypoint mobility is defined by fuction, +@code{AddMobility(RandomWaypoint())} if the velocity is greater that zero. +The nodes travel to a random location +with the topology at a speed uniformally distributed between 0 and +@code{ca.velocity} m/s. After reaching the destination, the node pauses for +@code{ca.pause_time} seconds and then moves again. +@verbatim + // ipv4 addresses must be less than 128.0.0.0 for ospf6 because we used + // the first bit in the ipv4 address to indicate a linklocal address + IPAddr_t firstIP = IPAddr("10.0.0.1"); + + Location l(0,0); // lower left corner of rectangular grid + + // Randomize the distribution of nodes uniformly on square grid + WirelessGridRectangular g(ca.mac_protocol, + l, + Constant(ca.nNodes), //number of nodes + Uniform(0.0, ca.grid_length), + firstIP); + + // Mobility: Pause time is second argument, velocity is third argument + if (ca.velocity > 0) + g.AddMobility(RandomWaypoint(g, Constant(ca.pause_time), + Uniform(0,ca.velocity))); +@end verbatim + +@subheading Tracing Configuration +Extended tracing is configured in this subsection. Exteneded tracing was +developed by Boeing and more specifics can be found in +Section @ref{Tracing}. By default, tracing is disabled. +If tracing is enbabled at the command line then the tracefile is opened. +Extended tracing is also disabled by default. If it is enabled at the command +line then fuction, @code{SetExtended()}, enables extended tracing. +Extended tracing adds more detail to the basic packet level tracing. + +The ability to turn off tracing of a specified layer is provided by +function, @code{LayerOff()}. By default, all layers are enabled. +Finally, additional events can be written to the tracefile. +Events are used to display information or statistics not seen in packet level +tracing. The function, @code{SetTraceEventLevel()}, sets the verbosity of +events to display. A value of zero means no event tracing. +@verbatim + // Per-packet tracing configuration + if (ca.trace) { + ETrace* egs = ETrace::Instance(); + egs->Open(tracefile.c_str()); + if (ca.etrace) + egs->SetExtended(true); + egs->LayerOff(1); //don't etrace this layer + egs->LayerOff(2); //don't etrace this layer + egs->SetTraceEventLevel(2); + } +@end verbatim + +@subheading Statistics Configuration +The collection of statistics is initialized in this subsection. By default, +statistics are disabled. If statistics are enbaled at the command line then +statistics begin to be collected at @code{start_time} seconds, and +the results are output to the statistics file. + +@verbatim + // Statistics collection + EStat* estat = EStat::Instance(); + estat->CollectEStats(statfile.c_str(), ca.start_time); + estat->LayerOff(1); + estat->LayerOff(2); +@end verbatim + +@subheading Ospf6 and CBR Intitialization +The intitilization of Ospfv3 routing and CBR traffic is performed in this +subsection. The OSPF6DApplication must be created to run ospf6. The collection +of Ospfv3 stats is configured by @code{CollectStats()}. The rate of +monitoring the physical layer neighbors is set by function, +@code{LogNeighbors}. These physical neighbor statistics are printed +in the statistics file. The first router id indicates the id assigned +to the first node to have an OSPF6DInstance. +The rate of the cbr application is set so the whole MANET network generates +@code{pktrate} packets per second, each of @code{pktsize} bytes. +To avoid synchronization, the cbr traffic is started at a random time +within the packet send interval. +@verbatim + // OSPF6 initialization + OSPF6DApplication ospf6d; + ospf6d.CollectStats(statfile.c_str(), argstring.c_str(), ca.start_time); + ospf6d.LogNeighbors(0.5); // Log physical layer neighbors every 500 ms + + OSPF6DInstance *ospf6_inst; + Uniform u(0,ca.start_time); + first_rtrid = IPAddr("0.0.0.1"); + + // CBR traffic initialization + IPAddr remoteIP; + char buf[32]; + Rate_t rate_bps = ((Rate_t)ca.pktrate * ca.pktsize * 8) / + (ca.nNodes*(ca.nNodes-1)); + // start traffic generators at a random time + Uniform cbrstart(ca.start_time-(double)(ca.pktsize*8)/rate_bps,ca.start_time); +@end verbatim + +@subheading Per Node Configuration +The start of a @code{for} loop that loops over all nodes is begun in this +subsection. Each nodes radio range is set to the identical value, +@code{radio_range}. +@verbatim + for (Count_t i = 0; i < g.Size(); ++i) + { + Node* n = g.GetNode(i); + n->SetRadioRange(ca.radio_range); +@end verbatim + +@subheading Ospf6 per Node Configuration +In this subsection, each node is given an ospf6 instance. Also, the +host name, log file name, and id of each router is set. +The MinLSInterval and MinLSArrival are set here. +The MinLSInterval is the minimum time between originating the same LSA. +The MinLSArrival is the minimum time in which a router will accept +the same LSA. +@verbatim + // OSPF6 Router Configuration + ospf6_inst = ospf6d.AddNode(n); + + sprintf(hostname, "ospf6_%d", n->Id()+1); + sprintf(logfilename, "log_ospf6_%d.log", n->Id()+1); + + ospf6_inst->SetHostName(hostname); + if (ca.ospfv3log) + ospf6_inst->SetLogFileName(logfilename); + ospf6_inst->SetRouterId(n->Id()+first_rtrid); + ospf6_inst->SetMinLSInterval(ca.MinLSInterval); + ospf6_inst->SetMinLSArrival(ca.MinLSArrival); +@end verbatim + +@subheading Ospf6 per Interface Configuration +@anchor{Ospf6 per Interface Configuration} +In this subsection, the interfaces per node are configured with ospf6 interface +specific parameters. The time between periodic hello sends on an interface +is set with +@code{SetInterfaceHelloInterval()}. The time interval when a +neighbor dies due to inactivity of hello reception is set by +@code{SetInterfaceDeadInterval()}. The interval to wait before retransmitting +an LSA is set by @code{SetInterfaceRetransmitInterval()}. +The time that a router waits to colesce LSAcks is set by +@code{SetInterfaceAckInterval}. The ospf6 area +this interface is on is set with @code{SetInterfaceArea()}. The ospf cost +of sending on this interface is set with @code{SetInterfaceCost()}. The max +jitter that is added to the sends of ospf6 packets is set with +@code{SetInterfaceJitter()}. The packet jitter can be thought of as queing +delay of @code{interface_jitter} msec before it is sending. Finally, the +time to wait to accumulate LSAs before flooding is set with +@code{SetInterfaceFloodDelay()}. +@verbatim + vInterface = n->Interfaces(); + for (IFVec_t::iterator it=vInterface.begin(); it!=vInterface.end(); ++it) + { + ospf6_inst->SetInterfaceHelloInterval(*it, ca.HelloInterval); + ospf6_inst->SetInterfaceDeadInterval(*it, ca.DeadInterval); + ospf6_inst->SetInterfaceRetransmitInterval(*it, ca.RxmtInterval); + ospf6_inst->SetInterfaceAckInterval(*it, ca.AckInterval); + ospf6_inst->SetInterfaceArea(*it, 0); + ospf6_inst->SetInterfaceCost(*it, ca.cost); + // too much jitter can cause stale ospf6 state to be sent + ospf6_inst->SetInterfaceJitter(*it, ca.interface_jitter); //msec + ospf6_inst->SetInterfaceFloodDelay(*it, ca.interface_flood_delay); //msec +@end verbatim + +@subheading Ospf6 per Interface Type Configuration +@anchor{Ospf6 per Interface Type Configuration} + +The type of interface is set based on the characteristics of the interface. +The interface type can be either point-to-multipoint, or MDR . +The time which +a Backup MANET Designated Router waits before flooding an LSA +is set by @code{SetInterfaceBackupWaitInterval()}. +MDRs have options for the level of +adjacency connectivity and and the fullness of the router LSAs. +The parameter alpha influences +the probability of a packet being received within the radio range. +When alpha = 1, all packets sent within radio range are received. +The loopback interface is set to Ospfv3 type loopback. +Then cbr traffic is sent from this node to the loopback address of +every other router. The cbr traffic starts just prior to @code{start_time} +seconds and ends at @code{stop_time - 5} seconds. +The start time is jittered so synchronization among routers is avoided. +Finally, all other interface are set to Ospfv3 type broadcast. In this +scenario there are no other interfaces, so this event will not occur. + +@verbatim + if ((*it)->GetL2Proto()->IsWireless()) + { + if(ca.w_int_type == 0) + ospf6_inst->SetInterfaceType(*it, "point-to-multipoint"); + else if (ca.w_int_type == 1) + { + ospf6_inst->SetInterfaceType(*it, "manet-designated-router"); + ospf6_inst->SetInterfaceDiffHellos(*it, ca.diff_hellos); + ospf6_inst->SetInterfaceBackupWaitInterval(*it,ca.BackupWaitInterval); + ospf6_inst->SetInterfaceTwoHopRefresh(*it, ca.TwoHopRefresh); + ospf6_inst->SetInterfaceHelloRepeatCount(*it, ca.HelloRepeatCount); + + if (ca.AdjConnectivity == 0) + ospf6_inst->SetInterfaceAdjConnectivity(*it, "fully"); + else if (ca.AdjConnectivity == 1) + ospf6_inst->SetInterfaceAdjConnectivity(*it, "uniconnected"); + else + ospf6_inst->SetInterfaceAdjConnectivity(*it, "biconnected"); + + if (ca.LSAFullness == 0) + ospf6_inst->SetInterfaceLSAFullness(*it, "minlsa"); + else if (ca.LSAFullness == 1) + ospf6_inst->SetInterfaceLSAFullness(*it, "mincostlsa"); + else if (ca.LSAFullness == 2) + ospf6_inst->SetInterfaceLSAFullness(*it, "mincost2lsa"); + else if (ca.LSAFullness == 3) + ospf6_inst->SetInterfaceLSAFullness(*it, "mdrfulllsa"); + else + ospf6_inst->SetInterfaceLSAFullness(*it, "fulllsa"); + } + if (i==0) + { + WirelessLink *l = (WirelessLink *) (*it)->GetLink(); + l->SetAlpha(ca.alpha); + } + } + else if (strcmp((*it)->GetName(), "lo") == 0) + { + ospf6_inst->SetInterfaceType(*it, "loopback"); + if (rate_bps > 0 && ca.pktsize > 0) + { + // CBR traffic from this router to all other router's loopback addr + for (Count_t j = 0; j < g.Size(); ++j) + { + if (i == j) + continue; + sprintf(buf, "0.0.%d.0", j+1); //loopback addr of routers + remoteIP = IPAddr(buf); + CBRApplication* cbr = (CBRApplication*) n->AddApplication( + CBRApplication(remoteIP,1000,NO_PORT,rate_bps,ca.pktsize)); + cbr->Start(cbrstart.Value()); + cbr->Stop(ca.stop_time - 5); + } + } + } + else + ospf6_inst->SetInterfaceType(*it, "broadcast"); + } +@end verbatim + +@subheading Setting Start and Stop Times +The Ospfv3 routers are started at a random time +between 0 and @code{start_time} seconds. This prevents Ospfv3 packets +from being synchronized. The simulation starts at time 0 and ends at +time @code{stop_time} seconds. +The progress is displayed at the command line every 40 seconds. +Simulations are commenced by function @code{Run()}. +@verbatim + ospf6_inst->Start(u.Value()); // random start time of each ospf6 router + } + s.StopAt(ca.stop_time); + s.Progress(40); + s.Run(); +} +@end verbatim + +@subheading Example Test Programs +@itemize +@item @strong{ ietf/initial/basic.cc}. This program, described above in +the example, runs a basic wireless network with Ospfv3 routing. +@item @strong{ ietf/random_waypoint_manet/random_waypoint_manet.cc}. +This program is similar to the basic.cc program, but it contains +many new updates. It includes support for using a TDMA MAC based on +the Unifying Slot Assignment Protocol (USAP). +@item @strong{ validation/sicds/basic/basic.cc} Performs validation of the +MDR algorithm. +@item @strong{ validation/sicds/pushback1/lsu_loss.cc} Performs validation +of an LSA being delayed after lossing the initial flood. +@item @strong{ validation/sicds/pushback2/lsack_loss.cc} Preforms validation +of losing an LSAck and then having the backupwait timer expire. +@item @strong{ validation/sicds/pushback3/lsu_loss_pushback_lsu_loss.cc} +Performs validation of an LSA being lost, having a node send out a +backupwait LSA and loose it, and then finally having another node +send a backupwait LSA. +@item @strong{ ietf/link_matrix_manet/link_matrix_manet.cc} Uses +an extension +to ethernet (known as link matrix) that allows the bringing up and down +of specifed links at particular times. +@item More scripts are included in the ietf and validation subdirectories. +Please contribute any interesting scripts. +@end itemize + +@subsubsection Simulation Output +There are two main ways to look at simulation output: +@enumerate +@item Explicit "tcpdump"-like tracing of packets to an output +file that can be post-processed later +@item Compilation of summary statistics that can be printed +out at the end of the simulation +@end enumerate + +GTNetS had a basic tracing capability, but we have extended it further +to print out more +detailed logging. This can be used to examine trace output for +correct or errored behavior (much like a tcpdump output file), +or can be fed into post-processing scripts to gather statistics. +The file would typically be called @code{testname.tr}. + +However, for large simulations, both the file size and the time +to parse the traces can become very large, so we also provide +a capability to dump summary statistics into a file at the end +of the simulation run (into a file typically called @code{testname.stat}). + +@subheading Tracing +@anchor{Tracing} + +@subheading How to Enable Tracing + +GTNetS has a built-in tracing facility based on the @emph{Trace} object. +We cloned that object class to create the Extended Trace, or @emph{ETrace} +object. Either, neither, or both Trace and ETrace can be enabled +on a particular script. + +@float Figure,f:tracescript +@verbatim + ETrace* egs = ETrace::Instance(); + egs->Open(""); +@end verbatim +@caption{Sample code to control tracing} +@end float + +@ref{f:tracescript} illustrates the basic C++ commands to +add to your testfile to enable tracing. This snippet creates an ETrace +object and associates it with a file. The filename can be anything +you want. The semantics are to overwrite (not append) any existing +file that may be at that location. + +@float Figure,f:tracescript2 +@verbatim + // Per-packet tracing configuration + if (ca.trace) { + ETrace* egs = ETrace::Instance(); + egs->Open(tracefile.c_str()); + if (ca.etrace) + egs->SetExtended(true); + egs->LayerOff(1); //don't trace this layer + egs->LayerOff(2); //don't trace this layer + egs->TraceTopo(ca.tracetopo); // trace topology every tracetopo seconds + egs->SetTraceEventLevel(2); + } +@end verbatim +@caption{Sample code to control tracing} +@end float + +@ref{f:tracescript2} shows how to control options on what is and isn't +traced. By default, all protocol layers on all nodes are traced. There are +a number of options to control this, however: + +@itemize +@item SetExtended(true|false). This will enable extended tracing, which +basically means to trace beyond the IP header and into the OSPF packet body. +Default is false. +@item SetEventTraceLevel(0|1|2). This controls the level of debugging +output for protocol events (non-packet events) put into the tracefile +(the higher the number, the more events that are logged). Level 1 adds +the following events: +@itemize +@item Count of OSPF packet drops and OTHER packet drops upon end of simulation +@item Information about the number of LSAs out of sync during database exchange +@item when a unicast LSU is sent +@item statistics on the number of neighbors of a node whenever a neighbor +change event occurs +@end itemize +Level 2 adds the following events: +@itemize +@item Prints out when the router started operation +@item Dumps relay selector lists +@item More information traced regarding neighbors changing state +@end itemize +@item LayerOff(n). This indicates that tracing at a particular protocol +layer is disabled. +@item NodeOff(n). This indicates that tracing at a particular node +is disabled. +@item TraceTopo(n). Enable the tracing of topology information every n +seconds. +@end itemize + + +@subheading Sample Tracefile + +@float Figure,f:tracefile +@verbatim +s 3599.97947 N12 -int 1 -pkt_id 1329237 -l3proto IPv4 -src 10.0.0.13 -dst 0.0.1 +4.0 -len 92 -ttl 64 -proto UDP +r 3599.97992 N8 -int 1 -pkt_id 1321800 -l3proto IPv4 -src 138.0.0.14 -dst 138.0 +.0.9 -len 56 -ttl 0 -proto OSPFv3 -type LSAck +r 3599.98195 N13 -int 1 -pkt_id 1329237 -l3proto IPv4 -src 10.0.0.13 -dst 0.0.1 +4.0 -len 92 -ttl 63 -proto UDP +@end verbatim +@caption{Sample tracefile excerpt, with sample 80-column wrap} +@end float + +@ref{f:tracefile} illustrates a sample tracefile excerpt from the +testwirelessospf.cc script. In this example, extended tracing is off, so +OSPF protocol parsing beyond the packet type is disabled. Each traceline +starts with a single character event code. The following event codes +are defined. +@itemize +@item @strong{ s}: Packet send event +@item @strong{ r}: Packet receive event +@item @strong{ f}: Packet forward event +@item @strong{ d}: Packet drop event +@item @strong{ c}: Packet collision event +@item @strong{ e}: Protocol event (non-packet event) +@item @strong{ n}: Node location and DR level(non-packet event) +@item @strong{ a}: Adjacency involving a DR_OTHER router (non-packet event) +@item @strong{ b}: Adjacency between (B)MDRs (non-packet event) +@end itemize +The next field is the node number, followed by a number of key-value pairs: +@itemize +@item @strong{ int}: Interface number that packet was seen on +@item @strong{ pkt_id}: Packet unique id +@item @strong{ l3proto}: Layer 3 protocol in use +@item @strong{ ...}: Other fields are probably self explanatory +@end itemize + +These trace lines will contain more information (expanded) if extended +tracing is enabled. + +@subheading Animating MDR Topology +@anchor{Animating MDR Topology} + +The topology of the OSPF-MDR interface can be displayed graphically +in the form of an animated "gif" file. The animated gif is created +by enabling topology tracing and by +post processing the tracing to form the "gif" file. The appropriate +trace lines are output by calling the function +@code{ETrace::TraceTopo()}. If one is using +@code{random_waypoint_manet.cc} then either @code{tracetopo=<>} or +@code{tracetopoonly=<>} are called from the command line. The input +parameter is the sampling rate in seconds. +The final step is to run +@code{gtnets/bin/tracetogif.pl} on the trace file. The usage of +@code{tracetogif.pl} can be determined by running it with no input +parameters. An example parameterization is shown here: +@code{./tracetogif.pl -stop 2000 -delay 200 trace.tr}. The following +would create an animated gif of the topology data between 1800 and +2000 secs, and it would shows snapshots of the topology every 2 seconds. + +@ignore +\begin{figure}[h] + \centerline{\psfig{figure=wospf-figures/bi.mdr.numnodes.100.eps,width=5.0in}} + \caption{@node{fig:mdranim}100 node OSPF-MDR topology with bi-connected + adjacencies and (B)MDR full LSAs} +\end{figure} +@end ignore + + +@subheading Statistics +@anchor{Statistics} + +To be able to turn off tracing for larger scenarios, we added some +counter-based statistics gathering. At present, this is turned on by +adding the following lines to a particular script: + +@float Figure,f:tracescript3 +@verbatim + //Extended Statistics Configuration + EStat* estat = EStat::Instance(); + estat->CollectEStats(statfilename, delay); + estat->LayerOff(1); + estat->LayerOff(2); + //Ospfv3 Statitistics Configuration + OSPF6DApplication ospf6d; + ospf6d.CollectStats(statfilename, delay); +@end verbatim +@caption{Sample code to control tracing} +@end float + +The output of the statistics will be deposited in the filename +specified, with a @code{.stat} suffix. + +Currently, EStat only generates statitics for UDP traffic, and all +Ospfv3 stats are generated by +@code{class OSPF6DApplication}. We did not use +GTNetS built-in Statistics class because that code is not compatible +with quagga. + +To add additional statistics to Ospfv3, the statistic name must be added +to the enumeration @code{ospf6_stats} in @code{ospf6_top.h}. Each of +these names are elements in the statistics array found in struct ospf6. +Next, the appropriate +place to count the statistic must be found, and the statisitic is counted +by incrementing the element in the array statistic. Statistics in struct +ospf6 are per node, so in the @code{application-ospf6d.cc} function +@code{OSPF6DApplication::ExtractStats()} the node stats are summed to create +global network stats. The final step in creating a new stat is to +add the printout of the value in the @code{application-ospf6d.cc} function +@code{OSPF6DApplication::PrintStats()}. + +@subheading Logging +@anchor{Logging} +Logging build into quagga Ospfv3 has been integrated with GTNetS, so the same +logging produced by quagga can be produced in GTNetS. +Quagga logging creates a seperate log for each router. +To use the logging in GTNetS, the log file for each node must be named +by calling the function @code{OSPF6Instance::SetLogFileName()}. +When this function is called, logging will be generated for LSAs, Hellos, +LSUs, LSAcks, LSRs, and Database Description packets. In addition, +logging will be generated for neighbor and interface changes. +The type of logging generated can be changed in @code{application-ospf6d.cc} +function @code{OSPF6DInstance::CreateConfFile()}. + +%% Note: Use two labels below for cross-referencing in two different reports + +@subsubsection Validation + +This section explains the validation of the OSPF modifications. +Our validation scripts serve two purposes: +@enumerate +@item Detection of code modifications that inadvertently break the correct +behavior of a protocol. +@item Isolation of particular protocol elements to ensure that they +are working correctly. +@end enumerate + +In this section, we first describe the general script that can be used +to detect changes to the behavior of protocols. We then follow +with some examples of how we validated the specific OSPF modifications. + +@subheading The "validate" Script +@anchor{The "validate" Script} + +There is a script called @code{validate} in the top level directory. +This script finds all executables in any subdirectories in the +@code{validation/} directory and executes them. +Each directory in @code{validation} +contains the validation driver, an expected trace file, and expected +stat file. +The @code{validate} script compares +the expected output with the current output. Any differences +are output to a diff file, and they are flagged as a @code{FAILURE} +at the command line. To run @code{validate} the environment variable +@code{GTNETS_HOME} must be set to GTNetS base directory. +This is very similar to how the ns-2 simulator validation works. + +The idea behind this is that if there are changes to the behavior of +the protocols covered by example scripts, then the validation output +will start to diverge from the known good output. The researcher +can then run the @code{validate} script to find out what scripts +are broken, examine the @code{diff} file produced, and determine +whether the source code is broken or whether the expected known +good output needs to be updated (for @code{validate} to pass in +the future). + +@subheading Basic Validation +@anchor{Basic Validation} + +Let's first look at a very simple network-- four OSPFv3 nodes fully +meshed on a broadcast-based subnet (e.g., Ethernet) but running +the multicast-capable point-to-multipoint (i.e., non-MANET) interface +type. We will use the "Matrix" channel, a prototypical script for +which can be found in +@code{ietf/link_matrix_manet/link_matrix_manet.cc}. "Matrix" channel is +intended to allow the packet delivery ratio between any pairwise +set of nodes to be altered, but the default is full mesh connectivity. + +This executable is built if the @code{ietf/} directory was +enabled; this can be done with, for example, @code{make ietf-opt}, +@code{make ietf-dbg}, etc. from the top level directory (see +@ref{Building the Simulator}). + +Let's assume that the "optimized" version of the binary has been +built. Type @code{./link_matrix_manet-opt -help} to see the list +of options and default values. + +We will run with most of the defaults. However, let's enable all +output tracing and logging, and set the number of nodes from its +default of 20 to just 4, and turn off the minimal user data traffic +by setting the packet rate to zero: +@code{./link_matrix_manet-opt num_nodes=4 pktrate=0 trace etrace ospfv3log} + +Next, type @code{more link_matrix_manet-opt.stat} to look at the statistics +file generated. This simulation ran for 3600 seconds, and statistics +were collected over the last 1800 seconds (total of 1800 seconds simulation +time). There is not much of interest to see; there were 720 Hello +messages (one Hello per node every 10 seconds for four nodes and 1800 seconds +yields 720 Hellos). There were 32 LSU packets sent, and (further +down in the statistics output) 48 "relay_flooded_LSAs". We will next +sanity check these results by looking at the output trace file. + +The detailed per-packet and per-event tracing can be found in the +@code{link_matrix_manet-opt.tr} file. Even for this small quiet network, +there are over 4500 lines of trace output generated. Grep for "Started" and +you should see something like: +@verbatim +e 31.41292 N1 Ospf6 Router Started +e 57.94125 N2 Ospf6 Router Started +e 1274.60552 N0 Ospf6 Router Started +e 1634.38450 N3 Ospf6 Router Started +@end verbatim +illustrating the starting times of each router for nodes 0 through 3 (the +event code "e" signifies that this is an implementation event and not a packet). + +For convenience, let's remove all Hello messages from the trace output: +@code{grep -v HELLO link_matrix_manet-opt.tr > output.tr}. Now, let's +look at the resulting @code{output.tr} file. We know that the +first router started up at time 31.4, so at around time 1831.4, there +should be some re-originated LSAs. This can be seen in the +@code{output.tr} file: +@verbatim +e 1831.41492 N1 Re-orig LSA Link -id 0.0.0.1 -advrt 0.0.0.2 -age 0 -seq 21474836 +50 -len 64 +e 1831.41492 N1 Schedule Flood LSA Link -id 0.0.0.1 -advrt 0.0.0.2 -age 0 -seq 2 +147483650 -len 64 from (null) +e 1831.41492 N1 Re-orig LSA Intra-Prefix -id 0.0.0.0 -advrt 0.0.0.2 -age 0 -seq2 +147483650 -len 72 +e 1831.41492 N1 Schedule Flood LSA Intra-Prefix -id 0.0.0.0 -advrt 0.0.0.2 -age0 + -seq 2147483650 -len 72 from (null) +s 1831.53392 N1 -int 1 -pkt_id 519 -l3proto IPv4 -src 138.0.0.2 -dst 224.0.0.5- +len 176 -ttl 1 -proto OSPFv3 -type LSU -len 156 -rid 0.0.0.2 -aid 0.0.0.0 -Num2 +-Lsa Link -id 0.0.0.1 -advrt 0.0.0.2 -age 1 -seq 2147483650 -len 64 -Lsa Intra-P +refix -id 0.0.0.0 -advrt 0.0.0.2 -age 1 -seq 2147483650 -len 72 +@end verbatim +The two LSAs (Intra-Prefix and Link) are generated, and sent in a single +LSU at time 1831.53392. Scrolling down in the tracefile, we can see +that nodes N0, N3, and N4 also receive and reflood this LSU. This accounts +for a total of 4 LSU transmissions, and there are 4 nodes that will +perform this reorigination, so this accounts for 16 of the LSUs, and +32 of the LSAs in the above cited statistics counts. Now, consider that +the Router LSAs are expiring at a different time, since they were +all changed after the fourth router originally came up. Therefore, each +node will generate an additional LSU, causing four LSU transmissions per +node (an additional 16 LSU transmissions and LSA floods) starting around +time 3435. This yields our counts of 32 LSU transmissions and 48 LSA +floods. + +Note that if there were a quagga implementation, output would be stored +in output logs; these should be now available in the @code{log} directory. + +@subheading Radio Range +@anchor{Radio Range} +The directory @code{validation/radio_range} contains some scripts used +to determine the radio range of the selected 802.11-based radios, based +on varying the distance between nodes. These scripts are not well-documented +at this time, but were used to check the radio behavior for different +parameterization. + +@subsection License and Contributing Code + +This software builds on two projects (GTNetS and quagga) that are under +GNU General Public License (GPL). Our modifications are also under GPL. +Therefore, please consider this simulator as GPL'ed software. + +We would like to encourage people to send in bug fixes, extensions, +or to make their simulation scripts available (that produce their +simulation results). By default, we will not include any contributed +code, bug fixes, or patches unless you specify that you want to include +said code in our future releases of this simulator (also under GPL). --- quagga-0.99.9/doc/ospf6d-manet.texi 1969-12-31 16:00:00.000000000 -0800 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/doc/ospf6d-manet.texi 2008-06-02 09:23:51.000000000 -0700 @@ -0,0 +1,368 @@ +@node OSPF-MANET +@chapter OSPF-MANET + +@command{OSPF-MANET} is a modification of OSPF version 3 (IPv6) for use +in mobile ad hoc networks (MANETs). OSPF for IPv6 is described in RFC2740. + +This chapter is a supplement to the main quagga (@uref{http://www.quagga.net}) +documentation. It describes the implementation, functionality, and usage +of OSPF-MANET and related extensions. + +@menu +* Overview-MANET:: +* Protocol Operation:: +* Enabling OSPF-MANET:: +* Building OSPF-MANET:: +* Configuring OSPF-MANET:: +* Running OSPF-MANET:: +* Use with Address Families:: +* OSPF-MANET Configuration Examples:: +* OSPFv3 Simulation with GTNetS +@end menu + +@node Overview-MANET +@section Overview + +OSPF-MANET can be built for typical quagga usage as a standalone router, +for support in virtual machines such as IMUNES, and within a discrete-event +network simulator. + +OSPF-MANET is defined for IPv6 (OSPFv3). With the addition of what is +known as the @emph{Address Families} patch, an instance of OSPF-MANET can +also be run to build IPv4 routes. Note that to get both IPv4 and IPv6 routing, +two instances of OSPFv3 must be running, as presently defined by the draft +standard. + +OSPF-MANET is distributed as a series of patches against a mainline +quagga distribution. The Boeing server is located at +@uref{http://hipserver.mct.phantomworks.org/ietf/ospf/}. + +@subsection Draft compliance + +@uref{http://tools.ietf.org/html/draft-ietf-ospf-manet-mdr,,draft-ietf-ospf-manet-mdr-01} +The implementation currently excludes some optional capabilities. This +includes the MDR-Metric TLV. + +@subsection License and Contributing Code +This software builds on two projects (GTNetS and quagga) that are under +GNU General Public License (GPL). Our modifications are also under GPL. +Therefore, please consider this simulator as GPL'ed software. + +We would like to encourage people to send in bug fixes, extensions, +or to make their simulation scripts available (that produce their +simulation results). By default, we will not include any contributed +code, bug fixes, or patches unless you specify that you want to include +said code in our future releases of this simulator (also under GPL). + +@subsection Contributors + +This OSPF-MANET software is the product of a number of individuals, +including: +@itemize @bullet +@item Jeff Ahrenholz +@item Claudiu Danilov +@item Tom Henderson +@item Jeff Meegan +@item Richard Ogier +@item Gary Pei +@item Phil Spagnolo +@end itemize + +This research was funded by +the Office of Naval Research under contract N00014-04-C-0003 and Boeing +internal research. The +simulator developed for this project is an extension of two open-source +software projects: the Georgia Tech Network Simulator (GTNetS) and the +Quagga Routing Suite. + +@node Protocol Operation +@section Protocol Operation + + +For now, please see @uref{http://hipserver.mct.phantomworks.org/ietf/ospf/milcom06.pdf} +or Section 2 of @uref{http://tools.ietf.org/html/draft-ietf-ospf-manet-mdr,,draft-ietf-ospf-manet-mdr} + +@node Enabling OSPF-MANET +@section Enabling OSPF-MANET + +OSPF-MANET is enabled by compiling the flags into the source code. +@itemize @bullet +@item BUGFIX: Bugs found in the quagga source. +@item OSPF6_CONFIG: Flag to add new configuration commands. +@item OSPF6_DELAYED_FLOOD: Delay the flooding of an LSA for coalescing. +@item OPF6_MANET_MDR: Enable the use of OSPF-MANET MDR is OSPFv3. +@item OSPF6_DD_OPT: Enable an optimization to the database exchange algorithm. +@item OSPF6_MANET_DIFF_HELLO: Enable differential Hellos in OSPF-MANET MDR. +@item OSPF6_SMF: Hook to allow SMF to use MDR relay set. +@end itemize + +By default these flags are compiled into the code. They must be removed +from configure.ac to disable. + +To support IPv4 routing using OSPF-MANET, one must also define the Address +Families patch (described in another chapter). + +@node Building OSPF-MANET +@section Building OSPF-MANET + +To build quagga as standalone router run: +@verbatim +autoreconf or ./update-autotools +./configure --enable-user=root --enable-group=root --enable-vtysh \ +--with-cflags=-ggdb +make +make install +@end verbatim + +To build quagga in IMUNES (or Boeing's CORE), use the following configure line: +@verbatim + ./configure --enable-user=root --enable-group=wheel \ + --sysconfdir=/usr/local/etc/quagga --enable-vtysh \ + --localstatedir=/var/run/quagga --with-cflags=-ggdb +@end verbatim + +@node Configuring OSPF-MANET +@section Configuring OSPF-MANET + +OSPF-MANET can be configured in one of two ways: +command line interface (CLI) or config file (ospf6d.conf). +In either case, you must install a zebra.conf and ospf6d.conf file in +/usr/local/etc/. +@itemize @bullet +@item CLI: run configuration commands in vtysh or telnet +@item put configuration commands in zebra.conf and ospf6d.conf +@end itemize + +The following commands configure OSPF-MANET MDR. + +@subsection OSPF6 router + +@deffn {OSPF6 Command} {router minls-interval <0-65535>} {} +Set the router's minimum time (in seconds) between LSA origination. +Default 5 +@end deffn + +@deffn {OSPF6 Command} {router minls-arrival <0-65535>} {} +Set the router's minimum time (in seconds) between LSA reception. +Default 1 +@end deffn + +@subsection OSPF6 area + +@deffn {OSPF6 Command} {area @var{a.b.c.d} linklog-file @var{filename}} {} +Set the filename to log links to. Logging links for area +@var{a.b.c.d} is enabled when both @command{linklog-file} and +@command{linklog-interval} are set. The router ID of the advertising +router and it's neighbor are logged in the following format (note the +timestamp is GMT, not local time). +@example +Routing-Links List: 16:28:32.583109 +10.0.0.1 -> 10.0.0.2 +10.0.0.1 -> 10.0.0.5 +10.0.0.2 -> 10.0.0.1 +10.0.0.2 -> 10.0.0.5 +10.0.0.5 -> 10.0.0.1 +10.0.0.5 -> 10.0.0.2 +End of Routing-Links List. +@end example +@end deffn + +@deffn {OSPF6 Command} {area @var{a.b.c.d} linklog-interval <0-255>} {} +Set the minimum time (in seconds) between logging links. An interval +of zero disables link logging for area @var{a.b.c.d}. +Default 0 (link logging is disabled) +@end deffn + +@deffn {OSPF6 Command} {no area @var{a.b.c.d} linklog} {} +Disable logging links for area @var{a.b.c.d}. This is equivalent to +setting @command{linklog-interval} to zero. +@end deffn + +@subsection OSPF6 interface + +@deffn {Interface Command} {ipv6 ospf6 network (broadcast|non-broadcast|point-to-multipoint|point-to-point|loopback|manet-designated-router)} {} +@table @code +@item broadcast +Specify OSPF6 broadcast multi-access network + +@item non-broadcast +Specify OSPF6 NBMA network + +@item point-to-multipoint +Specify OSPF6 point-to-multipoint network + +@item point-to-point +Specify OSPF6 point-to-point network + +@item loopback +Specify OSPF6 loopback + +@item manet-designated-router +Specify OSPF6 manet-designated-router (MDR) network +@end table +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 flood-delay <1-65535>} {} +Time in msec to coalesce LSAs before sending. Default 100 +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 jitter <1-65535>} {} +Time in msec to jitter sending of all ospf6 packets. Default 100 +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 ackinterval <1-65535>} {} +Interval of time in msec to coalesce acks. Default 1800 +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 backupwaitinterval <1-65535>} {} +Interval of time in msec for MBDRs to wait before flooding. Default 2000 +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 diffhellos} {} +Enable differential hellos +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 twohoprefresh <1-65535>} {} +When using differential Hellos, full Hellos are sent every +TwoHopRefresh Hellos. Default 3 +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 hellorepeatcount <1-65535>} {} +Total hellos in succession that cannot be missed using differential +hellos. Default 3 +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 adjacencyconnectivity (uniconnected|biconnected|fully)} {} +Level of adjacencies between neighbors +@table @code +@item uniconnected +The set of adjacencies forms a (uni)connected graph. + +@item biconnnected +The set of adjacencies forms a biconnected graph. + +@item fullyconnected +Adjacency reduction is not used, the router becomes adjacent with all +of its neighbors. +@end table +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 lsafullness (minlsa|mincostlsa|mincost2lsa|mdrfulllsa|fulllsa)} {} +Choose the OSPFv3 interface type +@table @code +@item minlsa +Specify min size LSAs (only adjacent neighbors) + +@item mincostlsa +Specify partial LSAs for min-hop routing + +@item mincost2lsa +Specify partial LSAs for two min-hop routing paths + +@item mdrfulllsa +Specify full LSAs from MDR/MBDRs + +@item fulllsa +Specify full LSAs (all routable neighbors) +@end table +@end deffn + +@deffn {Interface Command} {ipv6 ospf6 smf_mdr_talk} {} +Allow SMF to use the MDR relay set. +@end deffn + +@node Running OSPF-MANET +@section Running OSPF-MANET + +Run the following commands for the command prompt: +@verbatim +/usr/local/sbin/zebra -d +/usr/local/sbin/ospf6d -d +@end verbatim + +To verify OSPF-MANET is running, from a vtysh or telnet terminal type: +@verbatim + > show ipv6 ospf6 route +@end verbatim + +This should display the OSPFv3 routes. If IPv4 AFs are used then the +route will appear as an IPv6 route with zeros before the IPv4 route. +Next, type the following command for IPv4 or IPv6 +@verbatim + > show ip route + > show ipv6 route +@end verbatim + +The entries with the "*" are going to be installed in the kernel routingtable. If these tables are correct then the kernel routing table should be correct. + +@node Use with Address Families +@section Use with Address Families + +To use OSPF MANET to carry IPv4 prefix information, one may enable it +with the following configuration. + +In the interface description section, define an instance-id greater than +64. Such as: + +@verbatim +interface ath0 + ... + ipv6 ospf6 instance-id 65 + ... +@end verbatim + +Then, in the router definition section, describe networks to be associated +with OSPF MANET. + +@verbatim +router ospf6 + router-id 10.1.0.1 + interface ath0 area 0.0.0.0 +@end verbatim + +@subsection Redistribution between OSPFv2 and OSPFv3 MANET + +(to be completed) + +@node OSPF-MANET Configuration Examples +@section OSPF-MANET Configuration Examples + +Here is an example of an interface declaration of an OSPF-MANET interface, +from the @code{ospf6d.conf} file. + +@example +interface ath0 + ipv6 ospf6 priority 1 + ipv6 ospf6 transmit-delay 1 + ipv6 ospf6 instance-id 65 + ipv6 ospf6 ifmtu 1500 + ipv6 ospf6 cost 1 + ipv6 ospf6 hello-interval 2 + ipv6 ospf6 dead-interval 6 + ipv6 ospf6 retransmit-interval 5 + ipv6 ospf6 network manet-designated-router + ipv6 ospf6 ackinterval 1800 + ipv6 ospf6 diffhellos + ipv6 ospf6 backupwaitinterval 2000 + ipv6 ospf6 twohoprefresh 3 + ipv6 ospf6 hellorepeatcount 3 + ipv6 ospf6 adjacencyconnectivity biconnected + ipv6 ospf6 lsafullness mdrfulllsa + ipv6 ospf6 flood-delay 100 +! +@end example + +The below router declaration example tells quagga to run OSPF-MANET +on interface ath0 and to redistribute OSPF and connected networks. + +@example +router ospf6 + router-id 10.1.0.1 + interface ath0 area 0.0.0.0 + redistribute ospf + redistribute connected +! +@end example + +@section OSPFv3 Simulation with GTNetS +@include ospf6d-gtnets.texi --- quagga-0.99.9/doc/quagga.texi 2006-07-27 15:55:49.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/doc/quagga.texi 2008-06-02 09:23:51.000000000 -0700 @@ -86,6 +86,8 @@ for @value{PACKAGE_STRING}. @uref{http:/ * RIPng:: * OSPFv2:: * OSPFv3:: +* OSPFv3 Address Families:: +* OSPF-MANET:: * BGP:: * Configuring Quagga as a Route Server:: * VTY shell:: @@ -110,6 +112,8 @@ for @value{PACKAGE_STRING}. @uref{http:/ @include ripngd.texi @include ospfd.texi @include ospf6d.texi +@include ospf6d-af.texi +@include ospf6d-manet.texi @include bgpd.texi @include routeserver.texi @include vtysh.texi --- quagga-0.99.9/lib/buffer.c 2005-12-02 03:02:17.000000000 -0800 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/buffer.c 2008-06-02 09:23:52.000000000 -0700 @@ -53,7 +53,12 @@ struct buffer_data size_t sp; /* Actual data stream (variable length). */ +#if ( __GNUC__ == 2) + // did not compile in FreeBSD, gcc 2.95.4 + unsigned char data[0]; /* real dimension is buffer->size */ +#else unsigned char data[]; /* real dimension is buffer->size */ +#endif }; /* It should always be true that: 0 <= sp <= cp <= size */ @@ -148,7 +153,8 @@ buffer_add (struct buffer *b) { struct buffer_data *d; - d = XMALLOC(MTYPE_BUFFER_DATA, offsetof(struct buffer_data, data[b->size])); + d = + XMALLOC (MTYPE_BUFFER_DATA, offsetof (struct buffer_data, data[b->size])); d->cp = d->sp = 0; d->next = NULL; @@ -237,7 +243,8 @@ buffer_flush_window (struct buffer *b, i char more[] = " --More-- "; char erase[] = { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 + }; struct buffer_data *data; int column; @@ -314,7 +321,8 @@ buffer_flush_window (struct buffer *b, i { zlog_warn("%s: growing iov array to %d; " "width %d, height %d, size %lu", - __func__, iov_alloc, width, height, (u_long)b->size); + __func__, iov_alloc, width, height, + (u_long) b->size); iov = XREALLOC(MTYPE_TMP, iov, iov_alloc*sizeof(*iov)); } else --- quagga-0.99.9/lib/buffer.h 2005-05-03 12:05:50.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/buffer.h 2008-06-02 09:23:52.000000000 -0700 @@ -96,7 +96,8 @@ extern buffer_status_t buffer_flush_all to return -1 (because the logic for handling the erase and more features is too complicated to retry the write later). */ -extern buffer_status_t buffer_flush_window (struct buffer *, int fd, int width, - int height, int erase, int no_more); +extern buffer_status_t buffer_flush_window (struct buffer *, int fd, + int width, int height, int erase, + int no_more); #endif /* _ZEBRA_BUFFER_H */ --- quagga-0.99.9/lib/checksum.c 2005-11-03 03:52:14.000000000 -0800 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/checksum.c 2008-06-02 09:23:52.000000000 -0700 @@ -24,13 +24,15 @@ in_cksum(void *parg, int nbytes) */ sum = 0; - while (nbytes > 1) { + while (nbytes > 1) + { sum += *ptr++; nbytes -= 2; } /* mop up an odd byte, if necessary */ - if (nbytes == 1) { + if (nbytes == 1) + { oddbyte = 0; /* make sure top half is zero */ *((u_char *) &oddbyte) = *(u_char *)ptr; /* one byte only */ sum += oddbyte; --- quagga-0.99.9/lib/command.c 2007-04-29 05:40:39.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/command.c 2008-06-02 09:23:52.000000000 -0700 @@ -41,74 +41,88 @@ vector cmdvec = NULL; struct host host; /* Standard command node structures. */ -struct cmd_node auth_node = -{ +struct cmd_node auth_node = { AUTH_NODE, "Password: ", }; -struct cmd_node view_node = -{ +struct cmd_node view_node = { VIEW_NODE, "%s> ", }; -struct cmd_node auth_enable_node = -{ +struct cmd_node auth_enable_node = { AUTH_ENABLE_NODE, "Password: ", }; -struct cmd_node enable_node = -{ +struct cmd_node enable_node = { ENABLE_NODE, "%s# ", }; -struct cmd_node config_node = -{ +struct cmd_node config_node = { CONFIG_NODE, "%s(config)# ", 1 }; /* Default motd string. */ -const char *default_motd = -"\r\n\ +const char *default_motd = "\r\n\ Hello, this is " QUAGGA_PROGNAME " (version " QUAGGA_VERSION ").\r\n\ " QUAGGA_COPYRIGHT "\r\n\ \r\n"; -static struct facility_map { +static struct facility_map +{ int facility; const char *name; size_t match; } syslog_facilities[] = { - { LOG_KERN, "kern", 1 }, - { LOG_USER, "user", 2 }, - { LOG_MAIL, "mail", 1 }, - { LOG_DAEMON, "daemon", 1 }, - { LOG_AUTH, "auth", 1 }, - { LOG_SYSLOG, "syslog", 1 }, - { LOG_LPR, "lpr", 2 }, - { LOG_NEWS, "news", 1 }, - { LOG_UUCP, "uucp", 2 }, - { LOG_CRON, "cron", 1 }, + { + LOG_KERN, "kern", 1}, + { + LOG_USER, "user", 2}, + { + LOG_MAIL, "mail", 1}, + { + LOG_DAEMON, "daemon", 1}, + { + LOG_AUTH, "auth", 1}, + { + LOG_SYSLOG, "syslog", 1}, + { + LOG_LPR, "lpr", 2}, + { + LOG_NEWS, "news", 1}, + { + LOG_UUCP, "uucp", 2}, + { + LOG_CRON, "cron", 1}, #ifdef LOG_FTP - { LOG_FTP, "ftp", 1 }, + { + LOG_FTP, "ftp", 1}, #endif - { LOG_LOCAL0, "local0", 6 }, - { LOG_LOCAL1, "local1", 6 }, - { LOG_LOCAL2, "local2", 6 }, - { LOG_LOCAL3, "local3", 6 }, - { LOG_LOCAL4, "local4", 6 }, - { LOG_LOCAL5, "local5", 6 }, - { LOG_LOCAL6, "local6", 6 }, - { LOG_LOCAL7, "local7", 6 }, - { 0, NULL, 0 }, - }; + { + LOG_LOCAL0, "local0", 6}, + { + LOG_LOCAL1, "local1", 6}, + { + LOG_LOCAL2, "local2", 6}, + { + LOG_LOCAL3, "local3", 6}, + { + LOG_LOCAL4, "local4", 6}, + { + LOG_LOCAL5, "local5", 6}, + { + LOG_LOCAL6, "local6", 6}, + { + LOG_LOCAL7, "local7", 6}, + { +0, NULL, 0},}; static const char * facility_name(int facility) @@ -181,8 +195,7 @@ argv_concat (const char **argv, int argc /* Install top node of command vector. */ void -install_node (struct cmd_node *node, - int (*func) (struct vty *)) +install_node (struct cmd_node *node, int (*func) (struct vty *)) { vector_set_index (cmdvec, node->node, node); node->func = func; @@ -402,7 +415,9 @@ cmd_make_descvec (const char *string, co sp = cp; - while (! (isspace ((int) *cp) || *cp == '\r' || *cp == '\n' || *cp == ')' || *cp == '|') && *cp != '\0') + while (! + (isspace ((int) *cp) || *cp == '\r' || *cp == '\n' || *cp == ')' + || *cp == '|') && *cp != '\0') cp++; len = cp - sp; @@ -536,7 +551,8 @@ config_write_host (struct vty *vty) if (host.password_encrypt) vty_out (vty, "password 8 %s%s", host.password_encrypt, VTY_NEWLINE); if (host.enable_encrypt) - vty_out (vty, "enable password 8 %s%s", host.enable_encrypt, VTY_NEWLINE); + vty_out (vty, "enable password 8 %s%s", host.enable_encrypt, + VTY_NEWLINE); } else { @@ -574,9 +590,11 @@ config_write_host (struct vty *vty) if (zlog_default->maxlvl[ZLOG_DEST_MONITOR] == ZLOG_DISABLED) vty_out(vty,"no log monitor%s",VTY_NEWLINE); - else if (zlog_default->maxlvl[ZLOG_DEST_MONITOR] != zlog_default->default_lvl) + else if (zlog_default->maxlvl[ZLOG_DEST_MONITOR] != + zlog_default->default_lvl) vty_out(vty,"log monitor %s%s", - zlog_priority[zlog_default->maxlvl[ZLOG_DEST_MONITOR]],VTY_NEWLINE); + zlog_priority[zlog_default->maxlvl[ZLOG_DEST_MONITOR]], + VTY_NEWLINE); if (zlog_default->maxlvl[ZLOG_DEST_SYSLOG] != ZLOG_DISABLED) { @@ -605,8 +623,7 @@ config_write_host (struct vty *vty) vty_out (vty, "service password-encryption%s", VTY_NEWLINE); if (host.lines >= 0) - vty_out (vty, "service terminal-length %d%s", host.lines, - VTY_NEWLINE); + vty_out (vty, "service terminal-length %d%s", host.lines, VTY_NEWLINE); if (host.motdfile) vty_out (vty, "banner motd file %s%s", host.motdfile, VTY_NEWLINE); @@ -638,7 +655,9 @@ cmd_filter_by_symbol (char *command, cha lim = strlen (command); while (i < lim) { - if (! (isdigit ((int) command[i]) || command[i] == '.' || command[i] == '/')) + if (! + (isdigit ((int) command[i]) || command[i] == '.' + || command[i] == '/')) return 1; i++; } @@ -650,7 +669,9 @@ cmd_filter_by_symbol (char *command, cha lim = strlen (command); while (i < lim) { - if (! (isalpha ((int) command[i]) || command[i] == '_' || command[i] == '-')) + if (! + (isalpha ((int) command[i]) || command[i] == '_' + || command[i] == '-')) return 1; i++; } @@ -1557,13 +1578,13 @@ desc_unique_string (vector v, const char } static int -cmd_try_do_shortcut (enum node_type node, char* first_word) { +cmd_try_do_shortcut (enum node_type node, char *first_word) +{ if ( first_word != NULL && node != AUTH_NODE && node != VIEW_NODE && node != AUTH_ENABLE_NODE && - node != ENABLE_NODE && - 0 == strcmp( "do", first_word ) ) + node != ENABLE_NODE && 0 == strcmp ("do", first_word)) return 1; return 0; } @@ -1616,7 +1637,8 @@ cmd_describe_command_real (vector vline, && (vector_active (cmd_element->strvec))) { descvec = vector_slot (cmd_element->strvec, - vector_active (cmd_element->strvec) - 1); + vector_active (cmd_element->strvec) - + 1); for (k = 0; k < vector_active (descvec); k++) { struct desc *desc = vector_slot (descvec, k); @@ -1725,7 +1747,8 @@ cmd_describe_command (vector vline, stru /* use memcpy? */ for (index = 1; index < vector_active (vline); index++) { - vector_set_index (shifted_vline, index-1, vector_lookup(vline, index)); + vector_set_index (shifted_vline, index - 1, + vector_lookup (vline, index)); } ret = cmd_describe_command_real (shifted_vline, vty, status); @@ -1948,7 +1971,8 @@ cmd_complete_command (vector vline, stru /* use memcpy? */ for (index = 1; index < vector_active (vline); index++) { - vector_set_index (shifted_vline, index-1, vector_lookup(vline, index)); + vector_set_index (shifted_vline, index - 1, + vector_lookup (vline, index)); } ret = cmd_complete_command_real (shifted_vline, vty, status); @@ -2090,7 +2114,8 @@ cmd_execute_command_real (vector vline, if (CMD_VARARG (desc->cmd)) varflag = 1; - if (varflag || CMD_VARIABLE (desc->cmd) || CMD_OPTION (desc->cmd)) + if (varflag || CMD_VARIABLE (desc->cmd) + || CMD_OPTION (desc->cmd)) argv[argc++] = vector_slot (vline, i); } else @@ -2114,7 +2139,8 @@ cmd_execute_command_real (vector vline, int cmd_execute_command (vector vline, struct vty *vty, struct cmd_element **cmd, - int vtysh) { + int vtysh) +{ int ret, saved_ret, tried = 0; enum node_type onode, try_node; @@ -2132,7 +2158,8 @@ cmd_execute_command (vector vline, struc /* use memcpy? */ for (index = 1; index < vector_active (vline); index++) { - vector_set_index (shifted_vline, index-1, vector_lookup(vline, index)); + vector_set_index (shifted_vline, index - 1, + vector_lookup (vline, index)); } ret = cmd_execute_command_real (shifted_vline, vty, cmd); @@ -2149,8 +2176,7 @@ cmd_execute_command (vector vline, struc return saved_ret; /* This assumes all nodes above CONFIG_NODE are childs of CONFIG_NODE */ - while ( ret != CMD_SUCCESS && ret != CMD_WARNING - && vty->node > CONFIG_NODE ) + while (ret != CMD_SUCCESS && ret != CMD_WARNING && vty->node > CONFIG_NODE) { try_node = node_parent(try_node); vty->node = try_node; @@ -2266,7 +2292,8 @@ cmd_execute_command_strict (vector vline if (CMD_VARARG (desc->cmd)) varflag = 1; - if (varflag || CMD_VARIABLE (desc->cmd) || CMD_OPTION (desc->cmd)) + if (varflag || CMD_VARIABLE (desc->cmd) + || CMD_OPTION (desc->cmd)) argv[argc++] = vector_slot (vline, i); } else @@ -2326,14 +2353,14 @@ config_from_file (struct vty *vty, FILE DEFUN (config_terminal, config_terminal_cmd, "configure terminal", - "Configuration from vty interface\n" - "Configuration terminal\n") + "Configuration from vty interface\n" "Configuration terminal\n") { if (vty_config_lock (vty)) vty->node = CONFIG_NODE; else { - vty_out (vty, "VTY configuration is locked by other VTY%s", VTY_NEWLINE); + vty_out (vty, "VTY configuration is locked by other VTY%s", + VTY_NEWLINE); return CMD_WARNING; } return CMD_SUCCESS; @@ -2341,9 +2368,7 @@ DEFUN (config_terminal, /* Enable command */ DEFUN (enable, - config_enable_cmd, - "enable", - "Turn on privileged mode command\n") + config_enable_cmd, "enable", "Turn on privileged mode command\n") { /* If enable password is NULL, change to ENABLE_NODE */ if ((host.enable == NULL && host.enable_encrypt == NULL) || @@ -2357,9 +2382,7 @@ DEFUN (enable, /* Disable command */ DEFUN (disable, - config_disable_cmd, - "disable", - "Turn off privileged mode command\n") + config_disable_cmd, "disable", "Turn off privileged mode command\n") { if (vty->node == ENABLE_NODE) vty->node = VIEW_NODE; @@ -2369,8 +2392,7 @@ DEFUN (disable, /* Down vty node level. */ DEFUN (config_exit, config_exit_cmd, - "exit", - "Exit current mode and down to previous mode\n") + "exit", "Exit current mode and down to previous mode\n") { switch (vty->node) { @@ -2418,14 +2440,10 @@ DEFUN (config_exit, /* quit is alias of exit. */ ALIAS (config_exit, config_quit_cmd, - "quit", - "Exit current mode and down to previous mode\n") - + "quit", "Exit current mode and down to previous mode\n") /* End of configuration. */ DEFUN (config_end, - config_end_cmd, - "end", - "End current mode and change to enable mode.") + config_end_cmd, "end", "End current mode and change to enable mode.") { switch (vty->node) { @@ -2463,13 +2481,10 @@ DEFUN (config_end, /* Show version. */ DEFUN (show_version, - show_version_cmd, - "show version", - SHOW_STR - "Displays zebra version\n") + show_version_cmd, "show version", SHOW_STR "Displays zebra version\n") { - vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, host.name?host.name:"", - VTY_NEWLINE); + vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, + host.name ? host.name : "", VTY_NEWLINE); vty_out (vty, "%s%s", QUAGGA_COPYRIGHT, VTY_NEWLINE); return CMD_SUCCESS; @@ -2478,8 +2493,7 @@ DEFUN (show_version, /* Help display function for all node. */ DEFUN (config_help, config_help_cmd, - "help", - "Description of the interactive help system\n") + "help", "Description of the interactive help system\n") { vty_out (vty, "Quagga VTY provides advanced help feature. When you need help,%s\ @@ -2493,17 +2507,12 @@ command argument (e.g. 'show ?') and des argument.%s\ 2. Partial help is provided when an abbreviated argument is entered%s\ and you want to know what arguments match the input%s\ - (e.g. 'show me?'.)%s%s", VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, - VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, - VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); + (e.g. 'show me?'.)%s%s", VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE); return CMD_SUCCESS; } /* Help display function for all node. */ -DEFUN (config_list, - config_list_cmd, - "list", - "Print command list\n") +DEFUN (config_list, config_list_cmd, "list", "Print command list\n") { unsigned int i; struct cmd_node *cnode = vector_slot (cmdvec, vty->node); @@ -2513,8 +2522,7 @@ DEFUN (config_list, if ((cmd = vector_slot (cnode->cmd_vector, i)) != NULL && !(cmd->attr == CMD_ATTR_DEPRECATED || cmd->attr == CMD_ATTR_HIDDEN)) - vty_out (vty, " %s%s", cmd->string, - VTY_NEWLINE); + vty_out (vty, " %s%s", cmd->string, VTY_NEWLINE); return CMD_SUCCESS; } @@ -2584,14 +2592,14 @@ DEFUN (config_write_file, if (unlink (config_file_sav) != 0) if (errno != ENOENT) { - vty_out (vty, "Can't unlink backup configuration file %s.%s", config_file_sav, - VTY_NEWLINE); + vty_out (vty, "Can't unlink backup configuration file %s.%s", + config_file_sav, VTY_NEWLINE); goto finished; } if (link (config_file, config_file_sav) != 0) { - vty_out (vty, "Can't backup old configuration file %s.%s", config_file_sav, - VTY_NEWLINE); + vty_out (vty, "Can't backup old configuration file %s.%s", + config_file_sav, VTY_NEWLINE); goto finished; } sync (); @@ -2616,8 +2624,7 @@ DEFUN (config_write_file, goto finished; } - vty_out (vty, "Configuration saved to %s%s", config_file, - VTY_NEWLINE); + vty_out (vty, "Configuration saved to %s%s", config_file, VTY_NEWLINE); ret = CMD_SUCCESS; finished: @@ -2666,8 +2670,7 @@ DEFUN (config_write_terminal, } else { - vty_out (vty, "%sCurrent configuration:%s", VTY_NEWLINE, - VTY_NEWLINE); + vty_out (vty, "%sCurrent configuration:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out (vty, "!%s", VTY_NEWLINE); for (i = 0; i < vector_active (cmdvec); i++) @@ -2684,16 +2687,11 @@ DEFUN (config_write_terminal, /* Write current configuration into the terminal. */ ALIAS (config_write_terminal, show_running_config_cmd, - "show running-config", - SHOW_STR - "running configuration\n") - + "show running-config", SHOW_STR "running configuration\n") /* Write startup configuration into the terminal. */ DEFUN (show_startup_config, show_startup_config_cmd, - "show startup-config", - SHOW_STR - "Contentes of startup configuration\n") + "show startup-config", SHOW_STR "Contentes of startup configuration\n") { char buf[BUFSIZ]; FILE *confp; @@ -2726,12 +2724,12 @@ DEFUN (show_startup_config, DEFUN (config_hostname, hostname_cmd, "hostname WORD", - "Set system's network name\n" - "This system's network name\n") + "Set system's network name\n" "This system's network name\n") { if (!isalpha((int) *argv[0])) { - vty_out (vty, "Please specify string starting with alphabet%s", VTY_NEWLINE); + vty_out (vty, "Please specify string starting with alphabet%s", + VTY_NEWLINE); return CMD_WARNING; } @@ -2745,9 +2743,7 @@ DEFUN (config_hostname, DEFUN (config_no_hostname, no_hostname_cmd, "no hostname [HOSTNAME]", - NO_STR - "Reset system's network name\n" - "Host name of this router\n") + NO_STR "Reset system's network name\n" "Host name of this router\n") { if (host.name) XFREE (MTYPE_HOST, host.name); @@ -2760,8 +2756,7 @@ DEFUN (config_password, password_cmd, "password (8|) WORD", "Assign the terminal connection password\n" "Specifies a HIDDEN password will follow\n" - "dummy string \n" - "The HIDDEN line password string\n") + "dummy string \n" "The HIDDEN line password string\n") { /* Argument check. */ if (argc == 0) @@ -2792,7 +2787,8 @@ DEFUN (config_password, password_cmd, if (!isalnum ((int) *argv[0])) { vty_out (vty, - "Please specify string starting with alphanumeric%s", VTY_NEWLINE); + "Please specify string starting with alphanumeric%s", + VTY_NEWLINE); return CMD_WARNING; } @@ -2823,8 +2818,7 @@ DEFUN (config_enable_password, enable_pa "Modify enable password parameters\n" "Assign the privileged level password\n" "Specifies a HIDDEN password will follow\n" - "dummy string \n" - "The HIDDEN 'enable' password string\n") + "dummy string \n" "The HIDDEN 'enable' password string\n") { /* Argument check. */ if (argc == 0) @@ -2858,7 +2852,8 @@ DEFUN (config_enable_password, enable_pa if (!isalnum ((int) *argv[0])) { vty_out (vty, - "Please specify string starting with alphanumeric%s", VTY_NEWLINE); + "Please specify string starting with alphanumeric%s", + VTY_NEWLINE); return CMD_WARNING; } @@ -2907,8 +2901,7 @@ DEFUN (no_config_enable_password, no_ena DEFUN (service_password_encrypt, service_password_encrypt_cmd, "service password-encryption", - "Set up miscellaneous service\n" - "Enable encrypted passwords\n") + "Set up miscellaneous service\n" "Enable encrypted passwords\n") { if (host.encrypt) return CMD_SUCCESS; @@ -2934,9 +2927,7 @@ DEFUN (service_password_encrypt, DEFUN (no_service_password_encrypt, no_service_password_encrypt_cmd, "no service password-encryption", - NO_STR - "Set up miscellaneous service\n" - "Enable encrypted passwords\n") + NO_STR "Set up miscellaneous service\n" "Enable encrypted passwords\n") { if (! host.encrypt) return CMD_SUCCESS; @@ -2977,8 +2968,7 @@ DEFUN (config_terminal_length, config_te DEFUN (config_terminal_no_length, config_terminal_no_length_cmd, "terminal no length", "Set terminal line parameters\n" - NO_STR - "Set number of lines on a screen\n") + NO_STR "Set number of lines on a screen\n") { vty->lines = -1; return CMD_SUCCESS; @@ -3018,13 +3008,13 @@ DEFUN (no_service_terminal_length, no_se DEFUN_HIDDEN (do_echo, echo_cmd, "echo .MESSAGE", - "Echo a message back to the vty\n" - "The message to echo\n") + "Echo a message back to the vty\n" "The message to echo\n") { char *message; - vty_out (vty, "%s%s", ((message = argv_concat(argv, argc, 0)) ? message : ""), - VTY_NEWLINE); + vty_out (vty, "%s%s", + ((message = + argv_concat (argv, argc, 0)) ? message : ""), VTY_NEWLINE); if (message) XFREE(MTYPE_TMP, message); return CMD_SUCCESS; @@ -3034,8 +3024,7 @@ DEFUN (config_logmsg, config_logmsg_cmd, "logmsg "LOG_LEVELS" .MESSAGE", "Send a message to enabled logging destinations\n" - LOG_LEVEL_DESC - "The message to send\n") + LOG_LEVEL_DESC "The message to send\n") { int level; char *message; @@ -3043,7 +3032,8 @@ DEFUN (config_logmsg, if ((level = level_match(argv[0])) == ZLOG_DISABLED) return CMD_ERR_NO_MATCH; - zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : "")); + zlog (NULL, level, + ((message = argv_concat (argv, argc, 1)) ? message : "")); if (message) XFREE(MTYPE_TMP, message); return CMD_SUCCESS; @@ -3051,9 +3041,7 @@ DEFUN (config_logmsg, DEFUN (show_logging, show_logging_cmd, - "show logging", - SHOW_STR - "Show current logging configuration\n") + "show logging", SHOW_STR "Show current logging configuration\n") { struct zlog *zl = zlog_default; @@ -3070,26 +3058,22 @@ DEFUN (show_logging, if (zl->maxlvl[ZLOG_DEST_STDOUT] == ZLOG_DISABLED) vty_out (vty, "disabled"); else - vty_out (vty, "level %s", - zlog_priority[zl->maxlvl[ZLOG_DEST_STDOUT]]); + vty_out (vty, "level %s", zlog_priority[zl->maxlvl[ZLOG_DEST_STDOUT]]); vty_out (vty, "%s", VTY_NEWLINE); vty_out (vty, "Monitor logging: "); if (zl->maxlvl[ZLOG_DEST_MONITOR] == ZLOG_DISABLED) vty_out (vty, "disabled"); else - vty_out (vty, "level %s", - zlog_priority[zl->maxlvl[ZLOG_DEST_MONITOR]]); + vty_out (vty, "level %s", zlog_priority[zl->maxlvl[ZLOG_DEST_MONITOR]]); vty_out (vty, "%s", VTY_NEWLINE); vty_out (vty, "File logging: "); - if ((zl->maxlvl[ZLOG_DEST_FILE] == ZLOG_DISABLED) || - !zl->fp) + if ((zl->maxlvl[ZLOG_DEST_FILE] == ZLOG_DISABLED) || !zl->fp) vty_out (vty, "disabled"); else vty_out (vty, "level %s, filename %s", - zlog_priority[zl->maxlvl[ZLOG_DEST_FILE]], - zl->filename); + zlog_priority[zl->maxlvl[ZLOG_DEST_FILE]], zl->filename); vty_out (vty, "%s", VTY_NEWLINE); vty_out (vty, "Protocol name: %s%s", @@ -3104,9 +3088,7 @@ DEFUN (show_logging, DEFUN (config_log_stdout, config_log_stdout_cmd, - "log stdout", - "Logging control\n" - "Set stdout logging level\n") + "log stdout", "Logging control\n" "Set stdout logging level\n") { zlog_set_level (NULL, ZLOG_DEST_STDOUT, zlog_default->default_lvl); return CMD_SUCCESS; @@ -3115,9 +3097,7 @@ DEFUN (config_log_stdout, DEFUN (config_log_stdout_level, config_log_stdout_level_cmd, "log stdout "LOG_LEVELS, - "Logging control\n" - "Set stdout logging level\n" - LOG_LEVEL_DESC) + "Logging control\n" "Set stdout logging level\n" LOG_LEVEL_DESC) { int level; @@ -3131,9 +3111,7 @@ DEFUN (no_config_log_stdout, no_config_log_stdout_cmd, "no log stdout [LEVEL]", NO_STR - "Logging control\n" - "Cancel logging to stdout\n" - "Logging level\n") + "Logging control\n" "Cancel logging to stdout\n" "Logging level\n") { zlog_set_level (NULL, ZLOG_DEST_STDOUT, ZLOG_DISABLED); return CMD_SUCCESS; @@ -3142,8 +3120,7 @@ DEFUN (no_config_log_stdout, DEFUN (config_log_monitor, config_log_monitor_cmd, "log monitor", - "Logging control\n" - "Set terminal line (monitor) logging level\n") + "Logging control\n" "Set terminal line (monitor) logging level\n") { zlog_set_level (NULL, ZLOG_DEST_MONITOR, zlog_default->default_lvl); return CMD_SUCCESS; @@ -3153,8 +3130,7 @@ DEFUN (config_log_monitor_level, config_log_monitor_level_cmd, "log monitor "LOG_LEVELS, "Logging control\n" - "Set terminal line (monitor) logging level\n" - LOG_LEVEL_DESC) + "Set terminal line (monitor) logging level\n" LOG_LEVEL_DESC) { int level; @@ -3169,8 +3145,7 @@ DEFUN (no_config_log_monitor, "no log monitor [LEVEL]", NO_STR "Logging control\n" - "Disable terminal line (monitor) logging\n" - "Logging level\n") + "Disable terminal line (monitor) logging\n" "Logging level\n") { zlog_set_level (NULL, ZLOG_DEST_MONITOR, ZLOG_DISABLED); return CMD_SUCCESS; @@ -3229,9 +3204,7 @@ set_log_file(struct vty *vty, const char DEFUN (config_log_file, config_log_file_cmd, "log file FILENAME", - "Logging control\n" - "Logging to file\n" - "Logging filename\n") + "Logging control\n" "Logging to file\n" "Logging filename\n") { return set_log_file(vty, argv[0], zlog_default->default_lvl); } @@ -3240,9 +3213,7 @@ DEFUN (config_log_file_level, config_log_file_level_cmd, "log file FILENAME "LOG_LEVELS, "Logging control\n" - "Logging to file\n" - "Logging filename\n" - LOG_LEVEL_DESC) + "Logging to file\n" "Logging filename\n" LOG_LEVEL_DESC) { int level; @@ -3255,9 +3226,7 @@ DEFUN (no_config_log_file, no_config_log_file_cmd, "no log file [FILENAME]", NO_STR - "Logging control\n" - "Cancel logging to file\n" - "Logging file name\n") + "Logging control\n" "Cancel logging to file\n" "Logging file name\n") { zlog_reset_file (NULL); @@ -3277,12 +3246,9 @@ ALIAS (no_config_log_file, "Cancel logging to file\n" "Logging file name\n" "Logging level\n") - DEFUN (config_log_syslog, config_log_syslog_cmd, - "log syslog", - "Logging control\n" - "Set syslog logging level\n") + "log syslog", "Logging control\n" "Set syslog logging level\n") { zlog_set_level (NULL, ZLOG_DEST_SYSLOG, zlog_default->default_lvl); return CMD_SUCCESS; @@ -3291,9 +3257,7 @@ DEFUN (config_log_syslog, DEFUN (config_log_syslog_level, config_log_syslog_level_cmd, "log syslog "LOG_LEVELS, - "Logging control\n" - "Set syslog logging level\n" - LOG_LEVEL_DESC) + "Logging control\n" "Set syslog logging level\n" LOG_LEVEL_DESC) { int level; @@ -3325,9 +3289,7 @@ DEFUN (no_config_log_syslog, no_config_log_syslog_cmd, "no log syslog [LEVEL]", NO_STR - "Logging control\n" - "Cancel logging to syslog\n" - "Logging level\n") + "Logging control\n" "Cancel logging to syslog\n" "Logging level\n") { zlog_set_level (NULL, ZLOG_DEST_SYSLOG, ZLOG_DISABLED); return CMD_SUCCESS; @@ -3346,8 +3307,7 @@ DEFUN (config_log_facility, config_log_facility_cmd, "log facility "LOG_FACILITIES, "Logging control\n" - "Facility parameter for syslog messages\n" - LOG_FACILITY_DESC) + "Facility parameter for syslog messages\n" LOG_FACILITY_DESC) { int facility; @@ -3362,8 +3322,7 @@ DEFUN (no_config_log_facility, "no log facility [FACILITY]", NO_STR "Logging control\n" - "Reset syslog facility to default (daemon)\n" - "Syslog facility\n") + "Reset syslog facility to default (daemon)\n" "Syslog facility\n") { zlog_default->facility = LOG_DAEMON; return CMD_SUCCESS; @@ -3394,8 +3353,7 @@ DEFUN_DEPRECATED (no_config_log_trap, "no log trap [LEVEL]", NO_STR "Logging control\n" - "Permit all logging information\n" - "Logging level\n") + "Permit all logging information\n" "Logging level\n") { zlog_default->default_lvl = LOG_DEBUG; return CMD_SUCCESS; @@ -3427,8 +3385,7 @@ DEFUN (config_log_timestamp_precision, "log timestamp precision <0-6>", "Logging control\n" "Timestamp configuration\n" - "Set the timestamp precision\n" - "Number of subsecond digits\n") + "Set the timestamp precision\n" "Number of subsecond digits\n") { if (argc != 1) { @@ -3456,10 +3413,7 @@ DEFUN (no_config_log_timestamp_precision DEFUN (banner_motd_file, banner_motd_file_cmd, "banner motd file [FILE]", - "Set banner\n" - "Banner for motd\n" - "Banner from a file\n" - "Filename\n") + "Set banner\n" "Banner for motd\n" "Banner from a file\n" "Filename\n") { if (host.motdfile) XFREE (MTYPE_HOST, host.motdfile); @@ -3471,9 +3425,7 @@ DEFUN (banner_motd_file, DEFUN (banner_motd_default, banner_motd_default_cmd, "banner motd default", - "Set banner string\n" - "Strings for motd\n" - "Default string\n") + "Set banner string\n" "Strings for motd\n" "Default string\n") { host.motd = default_motd; return CMD_SUCCESS; @@ -3481,10 +3433,7 @@ DEFUN (banner_motd_default, DEFUN (no_banner_motd, no_banner_motd_cmd, - "no banner motd", - NO_STR - "Set banner string\n" - "Strings for motd\n") + "no banner motd", NO_STR "Set banner string\n" "Strings for motd\n") { host.motd = NULL; if (host.motdfile) --- quagga-0.99.9/lib/command.h 2007-05-02 08:28:32.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/command.h 2008-06-02 09:23:52.000000000 -0700 @@ -25,7 +25,11 @@ #include "vector.h" #include "vty.h" -#include "lib/route_types.h" +#include "route_types.h" + +#ifdef __cplusplus +#define vector __quagga_vector +#endif /* __cplusplus */ /* Host configuration variable */ struct host @@ -342,8 +346,10 @@ extern char **cmd_complete_command (vect extern const char *cmd_prompt (enum node_type); extern int config_from_file (struct vty *, FILE *); extern enum node_type node_parent (enum node_type); -extern int cmd_execute_command (vector, struct vty *, struct cmd_element **, int); -extern int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **); +extern int cmd_execute_command (vector, struct vty *, struct cmd_element **, + int); +extern int cmd_execute_command_strict (vector, struct vty *, + struct cmd_element **); extern void config_replace_string (struct cmd_element *, char *, ...); extern void cmd_init (int); @@ -360,4 +366,9 @@ extern void print_version (const char *) /* struct host global, ick */ extern struct host host; + +#ifdef __cplusplus +#undef vector +#endif /* __cplusplus */ + #endif /* _ZEBRA_COMMAND_H */ --- quagga-0.99.9/lib/distribute.c 2005-05-06 07:43:13.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/distribute.c 2008-06-02 09:23:52.000000000 -0700 @@ -385,8 +383,7 @@ DEFUN (distribute_list, "Filter networks in routing updates\n" "Access-list name\n" "Filter incoming routing updates\n" - "Filter outgoing routing updates\n" - "Interface name\n") + "Filter outgoing routing updates\n" "Interface name\n") { enum distribute_type type; struct distribute *dist; @@ -398,7 +395,8 @@ DEFUN (distribute_list, type = DISTRIBUTE_OUT; else { - vty_out (vty, "distribute list direction must be [in|out]%s", VTY_NEWLINE); + vty_out (vty, "distribute list direction must be [in|out]%s", + VTY_NEWLINE); return CMD_WARNING; } @@ -423,8 +420,7 @@ DEFUN (no_districute_list, no_distribute "Filter networks in routing updates\n" "Access-list name\n" "Filter incoming routing updates\n" - "Filter outgoing routing updates\n" - "Interface name\n") + "Filter outgoing routing updates\n" "Interface name\n") { int ret; enum distribute_type type; @@ -436,7 +432,8 @@ DEFUN (no_districute_list, no_distribute type = DISTRIBUTE_OUT; else { - vty_out (vty, "distribute list direction must be [in|out]%s", VTY_NEWLINE); + vty_out (vty, "distribute list direction must be [in|out]%s", + VTY_NEWLINE); return CMD_WARNING; } @@ -547,8 +541,7 @@ DEFUN (districute_list_prefix, distribut "Filter prefixes in routing updates\n" "Name of an IP prefix-list\n" "Filter incoming routing updates\n" - "Filter outgoing routing updates\n" - "Interface name\n") + "Filter outgoing routing updates\n" "Interface name\n") { enum distribute_type type; struct distribute *dist; @@ -587,8 +579,7 @@ DEFUN (no_districute_list_prefix, no_dis "Filter prefixes in routing updates\n" "Name of an IP prefix-list\n" "Filter incoming routing updates\n" - "Filter outgoing routing updates\n" - "Interface name\n") + "Filter outgoing routing updates\n" "Interface name\n") { int ret; enum distribute_type type; @@ -621,11 +612,8 @@ ALIAS (no_districute_list_prefix, no_ipv "Filter prefixes in routing updates\n" "Name of an IP prefix-list\n" "Filter incoming routing updates\n" - "Filter outgoing routing updates\n" - "Interface name\n") - -int -config_show_distribute (struct vty *vty) + "Filter outgoing routing updates\n" "Interface name\n") + int config_show_distribute (struct vty *vty) { unsigned int i; struct hash_backet *mp; @@ -645,7 +633,9 @@ config_show_distribute (struct vty *vty) vty_out (vty, "%s", VTY_NEWLINE); } else - vty_out (vty, " Outgoing update filter list for all interface is not set%s", VTY_NEWLINE); + vty_out (vty, + " Outgoing update filter list for all interface is not set%s", + VTY_NEWLINE); for (i = 0; i < disthash->size; i++) for (mp = disthash->index[i]; mp; mp = mp->next) @@ -680,7 +670,9 @@ config_show_distribute (struct vty *vty) vty_out (vty, "%s", VTY_NEWLINE); } else - vty_out (vty, " Incoming update filter list for all interface is not set%s", VTY_NEWLINE); + vty_out (vty, + " Incoming update filter list for all interface is not set%s", + VTY_NEWLINE); for (i = 0; i < disthash->size; i++) for (mp = disthash->index[i]; mp; mp = mp->next) @@ -721,8 +713,7 @@ config_write_distribute (struct vty *vty { vty_out (vty, " distribute-list %s in %s%s", dist->list[DISTRIBUTE_IN], - dist->ifname ? dist->ifname : "", - VTY_NEWLINE); + dist->ifname ? dist->ifname : "", VTY_NEWLINE); write++; } @@ -729,10 +720,8 @@ config_write_distribute (struct vty *vty if (dist->list[DISTRIBUTE_OUT]) { vty_out (vty, " distribute-list %s out %s%s", - dist->list[DISTRIBUTE_OUT], - dist->ifname ? dist->ifname : "", - VTY_NEWLINE); + dist->ifname ? dist->ifname : "", VTY_NEWLINE); write++; } @@ -740,8 +729,7 @@ config_write_distribute (struct vty *vty { vty_out (vty, " distribute-list prefix %s in %s%s", dist->prefix[DISTRIBUTE_IN], - dist->ifname ? dist->ifname : "", - VTY_NEWLINE); + dist->ifname ? dist->ifname : "", VTY_NEWLINE); write++; } @@ -749,8 +737,7 @@ config_write_distribute (struct vty *vty { vty_out (vty, " distribute-list prefix %s out %s%s", dist->prefix[DISTRIBUTE_OUT], - dist->ifname ? dist->ifname : "", - VTY_NEWLINE); + dist->ifname ? dist->ifname : "", VTY_NEWLINE); write++; } } @@ -771,7 +758,8 @@ distribute_list_init (int node) disthash = hash_create ((unsigned int (*) (void *)) distribute_hash_make, (int (*) (void *, void *)) distribute_cmp); - if(node==RIP_NODE) { + if (node == RIP_NODE) + { install_element (RIP_NODE, &distribute_list_all_cmd); install_element (RIP_NODE, &no_distribute_list_all_cmd); install_element (RIP_NODE, &distribute_list_cmd); @@ -780,7 +768,9 @@ distribute_list_init (int node) install_element (RIP_NODE, &no_distribute_list_prefix_all_cmd); install_element (RIP_NODE, &distribute_list_prefix_cmd); install_element (RIP_NODE, &no_distribute_list_prefix_cmd); - } else { + } + else + { install_element (RIPNG_NODE, &ipv6_distribute_list_all_cmd); install_element (RIPNG_NODE, &no_ipv6_distribute_list_all_cmd); install_element (RIPNG_NODE, &ipv6_distribute_list_cmd); --- quagga-0.99.9/lib/distribute.h 2005-05-03 10:26:11.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/distribute.h 2008-06-02 09:23:52.000000000 -0700 @@ -51,7 +51,9 @@ extern struct distribute *distribute_loo extern int config_write_distribute (struct vty *); extern int config_show_distribute (struct vty *); -extern enum filter_type distribute_apply_in (struct interface *, struct prefix *); -extern enum filter_type distribute_apply_out (struct interface *, struct prefix *); +extern enum filter_type distribute_apply_in (struct interface *, + struct prefix *); +extern enum filter_type distribute_apply_out (struct interface *, + struct prefix *); #endif /* _ZEBRA_DISTRIBUTE_H */ --- quagga-0.99.9/lib/filter.c 2005-09-29 07:41:06.000000000 -0700 +++ quagga-0.99.9.ospfv3-manetmdr.tmp/lib/filter.c 2008-06-02 09:23:52.000000000 -0700 @@ -92,8 +92,7 @@ struct access_master }; /* Static structure for IPv4 access_list's master. */ -static struct access_master access_master_ipv4 = -{ +static struct access_master access_master_ipv4 = { {NULL, NULL}, {NULL, NULL}, NULL, @@ -102,8 +101,7 @@ static struct access_master access_maste #ifdef HAVE_IPV6 /* Static structure for IPv6 access_list's master. */ -static struct access_master access_master_ipv6 = -{ +static struct access_master access_master_ipv6 = { {NULL, NULL}, {NULL, NULL}, NULL, @@ -577,8 +575,7 @@ vty_access_list_remark_unset (struct vty access = access_list_lookup (afi, name); if (! access) { - vty_out (vty, "%% access-list %s doesn't exist%s", name, - VTY_NEWLINE); + vty_out (vty, "%% access-list %s doesn't exist%s", name, VTY_NEWLINE); return CMD_WARNING; } @@ -624,16 +621,14 @@ filter_set_cisco (struct vty *vty, const ret = inet_aton (addr_str, &addr); if (ret <= 0) { - vty_out (vty, "%%Inconsistent address and mask%s", - VTY_NEWLINE); + vty_out (vty, "%%Inconsistent address and mask%s", VTY_NEWLINE); return CMD_WARNING; } ret = inet_aton (addr_mask_str, &addr_mask); if (ret <= 0) { - vty_out (vty, "%%Inconsistent address and mask%s", - VTY_NEWLINE); + vty_out (vty, "%%Inconsistent address and mask%s", VTY_NEWLINE); return CMD_WARNING; } @@ -642,16 +637,14 @@ filter_set_cisco (struct vty *vty, const ret = inet_aton (mask_str, &mask); if (ret <= 0) { - vty_out (vty, "%%Inconsistent address and mask%s", - VTY_NEWLINE); + vty_out (vty, "%%Inconsistent address and mask%s", VTY_NEWLINE); return CMD_WARNING; } ret = inet_aton (mask_mask_str, &mask_mask); if (ret <= 0) { - vty_out (vty, "%%Inconsistent address and mask%s", - VTY_NEWLINE); + vty_out (vty, "%%Inconsistent address and mask%s", VTY_NEWLINE); return CMD_WARNING; } } @@ -702,9 +695,7 @@ DEFUN (access_list_standard, "IP standard access list\n" "IP standard access list (expanded range)\n" "Specify packets to reject\n" - "Specify packets to forward\n" - "Address to match\n" - "Wildcard bits\n") + "Specify packets to forward\n" "Address to match\n" "Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], argv[3], NULL, NULL, 0, 1); @@ -717,8 +708,7 @@ DEFUN (access_list_standard_nomask, "IP standard access list\n" "IP standard access list (expanded range)\n" "Specify packets to reject\n" - "Specify packets to forward\n" - "Address to match\n") + "Specify packets to forward\n" "Address to match\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", NULL, NULL, 0, 1); @@ -732,8 +722,7 @@ DEFUN (access_list_standard_host, "IP standard access list (expanded range)\n" "Specify packets to reject\n" "Specify packets to forward\n" - "A single host address\n" - "Address to match\n") + "A single host address\n" "Address to match\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", NULL, NULL, 0, 1); @@ -746,8 +735,7 @@ DEFUN (access_list_standard_any, "IP standard access list\n" "IP standard access list (expanded range)\n" "Specify packets to reject\n" - "Specify packets to forward\n" - "Any source host\n") + "Specify packets to forward\n" "Any source host\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", "255.255.255.255", NULL, NULL, 0, 1); @@ -761,9 +749,7 @@ DEFUN (no_access_list_standard, "IP standard access list\n" "IP standard access list (expanded range)\n" "Specify packets to reject\n" - "Specify packets to forward\n" - "Address to match\n" - "Wildcard bits\n") + "Specify packets to forward\n" "Address to match\n" "Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], argv[3], NULL, NULL, 0, 0); @@ -777,8 +763,7 @@ DEFUN (no_access_list_standard_nomask, "IP standard access list\n" "IP standard access list (expanded range)\n" "Specify packets to reject\n" - "Specify packets to forward\n" - "Address to match\n") + "Specify packets to forward\n" "Address to match\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", NULL, NULL, 0, 0); @@ -793,8 +778,7 @@ DEFUN (no_access_list_standard_host, "IP standard access list (expanded range)\n" "Specify packets to reject\n" "Specify packets to forward\n" - "A single host address\n" - "Address to match\n") + "A single host address\n" "Address to match\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], "0.0.0.0", NULL, NULL, 0, 0); @@ -808,8 +792,7 @@ DEFUN (no_access_list_standard_any, "IP standard access list\n" "IP standard access list (expanded range)\n" "Specify packets to reject\n" - "Specify packets to forward\n" - "Any source host\n") + "Specify packets to forward\n" "Any source host\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", "255.255.255.255", NULL, NULL, 0, 0); @@ -827,8 +810,7 @@ DEFUN (access_list_extended, "Any Internet Protocol\n" "Source address\n" "Source wildcard bits\n" - "Destination address\n" - "Destination Wildcard bits\n") + "Destination address\n" "Destination Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], 1 ,1); @@ -843,13 +825,10 @@ DEFUN (access_list_extended_mask_any, "Specify packets to reject\n" "Specify packets to forward\n" "Any Internet Protocol\n" - "Source address\n" - "Source wildcard bits\n" - "Any destination host\n") + "Source address\n" "Source wildcard bits\n" "Any destination host\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], "0.0.0.0", - "255.255.255.255", 1, 1); + argv[3], "0.0.0.0", "255.255.255.255", 1, 1); } DEFUN (access_list_extended_any_mask, @@ -862,12 +841,10 @@ DEFUN (access_list_extended_any_mask, "Specify packets to forward\n" "Any Internet Protocol\n" "Any source host\n" - "Destination address\n" - "Destination Wildcard bits\n") + "Destination address\n" "Destination Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], - argv[3], 1, 1); + "255.255.255.255", argv[2], argv[3], 1, 1); } DEFUN (access_list_extended_any_any, @@ -878,9 +855,7 @@ DEFUN (access_list_extended_any_any, "IP extended access list (expanded range)\n" "Specify packets to reject\n" "Specify packets to forward\n" - "Any Internet Protocol\n" - "Any source host\n" - "Any destination host\n") + "Any Internet Protocol\n" "Any source host\n" "Any destination host\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", "255.255.255.255", "0.0.0.0", @@ -898,12 +873,10 @@ DEFUN (access_list_extended_mask_host, "Any Internet Protocol\n" "Source address\n" "Source wildcard bits\n" - "A single destination host\n" - "Destination address\n") + "A single destination host\n" "Destination address\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], argv[4], - "0.0.0.0", 1, 1); + argv[3], argv[4], "0.0.0.0", 1, 1); } DEFUN (access_list_extended_host_mask, @@ -917,12 +890,10 @@ DEFUN (access_list_extended_host_mask, "Any Internet Protocol\n" "A single source host\n" "Source address\n" - "Destination address\n" - "Destination Wildcard bits\n") + "Destination address\n" "Destination Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], - argv[4], 1, 1); + "0.0.0.0", argv[3], argv[4], 1, 1); } DEFUN (access_list_extended_host_host, @@ -936,12 +907,10 @@ DEFUN (access_list_extended_host_host, "Any Internet Protocol\n" "A single source host\n" "Source address\n" - "A single destination host\n" - "Destination address\n") + "A single destination host\n" "Destination address\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], - "0.0.0.0", 1, 1); + "0.0.0.0", argv[3], "0.0.0.0", 1, 1); } DEFUN (access_list_extended_any_host, @@ -954,12 +923,10 @@ DEFUN (access_list_extended_any_host, "Specify packets to forward\n" "Any Internet Protocol\n" "Any source host\n" - "A single destination host\n" - "Destination address\n") + "A single destination host\n" "Destination address\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], - "0.0.0.0", 1, 1); + "255.255.255.255", argv[2], "0.0.0.0", 1, 1); } DEFUN (access_list_extended_host_any, @@ -971,13 +938,10 @@ DEFUN (access_list_extended_host_any, "Specify packets to reject\n" "Specify packets to forward\n" "Any Internet Protocol\n" - "A single source host\n" - "Source address\n" - "Any destination host\n") + "A single source host\n" "Source address\n" "Any destination host\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", "0.0.0.0", - "255.255.255.255", 1, 1); + "0.0.0.0", "0.0.0.0", "255.255.255.255", 1, 1); } DEFUN (no_access_list_extended, @@ -992,8 +956,7 @@ DEFUN (no_access_list_extended, "Any Internet Protocol\n" "Source address\n" "Source wildcard bits\n" - "Destination address\n" - "Destination Wildcard bits\n") + "Destination address\n" "Destination Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], 1, 0); @@ -1009,13 +972,10 @@ DEFUN (no_access_list_extended_mask_any, "Specify packets to reject\n" "Specify packets to forward\n" "Any Internet Protocol\n" - "Source address\n" - "Source wildcard bits\n" - "Any destination host\n") + "Source address\n" "Source wildcard bits\n" "Any destination host\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], "0.0.0.0", - "255.255.255.255", 1, 0); + argv[3], "0.0.0.0", "255.255.255.255", 1, 0); } DEFUN (no_access_list_extended_any_mask, @@ -1029,12 +989,10 @@ DEFUN (no_access_list_extended_any_mask, "Specify packets to forward\n" "Any Internet Protocol\n" "Any source host\n" - "Destination address\n" - "Destination Wildcard bits\n") + "Destination address\n" "Destination Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], - argv[3], 1, 0); + "255.255.255.255", argv[2], argv[3], 1, 0); } DEFUN (no_access_list_extended_any_any, @@ -1046,9 +1004,7 @@ DEFUN (no_access_list_extended_any_any, "IP extended access list (expanded range)\n" "Specify packets to reject\n" "Specify packets to forward\n" - "Any Internet Protocol\n" - "Any source host\n" - "Any destination host\n") + "Any Internet Protocol\n" "Any source host\n" "Any destination host\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", "255.255.255.255", "0.0.0.0", @@ -1067,12 +1023,10 @@ DEFUN (no_access_list_extended_mask_host "Any Internet Protocol\n" "Source address\n" "Source wildcard bits\n" - "A single destination host\n" - "Destination address\n") + "A single destination host\n" "Destination address\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - argv[3], argv[4], - "0.0.0.0", 1, 0); + argv[3], argv[4], "0.0.0.0", 1, 0); } DEFUN (no_access_list_extended_host_mask, @@ -1087,12 +1041,10 @@ DEFUN (no_access_list_extended_host_mask "Any Internet Protocol\n" "A single source host\n" "Source address\n" - "Destination address\n" - "Destination Wildcard bits\n") + "Destination address\n" "Destination Wildcard bits\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], - argv[4], 1, 0); + "0.0.0.0", argv[3], argv[4], 1, 0); } DEFUN (no_access_list_extended_host_host, @@ -1107,12 +1059,10 @@ DEFUN (no_access_list_extended_host_host "Any Internet Protocol\n" "A single source host\n" "Source address\n" - "A single destination host\n" - "Destination address\n") + "A single destination host\n" "Destination address\n") { return filter_set_cisco (vty, argv[0], argv[1], argv[2], - "0.0.0.0", argv[3], - "0.0.0.0", 1, 0); + "0.0.0.0", argv[3], "0.0.0.0", 1, 0); } DEFUN (no_access_list_extended_any_host, @@ -1126,12 +1076,10 @@ DEFUN (no_access_list_extended_any_host, "Specify packets to forward\n" "Any Internet Protocol\n" "Any source host\n" - "A single destination host\n" - "Destination address\n") + "A single destination host\n" "Destination address\n") { return filter_set_cisco (vty, argv[0], argv[1], "0.0.0.0", - "255.255.255.255", argv[2], - "0.0.0.0", 1, 0); + "255.255.255.255", argv[2], "0.0.0.0", 1, 0); } DEFUN (no_access_list_extended_host_any, @@ -1144,13 +1092,10 @@ DEFUN (no_access_list_extended_host_any, "Specify packets to reject\n" "Specify packets to forward\n" "Any Internet Protocol\n" - "A single source host\n" - "Source address\n" - "Any destination host\n") + "A single source host\n" "Source address\n" "