You are reading the README file for the RtConfig, router configuration
file generator, the first of the tools in RAToolSet. This is beta software
and there is hardly any documentation, save this README file.

DIRECTORIES
	peval/libpolparse
		C++ classes to query radbserver, parse policy expressions
		and expand AS macros, community names, database selectors,
		etc. 
		Authors: Andy Adams <ala@merit.edu>
		         Cengiz Alaettinoglu <cengiz@isi.edu>.
	peval   (Policy Evaluator)
		C++ classes to convert a policy expressions into a
		canonical form with different levels of expansion. 
		Authors: Cengiz Alaettinoglu <cengiz@isi.edu>.
	pol2filters/lib
		Perl library functions to to interface peval to Ripe 181
		objects to generate configuration files.
		Authors: Cengiz Alaettinoglu <cengiz@isi.edu>.
	pol2filters/lib/qradbserver.pl
		Perl library to query radbserver. 
		Authors: Rick Riolo <rlr@merit.edu>.
	pol2filters
		Perl library and examples to interface peval to Ripe 181
		objects to generate configuration files. Currently only
		network list based gated configuration files are
		supported. Next release will have AS path based
		configuration file generation.  
		Authors: Cengiz Alaettinoglu <cengiz@isi.edu>.
	genviews
		Perl routines to support route servers with multiple
		views. If you are not configuring route servers, you do
		not need this set of routines. 
		Authors: Cengiz Alaettinoglu <cengiz@isi.edu>.

Executables:
	peval/peval
		Policy Evaluator that prints policy expressions.
		Useful by other tools as well as human use.
		Can also print in gated format. 
		Cisco formats coming in the next release.
	pol2filters/eg:config.pl
		Example perl script to generate complete config files.
	pol2filters/abridge_gated.pl
		Truncates a gated config file so that thousands of lines
		are not displayed. (Contributed by Dale S. Johnson).

INSTALLATION
	0. To install, you need g++ 2.6.0 or higher and bison. 
	   If you do not have bison:
		The distribution includes parser.tab.c, output of
		bison. Hence you can still build peval without bison.
	   If you do not have g++:
		We can provide a statically linked executable for Sun
		Sparc Workstations with Sun OS 4.1.3.
	1. unzip and untar the distribution file
	2. on RtConfig directory, edit the make file to meet your system
	   configuration
	3. type "make all" or "make optimized", the latter turns on
	   optimization and turns off debugging.

Command line options:
	The following options are common to all programs (I think):
	-h host		database host (default toad.merit.edu)
	-p port		radbserver port (default 43)
	-s databases    default databases to query 
			(default pisitest,isitest,prdb,meritrr,ripe,testrr)

Other command line options for peval:
	-expand_as_macros	expand AS Macros
	-expand_communities	expand community names and dbselectors
	-expand_as		expand AS numbers into network lists
	-expand_all		expand everything
	-rusage			print resource usage
	-import			print import lists by default
	-export			print export lists by default
	-config			print in gated config file format
	-sync			print "END\n" on STDERR upon answering
				each query
	-T name			trace activity name which is one of
					all dbcxn_query dbcxn_reply input

Here are examples of peval:
	>./peval
	AS1 AND (AS2 OR AS1)
	((AS1))

	>./peval
	AS1 AND AS2
	NOT ANY

	Currently symbolic evaluation assumes two AS's do not have routes
	in common. Use -expand_as to change this behaviour.

	>./peval -expand_as
        AS1 AND AS2
	({1.87.45.0/24})

	(Using the hypothetical data in isitest).

	>./peval -expand_all
	AS1 AND NOT AS2 OR AS-MCI AND NOT COMM_BADGUYS OR {0.0.0.0/0}
	Just try and see.

Here is how to run eg:config.pl:
	>./eg:config.pl 

	May I suggest piping the output to abridge_gated.pl unless you
	really want to see all those network lists.

How to generate a config file:
	1. Examine eg:config.pl
	2. eg:config.pl consists of two parts
		a) initialization of host/port/dbases etc
		   set these to the match your preferences.
		b) config file part
		   use any perl print statements to print any static information
		   in the config file
		   use pol2filters_init, pol2filters, pol2filters_end to
		   print out any network lists.
		   call pol2filters_init with no arguments once before
		   first call to pol2filters.
		   call pol2filters_end with no arguments once after last
		   call to pol2filters.
		   An example pol2filters call:
		      &pol2filters(
			"AS690",             # ASN of the local border router
			"198.32.132.10/32",  # IP Address of the local
					     # border router
			"AS3561",            # ASN of the remote border router
			"198.32.132.12/32",  # IP Address of the local
					     # border router
			1,                   # 0 for importing 1 for exporting
			"man,AS690",         # string when given to radbserver
                                             # will return the object with
                                             # the correct policies
			""                   # should be empty string unless
					     # you are configuring route servers
		      );

How to generate config files other than gated:
	1. edit pol2filter/lib/pol2filters.pl
	2. create peval/f_<format>.{hh,cc} (see f_gated.{hh,cc} as an
	   example)
	3. edit peval.cc to call these new routines
	3. send us your contribution!
	4. In the future releases all necessary changes will be in perl.

Let me know if you face any problems. Bug reports and suggestions are
always welcome.
