#
# OLSR.org routing daemon config file
# This file contains ALL available options and explanations about them
#
# Lines starting with a # are discarded
#

#### ATTENTION for IPv6 users ####
# Because of limitations in the parser IPv6 addresses must NOT
# begin with a ":", so please add a "0" as a prefix.

###########################
### Basic configuration ###
###########################
# keep this settings at the beginning of your first configuration file

# Debug level (0-9)
# If set to 0 the daemon runs in the background, unless "NoFork" is set to true
# (Default is 1)

DebugLevel  0

# IP version to use (4 or 6)
# (Default is 4)

IpVersion 4

#################################
### OLSRd agent configuration ###
#################################
# this parameters control the settings of the routing agent which are not
# related to the OLSR protocol and it's extensions

# Clear the screen each time the internal state changes
# (Default is yes)

# ClearScreen     yes

# Should olsrd keep on running even if there are
# no interfaces available? This is a good idea
# for a PCMCIA/USB hotswap environment.
# (Default is yes)

# AllowNoInt  yes

# LockFile
# The lockfile is used to prevent multiple OLSR instances running at the same
# time.
# (Linux/BSD default is "/var/run/olsrd-ipv(4/6).lock")
# (Win32 default is "<configfile>-ipv(4/6).lock")

LockFile "/tmp/olsrd.lock"

# Polling rate for OLSR sockets in seconds (float). 
# (Default is 0.05)

# Pollrate  0.05

# Interval to poll network interfaces for configuration changes (in seconds).
# Linux systems can detect interface statechange via netlink sockets.
# (Defaults is 2.5)

# NicChgsPollInt  2.5

# TOS(type of service) value for the IP header of control traffic.
# (Default is 16)

# TosValue 16

# FIBMetric controls the metric value of the host-routes OLSRd sets.
# - "flat" means that the metric value is always 2. This is the preferred value
#   because it helps the linux kernel routing to clean up older routes
# - "correct" use the hopcount as the metric value.
# - "approx" use the hopcount as the metric value too, but does only update the
#   hopcount if the nexthop changes too
# (Default is "flat")

# FIBMetric "flat"

#######################################
### Linux specific OLSRd extensions ###
#######################################
# these parameters are only working on linux at the moment, but might become
# useful on BSD in the future

# SrcIpRoutes tells OLSRd to set the Src flag of host routes to the originator-ip
# of the node. In addition to this an additional localhost device is created
# to make sure the returning traffic can be received.
# (Default is "no")

# SrcIpRoutes no

# Specify the proto tag to be used for routes olsr inserts into kernel
# currently only implemented for linux
# valid values under linux are 1 .. 254
# 1 gets remapped by olsrd to 0 UNSPECIFIED (1 is reserved for ICMP redirects)
# 2 KERNEL routes (not very wise to use)
# 3 BOOT (should in fact not be used by routing daemons)
# 4 STATIC 
# 8 .. 15 various routing daemons (gated, zebra, bird, & co)
# (defaults to 0 which gets replaced by an OS-specific default value
# under linux 3 (BOOT) (for backward compatibility)

# RtProto 0

# Specifies the routing Table olsr uses
# RtTable is for host routes, RtTableDefault for the route to the default
# internet gateway (2 in case of IPv6+NIIT) and RtTableTunnel is for
# routes to the ipip tunnels, valid values are 1 to 254
# There is a special parameter "auto" (choose default below)
# (with smartgw: default is 254/223/224)
# (without smartgw: default is 254/254/254, linux main table)

# RtTable auto
# RtTableDefault auto
# RtTableTunnel auto

# Specifies the policy rule priorities for the three routing tables and
# a special rule for smartgateway routing (see README-Olsr-Extensions)
# Priorities can only be set if three different routing tables are set.
# if set the values must obey to condition
# RtTablePriority < RtTableDefaultOlsrPriority
# < RtTableTunnelPriority < RtTableDefaultPriority.
# There are two special parameters, "auto" (choose fitting to SmartGW
# mode) and "none" (do not set policy rule)
# (with smartgw: default is none/32776/32776/32796)
# (without smartgw: default is none/none/none/none)

# RtTablePriority auto
# RtTableDefaultOlsrPriority auto
# RtTableTunnelPriority auto
# RtTableDefaultPriority auto

# Activates (in IPv6 mode) the automatic use of NIIT
# (see README-Olsr-Extensions)
# (default is "yes")

# UseNiit yes

# Activates the smartgateway ipip tunnel feature.
# See README-Olsr-Extensions for a description of smartgateways.
# (default is "yes")

SmartGateway yes

# Allows the selection of a smartgateway with NAT (only for IPv4)
# (default is "yes")

# SmartGatewayAllowNAT yes

# Determines the period (in milliseconds) on which a new smart gateway
# selection is performed.
# (default is 10000 milliseconds)

# SmartGatewayPeriod 10000

# Determines the number of times the link state database must be stable
# before a new smart gateway is selected.
# (default is 6)

# SmartGatewayStableCount 6

# When another gateway than the current one has a cost of less than the cost
# of the current gateway multiplied by SmartGatewayThreshold then the smart
# gateway is switched to the other gateway. The unit is percentage.
# (defaults to 0)

# SmartGatewayThreshold 0
SmartGatewayThreshold   67

# Defines what kind of Uplink this node will publish as a
# smartgateway. The existence of the uplink is detected by
# a route to 0.0.0.0/0, ::ffff:0:0/96 and/or 2000::/3.
# possible values are "none", "ipv4", "ipv6", "both"
# (default is "both")

# SmartGatewayUplink "both"

# Specifies if the local ipv4 uplink use NAT
# (default is "yes")

# SmartGatewayUplinkNAT yes

# Specifies the speed of the uplink in kilobit/s.
# First parameter is upstream, second parameter is downstream
# (default is 128/1024)

# SmartGatewaySpeed 128 1024
SmartGatewaySpeed 128 1024

# Specifies the EXTERNAL ipv6 prefix of the uplink. A prefix
# length of more than 64 is not allowed.
# (default is 0::/0

# SmartGatewayPrefix 0::/0

##############################
### OLSR protocol settings ###
##############################

# For testing purposes it may be nice to use another port for olsrd
# for using another port than the IANA assigned one 
# for a production network, there should be a good reason!!
# valid values are integers >1, please be careful with using reserved
# port numbers
# (default is 698, the IANA assigned olsr-port)

# OlsrPort 698

# Sets the main IP (originator ip) of the router. This IP will NEVER
# change during the uptime of olsrd.
# (default is 0.0.0.0, which triggers usage of the IP of the first interface)

# MainIp 10.0.0.1

# The fixed willingness to use (0-7)
# If not set willingness will be calculated
# dynamically based on battery/power status
# (default is 3)

# Willingness     3

# HNA (Host network association) allows the OLSR to announce
# additional IPs or IP subnets to the net that are reachable
# through this node.
# Syntax for HNA4 is "network-address    network-mask"
# Syntax for HNA6 is "network-address    prefix-length"
# (default is no HNA)
Hna4
{
# Internet gateway
0.0.0.0   0.0.0.0
# specific small networks reachable through this node
# 15.15.0.0 255.255.255.0
}
Hna6
{
# Internet gateway
#   0::                     0
# specific small networks reachable through this node
#   fec0:2200:106:0:0:0:0:0 48
}


# Hysteresis for link sensing (only for hopcount metric)
# Hysteresis adds more robustness to the link sensing
# but delays neighbor registration.
# (defaults to yes)

# UseHysteresis yes

# Hysteresis parameters (only for hopcount metric)
# Do not alter these unless you know what you are doing!
# Set to auto by default. Allowed values are floating point
# values in the interval 0,1
# THR_LOW must always be lower than THR_HIGH!!
# (default is 0.5/0.8/0.3)

# HystScaling  0.50
# HystThrHigh  0.80
# HystThrLow 0.30

# TC redundancy
# Specifies how much neighbor info should be sent in
# TC messages. Because of a design problem in the 0.5.x
# dijkstra implementation this value must be set to 2.
# 2 - send all neighbors
# (default is 2)

# TcRedundancy  2

# MPR coverage specifies how many MPRs a node should
# try select to reach every 2 hop neighbor. Because of
# a design problem in the 0.5.x lq mpr selection algorithm
# this value should be set to 7.
# (default is 7)

# MprCoverage 7
MprCoverage	1

################################
### OLSR protocol extensions ###
################################

# Link quality level switch between hopcount and 
# cost-based (mostly ETX) routing. Because of
# a design problem in the 0.5.x dijkstra algorithm this
# value should not be set to 1.
# 0 = do not use link quality
# 2 = use link quality for MPR selection and routing
# (default is 2)

# LinkQualityLevel 2

# Link quality algorithm (only for lq level 2)
# (see README-Olsr-Extensions)
# - "etx_float", a floating point  ETX with exponential aging
# - "etx_fpm", same as ext_float, but with integer arithmetic
# - "etx_ff" (ETX freifunk), an etx variant which use all OLSR
#   traffic (instead of only hellos) for ETX calculation
# - "etx_ffeth", an incompatible variant of etx_ff that allows
#   ethernet links with ETX 0.1.
# (defaults to "etx_ff")

LinkQualityAlgorithm    "etx_ffeth"

# Link quality aging factor (only for lq level 2)
# Tuning parameter for etx_float and etx_fpm, smaller values
# mean slower changes of ETX value. (allowed values are
# between 0.01 and 1.0)
# (default is 0.05)

# LinkQualityAging 0.05

# Fisheye mechanism for TCs (0 meansoff, 1 means on)
# (default is 1)

# LinkQualityFishEye  1
LinkQualityFishEye	0

#
# NatThreshold 
#
# (currently this is only in the freifunk firmware)
# If the NAT-Endpoint (the preferred 0/0 HNA emitting node)
# is to be changed, the ETX value of the current 0/0 is 
# multiplied with the NatThreshold value before being
# compared to the new one.
# The parameter can be a value between 0.1 and 1.0, but
# should be close to 1.0 if changed.
# WARNING: This parameter should not be used together with
# the etx_ffeth metric !!
# (defaults to 1.0)

# NatThreshold  1.0

#############################################################
### Configuration of the IPC to the windows GUI interface ###
#############################################################

IpcConnect
{
     # Determines how many simultaneously
     # IPC connections that will be allowed
     # Setting this to 0 disables IPC

     # MaxConnections  0

     # By default only 127.0.0.1 is allowed
     # to connect. Here allowed hosts and networks can
     # be added

     # Host            127.0.0.1
     # Host            10.0.0.5
     # Net             192.168.1.0 255.255.255.0     
}

#####################################
### Example plugin configurations ###
#####################################
# Olsrd plugins to load
# This must be the absolute path to the file
# or the loader will use the following scheme:
# - Try the paths in the LD_LIBRARY_PATH 
#   environment variable.
# - The list of libraries cached in /etc/ld.so.cache
# - /lib, followed by /usr/lib
#
# the examples in this list are for linux, so check if the plugin is
# available if you use windows/BSD.
# each plugin should have a README file in it's lib subfolder

# LoadPlugin "olsrd_httpinfo.dll"
LoadPlugin "./lib/httpinfo/olsrd_httpinfo.so.0.1"
{
    # port number the httpinfo plugin will be listening, default 1978
    PlParam     "port"   "8000"
    
    # ip address that can access the plugin, use "0.0.0.0"
    # to allow everyone
#    PlParam     "Host"   "127.0.0.1"
#   PlParam     "Host"   "80.23.53.22"
    
    # networks that can access the plugin (ip/netmask)
    # careful with 0.0.0.0/0, makes (ddos) attacks poss.
#    PlParam     "Net"    "127.0.0.1 255.0.0.0"
    PlParam     "Net"    "0.0.0.0 0.0.0.0"
#    PlParam     "Net"    "104.0.0.0 255.255.0.0"
#    PlParam     "Net"    "192.168.0.0 255.255.0.0"
}

# LoadPlugin "olsrd_txtinfo.dll"
LoadPlugin "./lib/txtinfo/olsrd_txtinfo.so.0.1"
{
    # port number the txtinfo plugin will be listening, default 2006
#   PlParam     "port"   "81"
    # ip address that can access the plugin, use "0.0.0.0"
    # to allow everyone
    PlParam     "Accept"   "127.0.0.1"
}

#LoadPlugin "olsrd_secure.so.0.3"
#{
    # define source of keyfile for secure plugin
    # see lib/secure/README_SECURE for more information
    
#   PlParam     "Keyfile"   "/etc/olsr-keyfile.txt"
#}

LoadPlugin "./lib/dyn_gw/olsrd_dyn_gw.so.0.5"
{
    # The plugin check interval can be set here in milliseconds.
    # The default is 1000 ms (1 second).
#    PlParam     "CheckInterval"  "5000"
    
    # The ping check interval in case there is any pinged host specified.
    # The default is 5 seconds.
#    PlParam     "PingInterval"   "40"
    
    # If one or more IPv4 addresses are given, do a ping on these in
    # descending order to validate that there is not only an entry in
    # routing table, but also a real network connection. If any of
    # these addresses could be pinged successfully, the test was
    # succesful, i.e. if the ping on the 1st address was successful,the
    # 2nd won't be pinged.
    #
    # The Ping list applies to the group of HNAs specified above or to the 
    # default internet gateway when no HNA is specified.
    #
    # Running the plugin without parameters acts as the 'old' dyn_gw_plain.
    
    #   The following ping entries for the internet gateway
#    PlParam "Ping"   "141.1.1.1"
#    PlParam "Ping"   "194.25.2.129"
    
    #   First group of HNAs with related ping host
#    PlParam    "HNA"    "192.168.80.0 255.255.255.0"
#    PlParam    "HNA"    "192.168.81.0 255.255.255.0"
#    PlParam    "Ping"   "192.168.81.12"
    
    #   Second HNA group with multiple related ping hosts.
    #   Specifying multiple ping hosts provides redundancy.
#    PlParam "HNA"    "192.168.100.0 255.255.255.0"
#    PlParam "HNA"    "192.168.101.0 255.255.255.0"
#    PlParam "HNA"    "192.168.102.0 255.255.255.0"
#    PlParam "Ping"   "192.168.100.10"
#    PlParam "Ping"   "192.168.101.10"
    
    #   Third HNA group without ping check
#    PlParam "HNA"    "192.168.200.0 255.255.255.0"
#    PlParam "HNA"    "192.168.201.0 255.255.255.0"
#    PlParam "HNA"    "192.168.202.0 255.255.255.0"

PlParam "HNA"   "0.0.0.0 0.0.0.0"
PlParam "HNA"   "0.0.0.0 128.0.0.0"
PlParam "HNA"   "128.0.0.0 128.0.0.0"
PlParam "HNA"   "0.0.0.0 192.0.0.0"
PlParam "HNA"   "64.0.0.0 192.0.0.0"
PlParam "HNA"   "128.0.0.0 192.0.0.0"
PlParam "HNA"   "192.0.0.0 192.0.0.0"
}

#LoadPlugin "olsrd_dyn_gw_plain.so.0.4"
#{
#}

LoadPlugin "./lib/p2pd/olsrd_p2pd.so.0.1.0"
{
  PlParam     "NonOlsrIf"    "lo"
  PlParam     "P2pdTtl"      "5"
  PlParam     "UdpDestPort"  "255.255.255.255 1211"
}

LoadPlugin "./lib/bmf/olsrd_bmf.so.1.7.0"
{
  PlParam     "NonOlsrIf"  "lo"
}

LoadPlugin "./lib/watchdog/olsrd_watchdog.so.0.1"
{
  PlParam "file" "/tmp/olsrd.watchdog"
  PlParam "interval" "5"
}

LoadPlugin "./lib/pud/olsrd_pud.so.1.1.0"
{
    # nodeIdType is used to indicate the type of the nodeId field and is a
    #            number in the range 0-255, with the following meaning:
    #
    #        0 : MAC address of sending interface
    #            (nodeId is not relevant)
    #        1 : an MSISDN number with 15 digits
    #        2 : a Tetra number with 17 digits
    #        3 : a DNS name
    #        4 : IPv4 address (OLSR main address) of the sending node
    #            (nodeId is not relevant)
    #        6 : IPv6 address (OLSR main address) of the sending node
    #            (nodeId is not relevant)
    #        7 : an AIS MMSI number with 9 digits
    #        8 : a URN number with 8 digits
    #      192 : a 7 digit number conforming to 'Nationaal Nummerplan
    #            Brandweer Nederland'
    #      193 : a 6 digit number conforming to 'Nationaal Nummerplan
    #            Ambulancezorg Nederland'
    #      194 : a 4 digit number in the range [1, 8191]
    #
    #      other numbers are reserved 
    #
    # Note: setting 4 or 6 is the same for olsrd: both mean 'use the main
    #       IP address, which is either an IPv4 or an IPv6 address, depending
    #       on the IP version under which olsrd is run.
    #
    # Default: 4 or 6, depending on the IP version olsrd is using
    #
    #PlParam     "nodeIdType"                   "4"

    # nodeId is the node identification with the meaning as indicated by the
    #        nodeIdType parameter. When not set AND the nodeIdType is 3 (DNS
    #        name) then the hostname is used.
    #
    # Note: Both the nodeIdType and nodeId fields are transported over
    #       OLSR, so care must be taken to keep the size of the nodeId
    #       parameter down.
    #
    # Default: none
    #
    #PlParam     "nodeId"                       "host.example.com"


    #
    # RX Parameters
    #

    # rxNonOlsrIf is a network interface on the host on which the plugin will
    #             listen for GPS multicasts. Multiple such interfaces can be
    #             specified by specifying the parameter multiple times.
    #
    # Default: none
    #
    PlParam     "rxNonOlsrIf"                  "lo"

    # rxAllowedSourceIpAddress is an IP address from which the plugin is
    #                          allowed to process/parse GPS sentences. When
    #                          this parameter is not configured then GPS
    #                          sentences from ALL IP addresses are processed.
    #                          Multiple IP addresses can be specified by
    #                          specifying the parameter multiple times.
    #
    # Default: none
    #
    PlParam     "rxAllowedSourceIpAddress"     "127.0.0.1"

    # rxMcAddr is the multicast address on which the plugin will listen for GPS
    #          multicasts.
    #
    # Default: 224.0.0.224 (IPv4) or FF02:0:0:0:0:0:0:1 (IPv6)
    #
    #PlParam     "rxMcAddr"                     "224.0.0.224"

    # rxMcPort is the UDP port on which the plugin will listen for GPS
    #          multicasts.
    #
    # Default: 2240
    #
    #PlParam     "rxMcPort"                     "2240"

    # positionFile is the file that contains the position information that the
    #              plugin should use. When this parameter is set then the
    #              file is read during olsrd startup.
    #PlParam     "positionFile"                 "/etc/olsrd.pud.position.conf"

    #
    # TX Parameters
    #

    # txNonOlsrIf is a network interface on the host on which the plugin will
    #             transmit GPS multicasts that were received through the OLSR
    #             network. Multiple such interfaces can be specified by
    #             specifying the parameter multiple times.
    #
    # Default: none
    #
    PlParam     "txNonOlsrIf"                  "lo"

    # txMcAddr is the multicast address on which the plugin will transmit GPS
    #          multicasts that were received through the OLSR network.
    #
    # Default: 224.0.0.224 (IPv4) or FF02:0:0:0:0:0:0:1 (IPv6)
    #
    #PlParam     "txMcAddr"                     "224.0.0.224"

    # txMcPort is the UDP port on which the plugin will transmit GPS multicasts
    #          that were received through the OLSR network.
    #
    # Default: 2240
    #
    #PlParam     "txMcPort"                     "2240"

    # txTtl is the TTL that is used when transmitting GPS multicasts that were
    #       received through the OLSR network
    #
    # Default: 1
    #
    #PlParam     "txTtl"                        "1"

    # txNmeaMessagePrefix is the NMEA message prefix of GPS multicasts that the
    #                     plugin transmits. It must be exactly 4 characters
    #                     long.
    #
    # Default: NBSX
    #
    #PlParam     "txNmeaMessagePrefix"          "NBSX"


    #
    # Uplink Parameters
    #

    # uplinkAddr is the IP address to which the plugin will transmit GPS
    #            position updates. When not set, no uplink messages will be
    #            sent.
    #
    # Default: none
    #
    PlParam     "uplinkAddr"                   "127.0.0.1"

    # uplinkPort is the UDP port to which the plugin will transmit GPS position
    #            updates. Can't be the same as the downlink port.
    #
    # Default: 2241
    #
    #PlParam     "uplinkPort"                   "2241"

    # downlinkPort is the UDP port on which the plugin will receive GPS position
    #              updates. Can't be the same as the uplink port.
    #              The downlink is only active when a proper uplink has been
    #              configured.
    #
    # Default: 2242
    #
    #PlParam     "downlinkPort"                 "2242"


    #
    # OLSR Parameters
    #

    # olsrTtl is the TTL that is used when sending messages over the OLSR
    #         networks
    #
    # Default: 64
    #
    #PlParam     "olsrTtl"                      "64"


    #
    # Update Parameters
    #

    # updateIntervalStationary is the interval (in seconds) between position
    #                          updates sent over the OLSR network when the
    #                          node is stationary
    #
    # Default: 60
    #
    #PlParam     "updateIntervalStationary"     "60"

    # updateIntervalMoving is the interval (in seconds) between position
    #                      updates sent over the OLSR network when the
    #                      node is moving
    #
    # Default: 5
    #
    #PlParam     "updateIntervalMoving"         "5"

    # uplinkUpdateIntervalStationary is the interval (in seconds) between
    #                                position updates sent over the uplink when
    #                                the node is stationary
    #
    # Default: 180
    #
    #PlParam     "uplinkUpdateIntervalStationary"  "180"

    # uplinkUpdateIntervalMoving is the interval (in seconds) between position
    #                            updates sent over the OLSR network when the
    #                            node is moving
    #
    # Default: 15
    #
    #PlParam     "uplinkUpdateIntervalMoving"      "15"

    # gatewayDeterminationInterval is the interval (in seconds) on which
    #                              determination of the best gateway is
    #                              performed
    #
    # Default: 1
    #
    #PlParam     "gatewayDeterminationInterval"    "1"

    # movingSpeedThreshold is the speed from which we consider the node is
    #                      moving
    #
    # Default: 9
    #
    #PlParam     "movingSpeedThreshold"         "9"

    # movingDistanceThreshold is the distance from the previous position from
    #                         which we consider the node is moving
    #
    # Default: 50
    #
    #PlParam     "movingDistanceThreshold"      "50"

    # dopMultiplier One of the situations that is seen as movement is when the
    #               current position with its uncertainty circle no longer
    #               overlaps the last transmitted position with its uncertainty
    #               circle. This parameter is used to adjust the sizes of these
    #               uncertainty circles: setting it to a value less than 1.0
    #               will make both uncertainty circles smaller by this factor,
    #               resulting in earlier movement detection. Setting it to a
    #               value larger than 1.0 will detect movement later.
    #
    # Default: 2.5
    #
    #PlParam     "dopMultiplier"                "2.5"

    # defaultHdop is the default value that is taken for HDOP (in meters) in
    #             determining whether we are moving when there is a position
    #             available but no HDOP.
    #
    # Default: 50
    #
    #PlParam     "defaultHdop"                  "50"

    # defaultVdop is the default value that is taken for VDOP (in meters) in
    #             determining whether we are moving when there is a position
    #             available but no VDOP.
    #
    # Default: 50
    #
    #PlParam     "defaultVdop"                  "50"

    # averageDepth is the depth of the position average list, or the number
    #              of positions that are averaged to obtain the average
    #              position
    #
    # Default: 5
    #
    #PlParam     "averageDepth"                 "5"

    # hysteresisCountToStationary is the number of position updates that
    #                             effectuate a state transition from moving to
    #                             stationary that must be received before the
    #                             actual transition is taken
    #
    # Default: 17
    #
    #PlParam     "hysteresisCountToStationary"  "17"

    # hysteresisCountToMoving is the number of position updates that effectuate
    #                         a state transition from stationary to moving that
    #                         must be received before the actual transition is
    #                         taken
    #
    # Default: 5
    #
    #PlParam     "hysteresisCountToMoving"      "5"

    # gatewayHysteresisCountToStationary is the number of times the gateway
    #                             must be the same that effectuate a state transition from
    #                             moving to stationary that must be received
    #                             before the actual transition is taken
    #
    # Default: 17
    #
    #PlParam     "gatewayHysteresisCountToStationary"  "17"

    # gatewayHysteresisCountToMoving is the number of gateway updates that
    #                         effectuate a state transition from stationary to
    #                         moving that must be received before the actual
    #                         transition is taken
    #
    # Default: 5
    #
    #PlParam     "gatewayHysteresisCountToMoving"      "5"


    #
    # Other Plugin Parameters
    #

    # useDeDup determines whether duplicate message detection is to be
    #          performed. When 0 then no such detection is performed, when 1
    #          then the detection is performed 
    #
    # Default: 1
    #
    #PlParam     "useDeDup"                     "1"

    # deDupDepth the number of messages that are tracked to detect duplucates
    #            messages received from the OLSR network
    #
    # Default: 256
    #
    #PlParam     "deDupDepth"                   "256"

    # useLoopback determines whether the message that is sent over the OLSR
    #             network should be immediately looped back, thus pretending
    #             that the message (that is sent by this node) is received from
    #             the OLSR network. When 0 then no loopback is performed, when
    #             1 then the loopback is performed
    #
    # Default: 0
    #
    PlParam     "useLoopback"                  "1"
}

LoadPlugin "./lib/sgwdynspeed/olsrd_sgwdynspeed.so.1.0.0"
{
  # Specifies the file to watch for (dynamic) values for SmartGatewaySpeed.
  # If not specified then no watching is performed.
  # (default is unspecified)

  PlParam "speedFile" "./lib/sgwdynspeed/resources/olsrd.sgw.speed.conf"

  # Specifies the period in milliseconds on which to read the speedFile
  # (if it changed) and activate its new setting for SmartGatewaySpeed.
  # This setting is only relevant if speedFile has been configured.
  # (default is 10000 milliseconds)

  PlParam "speedFilePeriod" "2000"
}

#############################################
### OLSRD default interface configuration ###
#############################################
# the default interface section can have the same values as the following
# interface configuration. It will allow you so set common options for all
# interfaces.

InterfaceDefaults {
    # Ip4Broadcast      255.255.255.255
}

######################################
### OLSRd Interfaces configuration ###
######################################
# multiple interfaces can be specified for a single configuration block
# multiple configuration blocks can be specified

# WARNING, don't forget to insert your interface names here !
Interface "em1"
{
    # Interface Mode is used to prevent unnecessary
    # packet forwarding on switched ethernet interfaces
    # valid Modes are "mesh" and "ether"
    # (default is "mesh")

    # Mode "mesh"

    # IPv4 broadcast address for outgoing OLSR packets.
    # One usefull example would be 255.255.255.255
    # The second useful value would be to
    # specify the peer adress of an ptp-tunnel.
    # another name of this parameter is "IPv4Multicast"
    # (default is 0.0.0.0, which triggers the usage of the
    # interface broadcast IP)
    
    # Ip4Broadcast      0.0.0.0

    # IPv6 multicast address
    # (default is FF02::6D, the manet-router linklocal multicast)

    # IPv6Multicast FF02::6D

    # IPv4 src address for outgoing OLSR packages
    # (default is 0.0.0.0, which triggers usage of the interface IP)

    # IPv4Src 0.0.0.0

    # IPv6 src prefix. OLSRd will choose one of the interface IPs
    # which matches the prefix of this parameter.
    # (default is 0::/0, which triggers the usage
    # of a not-linklocal interface IP)

    # IPv6Src 0::/0
    
    # Emission intervals in seconds.
    # If not defined, Freifunk network defaults are used
    # (default is 2.0/20.0 for Hello and 5.0/300.0 for Tc/Mid/Hna)

    # HelloInterval       2.0
    # HelloValidityTime  20.0
    # TcInterval          5.0
    # TcValidityTime    300.0
    # MidInterval         5.0
    # MidValidityTime   300.0
    # HnaInterval         5.0
    # HnaValidityTime   300.0
HelloInterval     2.00
HelloValidityTime 20.00
TcInterval        5.00
TcValidityTime    30.00
MidInterval       5.00
MidValidityTime   50.00
HnaInterval       5.00
HnaValidityTime   15.00
    
    # When multiple links exist between hosts
    # the weight of interface is used to determine
    # the link to use. Normally the weight is
    # automatically calculated by olsrd based
    # on the characteristics of the interface,
    # but here you can specify a fixed value.
    # Olsrd will choose links with the lowest value.
    # Note:
    # Interface weight is used only when LinkQualityLevel is set to 0.
    # For any other value of LinkQualityLevel, the interface ETX
    # value is used instead.
    # Weight 0

    # If a certain route should be preferred 
    # or ignored by the mesh, the Link Quality 
    # value of a node can be multiplied with a factor 
    # entered here. In the example the route 
    # using 192.168.0.1 would rather be ignored.
    # A multiplier of 0.5 will result in a small
    # (bad) LinkQuality value and a high (bad)
    # ETX value.
    # Note:
    # Link quality multiplier is used only when
    # LinkQualityLevel is > 0.

    # example 1: reduce LQ to 192.168.0.1 by half
    # LinkQualityMult 192.168.0.1 0.5

    # example 2: reduce LQ to all nodes on this interface by 20%
    # LinkQualityMult default 0.8
}
