Adding NDN testbed
diff --git a/mininet/conf_parser.py b/mininet/conf_parser.py
index c9fe119..2e8014c 100644
--- a/mininet/conf_parser.py
+++ b/mininet/conf_parser.py
@@ -1,49 +1,49 @@
 import ConfigParser, re
 
 class confCCNHost():
-    
+
     def __init__(self, name, app='', uri_tuples='', cpu=None, cores=None):
         self.name = name
         self.app = app
         self.uri_tuples = uri_tuples
         self.cpu = cpu
         self.cores = cores
-        
+
     def __repr__(self):
         return 'Name: ' + self.name + ' App: ' + self.app + ' URIS: ' + str(self.uri_tuples) + ' CPU:' + str(self.cpu) + ' Cores:' +str(self.cores)
 
 class confCCNLink():
-    
+
     def __init__(self,h1,h2,linkDict=None):
         self.h1 = h1
         self.h2 = h2
         self.linkDict = linkDict
-        
+
     def __repr__(self):
         return 'h1: ' + self.h1 + ' h2: ' + self.h2 + ' params: ' + str(self.linkDict)
-    
+
 def parse_hosts(conf_arq):
     'Parse hosts section from the conf file.'
     config = ConfigParser.RawConfigParser()
     config.read(conf_arq)
-    
+
     hosts = []
-    
+
     items = config.items('hosts')
-    
+
     for item in items:
 
         name = item[0]
-  
+
         rest = item[1].split()
 
         app = rest.pop(0)
-        
+
         uris = rest
         uri_list=[]
         cpu = None
         cores = None
-        
+
         for uri in uris:
             if re.match("cpu",uri):
                 cpu = float(uri.split('=')[1])
@@ -51,9 +51,9 @@
                 cores = uri.split('=')[1]
             else:
                 uri_list.append((uri.split(',')[0],uri.split(',')[1]))
-        
+
         hosts.append(confCCNHost(name , app, uri_list,cpu,cores))
-    
+
     return hosts
 
 def parse_routers(conf_arq):
@@ -62,65 +62,66 @@
     config.read(conf_arq)
 
     routers = []
-    
+
     items = config.items('routers')
-    
+
     for item in items:
         name = item[0]
-  
+
         rest = item[1].split()
 
         uris = rest
         uri_list=[]
         cpu = None
         cores = None
-        
+
         for uri in uris:
             if re.match("cpu",uri):
                 cpu = float(uri.split('=')[1])
             elif re.match("cores",uri):
-                cores = uri.split('=')[1]    
+                cores = uri.split('=')[1]
             else:
                 uri_list.append((uri.split(',')[0],uri.split(',')[1]))
-        
+
         routers.append(confCCNHost(name=name , uri_tuples=uri_list, cpu=cpu, cores=cores))
-    
+
     return routers
 
 def parse_links(conf_arq):
     'Parse links section from the conf file.'
     arq = open(conf_arq,'r')
-    
+
     links = []
-     
+
     while True:
         line = arq.readline()
         if line == '[links]\n':
             break
-    
+
     while True:
         line = arq.readline()
         if line == '':
             break
-        
+
         args = line.split()
         h1, h2 = args.pop(0).split(':')
-        
+
         link_dict = {}
-        
+
         for arg in args:
             arg_name, arg_value = arg.split('=')
             key = arg_name
             value = arg_value
-            if key in ['loss','bw','jitter','max_queue_size']:
+            if key in ['bw','jitter','max_queue_size']:
                 value = int(value)
-            
+            if key in ['loss']:
+                value = float(value)
             link_dict[key] = value
-            
+
         links.append(confCCNLink(h1,h2,link_dict))
-        
-        
+
+
     return links
-        
-        
-    
+
+
+
diff --git a/mininet/node.py b/mininet/node.py
index f8ec8c9..7f3c4c7 100644
--- a/mininet/node.py
+++ b/mininet/node.py
@@ -553,7 +553,7 @@
     pass
 
 
-        
+
 class CPULimitedHost( Host ):
 
     "CPU limited host"
@@ -592,7 +592,7 @@
         "Return value of cgroup parameter"
         cmd = 'cgget -r %s.%s /%s' % (
             resource, param, self.name )
-        
+
         return int(quietRun( cmd ).split()[ -1 ] )
 
     def cgroupDel( self ):
@@ -721,29 +721,31 @@
 
     def __init__( self, name, **kwargs ):
 
-        
+
         Host.__init__( self, name, **kwargs )
         if not CCNHost.inited:
             CCNHost.init()
-           
+
+       # self.cmd("export CCND_DEBUG=6")
+       # self.cmd("export CCND_LOG=./log.{0}".format(self.name))
         self.cmd("export CCN_LOCAL_SOCKNAME=/tmp/.sock.ccnx.{0}".format(self.name))
         self.cmd("ccndstart")
         self.peerList = {}
 
     def config( self, fib=None, app=None, **params ):
-             
+
         r = Node.config( self, **params )
-        
+
         self.setParam( r, 'app', fib=fib )
         self.setParam( r, 'fib', app=app)
-        
+
         return r
-    
+
     def configCCN(self):
-        
+
         self.buildPeerIP()
         self.setFIB()
-    
+
     def buildPeerIP(self):
         for iface in self.intfList():
             link = iface.link
@@ -753,8 +755,8 @@
                     self.peerList[node2.name] = link.intf2.node.IP(link.intf2)
                 else:
                     self.peerList[node1.name] = link.intf1.node.IP(link.intf1)
-        
-        
+
+
     def setFIB(self):
 
         for name in self.params['fib']:
@@ -762,53 +764,57 @@
                 pass
             else:
                 self.insert_fib(name[0],self.peerList[name[1]])
-            
-        
+
+
     def insert_fib(self, uri, host):
         self.cmd('ccndc add {0} tcp {1}'.format(uri,host))
-        
+ #	 self.cmd('ccndc add {0} udp {1}'.format(uri,host))
+
     def terminate( self ):
         "Stop node."
         self.cmd('ccndstop')
+        self.cmd('killall -r zebra ospf')
         Host.terminate(self)
-        
+
     inited = False
 
-    
+
     @classmethod
     def init( cls ):
         "Initialization for CCNHost class"
         cls.inited = True
-        
+
 class CPULimitedCCNHost( CPULimitedHost ):
     '''CPULimitedCCNHost is a Host that always runs the ccnd daemon and extends CPULimitedHost.
        It should be used when one wants to limit the resources of CCN routers and hosts '''
-    
+
 
     def __init__( self, name, sched='cfs', **kwargs ):
-        
+
         CPULimitedHost.__init__( self, name, sched, **kwargs )
         if not CCNHost.inited:
             CCNHost.init()
-            
-        self.cmd("export CCN_LOCAL_SOCKNAME=/tmp/.sock.ccnx.{0}".format(self.name))
+
+       # self.cmd("export CCND_DEBUG=6")
+       # self.cmd("export CCND_LOG=./log.{0}".format(self.name))
+	self.cmd("export CCN_LOCAL_SOCKNAME=/tmp/.sock.ccnx.{0}".format(self.name))
         self.cmd("ccndstart")
         self.peerList = {}
 
-    def config( self, fib=None, app=None, cpu=None, cores=None, **params):   
+    def config( self, fib=None, app=None, cpu=None, cores=None, **params):
 
         r = CPULimitedHost.config(self,cpu,cores, **params)
-        
+
         self.setParam( r, 'app', fib=fib )
         self.setParam( r, 'fib', app=app)
-        
+
         return r
-    
+
     def configCCN(self):
-        
+
         self.buildPeerIP()
         self.setFIB()
-    
+
     def buildPeerIP(self):
         for iface in self.intfList():
             link = iface.link
@@ -818,8 +824,8 @@
                     self.peerList[node2.name] = link.intf2.node.IP(link.intf2)
                 else:
                     self.peerList[node1.name] = link.intf1.node.IP(link.intf1)
-        
-        
+
+
     def setFIB(self):
 
         for name in self.params['fib']:
@@ -827,19 +833,21 @@
                 pass
             else:
                 self.insert_fib(name[0],self.peerList[name[1]])
-            
-        
+
+
     def insert_fib(self, uri, host):
         self.cmd('ccndc add {0} tcp {1}'.format(uri,host))
-        
+#	self.cmd('ccndc add {0} udp {1}'.format(uri,host))
+
     def terminate( self ):
         "Stop node."
         self.cmd('ccndstop')
+        self.cmd('killall -r zebra ospf')
         Host.terminate(self)
-        
+
     inited = False
 
-    
+
     @classmethod
     def init( cls ):
         "Initialization for CCNHost class"