Siena Fast Forwarding Documentation (v. 1.9.3)

driver.input

Example of input commands for the driver of the forwarding table. The syntax of commands is somehow similar to the syntax of C, especially that of literal values.

//
// C-style and C++-style comments are allowed.
//
ifconfig 2      price < 500,
                dest = "MXP",
                classes ** "Y"                          // ** means substring
        |
                alert = "connection refused",
                host = "www.example.com",
                port = 23
        |
                auction_group =* "guitars/electric",    // =* means prefix
                maker = "PRS",
                price < 2000
                
ifconfig 10     dest = "LGA",
                price < 300
        |
                system = "Siena",
                new_release = true
        |
                team > "d",
                team < "s",
                score > 0

//
// you can specify constaints for any value and/or any type.
//
ifconfig 20     dest any string,
                price < 300
        |
                system = "Siena",
                release any any

//
// before using the forwarding table to process messages, 
// we *must* consolidate its data structures.  
//
%consolidate

//
// the driver has the ability to collect statistics regarding the
// forwarding table, including the amount of processing (user) time
//
%timer_start

select          carrier = "UA"
                orig = "DEN"
                dest = "MXP"
                price = 700
                stops = 1
                classes = "Q,Y,P,F"

select          carrier = "UA"
                orig = "DEN"
                dest = "LGA"
                price = 200
                stops = 0
                classes = "Y,P"
%timer_stop
%print_statistics
//
// we can also change the number of pre-processing rounds here...
//
%pre_processing_limit = 20
%timer_start

select          carrier = "UA"
                orig = "DEN"
                dest = "MXP"
                price = 700
                stops = 1
                classes = "Q,Y,P,QF"

select          carrier = "UA"
                orig = "DEN"
                dest = "LGA"
                price = 200
                stops = 0
                classes = "Y,P"
%timer_stop
//
// we can clear the forwarding table using this command
//
%clear
//
// %clear also deallocates all the memory used by the forwarding table
// in order to clear the table maintaining (i.e., recycling) the
// allocated memory, we could use this:
// 
// %clear_recycle
//