; the general section contains all the general settings for router

general
{
; mandatory configuration command section network, site and router

    network /ndn/         ; name of the network the router belongs to in ndn URI format
    site /edu/memphis    ; name of the site the router belongs to in ndn URI format
    router /%C1.Router/cs/pollux    ; name of the router in ndn URI format

; lsa-refresh-time is the time in seconds, after which router will refresh its LSAs

    lsa-refresh-time 1800      ; default value 1800. Valid values 240-7200

; log-level is to set the levels of log for NLSR

    log-level  INFO       ; default value INFO, valid value DEBUG, INFO
    log-dir /var/log/nlsr/  ; path for log directory (Absolute path)
    seq-dir /var/lib/nlsr/  ; path for sequence directory (Absolute path)
}

; the neighbors section contains the configuration for router's neighbors and hello's behavior

neighbors
{
; in case hello interest timed out, router will try 'hello-retries' times at 'hello-time-out'
; seconds interval before giving up for any neighbors (deciding link is down)

   hello-retries 3                     ; interest retries number in integer. Default value 3
                                       ; valid values 1-10

   hello-timeout 1                    ; interest time out value in integer. Default value 1
                                       ; Valid values 1-15

   hello-interval  60                  ; interest sending interval in seconds. Default value 60
                                       ; valid values 30-90
; neighbor command is used to configure router's neighbor. Each neighbor will need
; one block of neighbor command

   neighbor
   {
       name /ndn/edu/memphis/%C1.Router/cs/castor        ; name prefix of the neighbor router consists
                                              ; of network, site-name and router-name

       face-uri  udp://castor.cs.memphis.edu  ; face uri of the face connected to the neighbor
       link-cost 25                         ; cost of the connecting link to neighbor
   }

   neighbor
   {
       name /ndn/edu/memphis/%C1.Router/cs/mira          ; name prefix of the neighbor router consists
                                              ; of network, site-name and router-name

       face-uri  udp://mira.cs.memphis.edu    ; face uri of the face connected to the neighbor
       link-cost 30                        ; cost of the connecting link to neighbor
   }
}

; the hyperbolic section contains the configuration settings of enabling a router to calculate
; routing table using [hyperbolic routing table calculation](http://arxiv.org/abs/0805.1266) method

hyperbolic
{
; commands in this section follows a strict order
; the switch is used to set hyperbolic routing calculation in NLSR

    state off             ; default value 'off', set value 'on' to enable hyperbolic routing table
                           ; calculation which turns link state routing 'off'. set value to 'dry-run"
                           ; to test hyperbolic routing and compare with link state routing.


    radius   123.456       ; radius of the router in hyperbolic coordinate system
    angle    1.45          ; angle of the router in hyperbolic coordinate system
}


; the fib section is used to configure fib entry's type to ndn FIB updated by NLSR

fib
{
; the max-faces-per-prefix is used to limit the number of faces for each name prefixes
; by NLSR in ndn FIB

    max-faces-per-prefix 3   ; default value 0. Valid value 0-60. By default (value 0) NLSR adds
                             ; all available faces for each reachable name prefixes in NDN FIB

}

; the advertising section contains the configuration settings of the name prefixes
; hosted by this router

advertising
{
; the ndnname is used to advertised name from the router. To advertise each name prefix
; configure one block of ndnname configuration command for every name prefix.

    prefix /ndn/edu/memphis/cs/netlab           ; name in ndn URI format
    prefix /ndn/edu/memphis/sports/basketball
}

security
{
  validator
  {
    rule
    {
      id "NSLR Hello Rule"
      for data
      filter
      {
        type name
        regex ^[^<NLSR><INFO>]*<NLSR><INFO><><>$
      }
      checker
      {
        type customized
        sig-type rsa-sha256
        key-locator
        {
          type name
          hyper-relation
          {
            k-regex ^([^<KEY><NLSR>]*)<NLSR><KEY><ksk-.*><ID-CERT>$
            k-expand \\1
            h-relation equal
            p-regex ^([^<NLSR><INFO>]*)<NLSR><INFO><><>$
            p-expand \\1
          }
        }
      }
    }

    rule
    {
      id "NSLR LSA Rule"
      for data
      filter
      {
        type name
        regex ^[^<NLSR><LSA>]*<NLSR><LSA>
      }
      checker
      {
        type customized
        sig-type rsa-sha256
        key-locator
        {
          type name
          hyper-relation
          {
            k-regex ^([^<KEY><NLSR>]*)<NLSR><KEY><ksk-.*><ID-CERT>$
            k-expand \\1
            h-relation equal
            p-regex ^([^<NLSR><LSA>]*)<NLSR><LSA>(<>*)<><><>$
            p-expand \\1\\2
          }
        }
      }
    }

    rule
    {
      id "NSLR Hierarchy Exception Rule"
      for data
      filter
      {
        type name
        regex ^[^<KEY><%C1.Router>]*<%C1.Router>[^<KEY><NLSR>]*<KEY><ksk-.*><ID-CERT><>$
      }
      checker
      {
        type customized
        sig-type rsa-sha256
        key-locator
        {
          type name
          hyper-relation
          {
	    k-regex ^([^<KEY><%C1.Operator>]*)<%C1.Operator>[^<KEY>]*<KEY><ksk-.*><ID-CERT>$
            k-expand \\1
            h-relation equal
            p-regex ^([^<KEY><%C1.Router>]*)<%C1.Router>[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$
            p-expand \\1
          }
        }
      }
    }

    rule
    {
      id "NSLR Hierarchical Rule"
      for data
      filter
      {
        type name
        regex ^[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$
      }
      checker
      {
        type hierarchical
        sig-type rsa-sha256
      }
    }

    trust-anchor
    {
      type file
      file-name "root.cert"
    }
  }
  ; cert-to-publish "root.cert"  ; optional, a file containing the root certificate. only the router
                                 ; that is designated to publish root cert needs to specify this
  ; cert-to-publish "site.cert"  ; optional, a file containing the root certificate. only the router
                                 ; that is designated to publish site cert need to specify this
  ; cert-to-publish "operator.cert" ; optional, a file containing the root certificate. only the
                                    ; router that is designated to publish operator cert need to
                                    ; specify this
  cert-to-publish "router.cert"  ; required, a file containing the router certificate.
}
