Search is not available for this dataset
repo
stringlengths
2
152
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_popen.py
#!/usr/bin/env python """ Test for popen.py and popenpoll.py """ import unittest import pexpect class testPopen( unittest.TestCase ): def pingTest( self, name ): "Verify that there are no dropped packets for each host" p = pexpect.spawn( 'python -m %s' % name ) opts = [ "<(h\d+)>: PING ", "<(h\d+)>: (\d+) packets transmitted, (\d+) received", pexpect.EOF ] pings = {} while True: index = p.expect( opts ) if index == 0: name = p.match.group(1) pings[ name ] = 0 elif index == 1: name = p.match.group(1) transmitted = p.match.group(2) received = p.match.group(3) # verify no dropped packets self.assertEqual( received, transmitted ) pings[ name ] += 1 else: break self.assertTrue( len(pings) > 0 ) # verify that each host has gotten results for count in pings.values(): self.assertEqual( count, 1 ) def testPopen( self ): self.pingTest( 'mininet.examples.popen' ) def testPopenPoll( self ): self.pingTest( 'mininet.examples.popenpoll' ) if __name__ == '__main__': unittest.main()
1,322
27.76087
71
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_sshd.py
#!/usr/bin/env python """ Test for sshd.py """ import unittest import pexpect from mininet.clean import sh class testSSHD( unittest.TestCase ): opts = [ '\(yes/no\)\?', 'refused', 'Welcome|\$|#', pexpect.EOF, pexpect.TIMEOUT ] def connected( self, ip ): "Log into ssh server, check banner, then exit" # Note: this test will fail if "Welcome" is not in the sshd banner # and '#'' or '$'' are not in the prompt p = pexpect.spawn( 'ssh -i /tmp/ssh/test_rsa %s' % ip, timeout=10 ) while True: index = p.expect( self.opts ) if index == 0: print p.match.group(0) p.sendline( 'yes' ) elif index == 1: return False elif index == 2: p.sendline( 'exit' ) p.wait() return True else: return False def setUp( self ): # create public key pair for testing sh( 'rm -rf /tmp/ssh' ) sh( 'mkdir /tmp/ssh' ) sh( "ssh-keygen -t rsa -P '' -f /tmp/ssh/test_rsa" ) sh( 'cat /tmp/ssh/test_rsa.pub >> /tmp/ssh/authorized_keys' ) cmd = ( 'python -m mininet.examples.sshd -D ' '-o AuthorizedKeysFile=/tmp/ssh/authorized_keys ' '-o StrictModes=no -o UseDNS=no -u0' ) # run example with custom sshd args self.net = pexpect.spawn( cmd ) self.net.expect( 'mininet>' ) def testSSH( self ): "Verify that we can ssh into all hosts (h1 to h4)" for h in range( 1, 5 ): self.assertTrue( self.connected( '10.0.0.%d' % h ) ) def tearDown( self ): self.net.sendline( 'exit' ) self.net.wait() # remove public key pair sh( 'rm -rf /tmp/ssh' ) if __name__ == '__main__': unittest.main()
1,853
29.393443
86
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_multipoll.py
#!/usr/bin/env python """ Test for multipoll.py """ import unittest import pexpect class testMultiPoll( unittest.TestCase ): def testMultiPoll( self ): "Verify that we receive one ping per second per host" p = pexpect.spawn( 'python -m mininet.examples.multipoll' ) opts = [ "\*\*\* (h\d) :" , "(h\d+): \d+ bytes from", "Monitoring output for (\d+) seconds", pexpect.EOF ] pings = {} while True: index = p.expect( opts ) if index == 0: name = p.match.group( 1 ) pings[ name ] = 0 elif index == 1: name = p.match.group( 1 ) pings[ name ] += 1 elif index == 2: seconds = int( p.match.group( 1 ) ) else: break self.assertTrue( len( pings ) > 0 ) # make sure we have received at least one ping per second for count in pings.values(): self.assertTrue( count >= seconds ) if __name__ == '__main__': unittest.main()
1,105
27.358974
67
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_multiping.py
#!/usr/bin/env python """ Test for multiping.py """ import unittest import pexpect from collections import defaultdict class testMultiPing( unittest.TestCase ): def testMultiPing( self ): """Verify that each target is pinged at least once, and that pings to 'real' targets are successful and unknown targets fail""" p = pexpect.spawn( 'python -m mininet.examples.multiping' ) opts = [ "Host (h\d+) \(([\d.]+)\) will be pinging ips: ([\d\. ]+)", "(h\d+): ([\d.]+) -> ([\d.]+) \d packets transmitted, (\d) received", pexpect.EOF ] pings = defaultdict( list ) while True: index = p.expect( opts ) if index == 0: name = p.match.group(1) ip = p.match.group(2) targets = p.match.group(3).split() pings[ name ] += targets elif index == 1: name = p.match.group(1) ip = p.match.group(2) target = p.match.group(3) received = int( p.match.group(4) ) if target == '10.0.0.200': self.assertEqual( received, 0 ) else: self.assertEqual( received, 1 ) try: pings[ name ].remove( target ) except: pass else: break self.assertTrue( len( pings ) > 0 ) for t in pings.values(): self.assertEqual( len( t ), 0 ) if __name__ == '__main__': unittest.main()
1,595
31.571429
86
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_hwintf.py
#!/usr/bin/env python """ Test for hwintf.py """ import unittest import re import pexpect from mininet.log import setLogLevel from mininet.node import Node from mininet.link import Link class testHwintf( unittest.TestCase ): prompt = 'mininet>' def setUp( self ): self.h3 = Node( 't0', ip='10.0.0.3/8' ) self.n0 = Node( 't1', inNamespace=False ) Link( self.h3, self.n0 ) self.h3.configDefault() def testLocalPing( self ): "Verify connectivity between virtual hosts using pingall" p = pexpect.spawn( 'python -m mininet.examples.hwintf %s' % self.n0.intf() ) p.expect( self.prompt ) p.sendline( 'pingall' ) p.expect ( '(\d+)% dropped' ) percent = int( p.match.group( 1 ) ) if p.match else -1 self.assertEqual( percent, 0 ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() def testExternalPing( self ): "Verify connnectivity between virtual host and virtual-physical 'external' host " p = pexpect.spawn( 'python -m mininet.examples.hwintf %s' % self.n0.intf() ) p.expect( self.prompt ) # test ping external to internal expectStr = '(\d+) packets transmitted, (\d+) received' m = re.search( expectStr, self.h3.cmd( 'ping -v -c 1 10.0.0.1' ) ) tx = m.group( 1 ) rx = m.group( 2 ) self.assertEqual( tx, rx ) # test ping internal to external p.sendline( 'h1 ping -c 1 10.0.0.3') p.expect( expectStr ) tx = p.match.group( 1 ) rx = p.match.group( 2 ) self.assertEqual( tx, rx ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() def tearDown( self ): self.h3.terminate() self.n0.terminate() if __name__ == '__main__': setLogLevel( 'warning' ) unittest.main()
1,870
27.348485
89
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_baresshd.py
#!/usr/bin/env python """ Tests for baresshd.py """ import unittest import pexpect from mininet.clean import cleanup, sh class testBareSSHD( unittest.TestCase ): opts = [ 'Welcome to h1', pexpect.EOF, pexpect.TIMEOUT ] def connected( self ): "Log into ssh server, check banner, then exit" p = pexpect.spawn( 'ssh 10.0.0.1 -o StrictHostKeyChecking=no -i /tmp/ssh/test_rsa exit' ) while True: index = p.expect( self.opts ) if index == 0: return True else: return False def setUp( self ): # verify that sshd is not running self.assertFalse( self.connected() ) # create public key pair for testing sh( 'rm -rf /tmp/ssh' ) sh( 'mkdir /tmp/ssh' ) sh( "ssh-keygen -t rsa -P '' -f /tmp/ssh/test_rsa" ) sh( 'cat /tmp/ssh/test_rsa.pub >> /tmp/ssh/authorized_keys' ) # run example with custom sshd args cmd = ( 'python -m mininet.examples.baresshd ' '-o AuthorizedKeysFile=/tmp/ssh/authorized_keys ' '-o StrictModes=no' ) p = pexpect.spawn( cmd ) runOpts = [ 'You may now ssh into h1 at 10.0.0.1', 'after 5 seconds, h1 is not listening on port 22', pexpect.EOF, pexpect.TIMEOUT ] while True: index = p.expect( runOpts ) if index == 0: break else: self.tearDown() self.fail( 'sshd failed to start in host h1' ) def testSSH( self ): "Simple test to verify that we can ssh into h1" result = False # try to connect up to 3 times; sshd can take a while to start result = self.connected() self.assertTrue( result ) def tearDown( self ): # kill the ssh process sh( "ps aux | grep 'ssh.*Banner' | awk '{ print $2 }' | xargs kill" ) cleanup() # remove public key pair sh( 'rm -rf /tmp/ssh' ) if __name__ == '__main__': unittest.main()
2,072
30.892308
97
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_multilink.py
#!/usr/bin/env python ''' Test for multiple links between nodes validates mininet interfaces against systems interfaces ''' import unittest import pexpect class testMultiLink( unittest.TestCase ): prompt = 'mininet>' def testMultiLink(self): p = pexpect.spawn( 'python -m mininet.examples.multilink' ) p.expect( self.prompt ) p.sendline( 'intfs' ) p.expect( 's(\d): lo' ) intfsOutput = p.before # parse interfaces from mininet intfs, and store them in a list hostToIntfs = intfsOutput.split( '\r\n' )[ 1:3 ] intfList = [] for hostToIntf in hostToIntfs: intfList += [ intf for intf in hostToIntf.split()[1].split(',') ] # get interfaces from system by running ifconfig on every host sysIntfList = [] opts = [ 'h(\d)-eth(\d)', self.prompt ] p.expect( self.prompt ) p.sendline( 'h1 ifconfig' ) while True: p.expect( opts ) if p.after == self.prompt: break sysIntfList.append( p.after ) p.sendline( 'h2 ifconfig' ) while True: p.expect( opts ) if p.after == self.prompt: break sysIntfList.append( p.after ) failMsg = ( 'The systems interfaces and mininet interfaces\n' 'are not the same' ) self.assertEqual( sysIntfList, intfList, msg=failMsg ) p.sendline( 'exit' ) p.wait() if __name__ == '__main__': unittest.main()
1,571
27.071429
71
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_linearbandwidth.py
#!/usr/bin/env python """ Test for linearbandwidth.py """ import unittest import pexpect import sys class testLinearBandwidth( unittest.TestCase ): @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testLinearBandwidth( self ): "Verify that bandwidth is monotonically decreasing as # of hops increases" p = pexpect.spawn( 'python -m mininet.examples.linearbandwidth' ) count = 0 opts = [ '\*\*\* Linear network results', '(\d+)\s+([\d\.]+) (.bits)', pexpect.EOF ] while True: index = p.expect( opts, timeout=600 ) if index == 0: count += 1 elif index == 1: n = int( p.match.group( 1 ) ) bw = float( p.match.group( 2 ) ) unit = p.match.group( 3 ) if unit[ 0 ] == 'K': bw *= 10 ** 3 elif unit[ 0 ] == 'M': bw *= 10 ** 6 elif unit[ 0 ] == 'G': bw *= 10 ** 9 # check that we have a previous result to compare to if n != 1: info = ( 'bw: %d bits/s across %d switches, ' 'previous: %d bits/s across %d switches' % ( bw, n, previous_bw, previous_n ) ) self.assertTrue( bw < previous_bw, info ) previous_bw, previous_n = bw, n else: break # verify that we received results from at least one switch self.assertTrue( count > 0 ) if __name__ == '__main__': unittest.main()
1,659
32.2
82
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_controlnet.py
#!/usr/bin/env python """ Test for controlnet.py """ import unittest import pexpect class testControlNet( unittest.TestCase ): prompt = 'mininet>' def testPingall( self ): "Simple pingall test that verifies 0% packet drop in data network" p = pexpect.spawn( 'python -m mininet.examples.controlnet' ) p.expect( self.prompt ) p.sendline( 'pingall' ) p.expect ( '(\d+)% dropped' ) percent = int( p.match.group( 1 ) ) if p.match else -1 self.assertEqual( percent, 0 ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() def testFailover( self ): "Kill controllers and verify that switch, s1, fails over properly" count = 1 p = pexpect.spawn( 'python -m mininet.examples.controlnet' ) p.expect( self.prompt ) lp = pexpect.spawn( 'tail -f /tmp/s1-ofp.log' ) lp.expect( 'tcp:\d+\.\d+\.\d+\.(\d+):\d+: connected' ) ip = int( lp.match.group( 1 ) ) self.assertEqual( count, ip ) count += 1 for c in [ 'c0', 'c1' ]: p.sendline( '%s ifconfig %s-eth0 down' % ( c, c) ) p.expect( self.prompt ) lp.expect( 'tcp:\d+\.\d+\.\d+\.(\d+):\d+: connected' ) ip = int( lp.match.group( 1 ) ) self.assertEqual( count, ip ) count += 1 p.sendline( 'exit' ) p.wait() if __name__ == '__main__': unittest.main()
1,454
29.3125
74
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_nat.py
#!/usr/bin/env python """ Test for nat.py """ import unittest import pexpect from mininet.util import quietRun destIP = '8.8.8.8' # Google DNS class testNAT( unittest.TestCase ): prompt = 'mininet>' @unittest.skipIf( '0 received' in quietRun( 'ping -c 1 %s' % destIP ), 'Destination IP is not reachable' ) def testNAT( self ): "Attempt to ping an IP on the Internet and verify 0% packet loss" p = pexpect.spawn( 'python -m mininet.examples.nat' ) p.expect( self.prompt ) p.sendline( 'h1 ping -c 1 %s' % destIP ) p.expect ( '(\d+)% packet loss' ) percent = int( p.match.group( 1 ) ) if p.match else -1 p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() self.assertEqual( percent, 0 ) if __name__ == '__main__': unittest.main()
854
24.909091
74
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_tree1024.py
#!/usr/bin/env python """ Test for tree1024.py """ import unittest import pexpect import sys class testTree1024( unittest.TestCase ): prompt = 'mininet>' @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testTree1024( self ): "Run the example and do a simple ping test from h1 to h1024" p = pexpect.spawn( 'python -m mininet.examples.tree1024' ) p.expect( self.prompt, timeout=6000 ) # it takes awhile to set up p.sendline( 'h1 ping -c 20 h1024' ) p.expect ( '(\d+)% packet loss' ) packetLossPercent = int( p.match.group( 1 ) ) if p.match else -1 p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() # Tolerate slow startup on some systems - we should revisit this # and determine the root cause. self.assertLess( packetLossPercent, 60 ) if __name__ == '__main__': unittest.main()
908
27.40625
73
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_vlanhost.py
#!/usr/bin/env python """ Test for vlanhost.py """ import unittest import pexpect import sys from mininet.util import quietRun class testVLANHost( unittest.TestCase ): prompt = 'mininet>' @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testVLANTopo( self ): "Test connectivity (or lack thereof) between hosts in VLANTopo" p = pexpect.spawn( 'python -m mininet.examples.vlanhost' ) p.expect( self.prompt ) p.sendline( 'pingall 1' ) #ping timeout=1 p.expect( '(\d+)% dropped', timeout=30 ) # there should be 24 failed pings percent = int( p.match.group( 1 ) ) if p.match else -1 p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() self.assertEqual( percent, 80 ) def testSpecificVLAN( self ): "Test connectivity between hosts on a specific VLAN" vlan = 1001 p = pexpect.spawn( 'python -m mininet.examples.vlanhost %d' % vlan ) p.expect( self.prompt ) p.sendline( 'h1 ping -c 1 h2' ) p.expect ( '(\d+)% packet loss' ) percent = int( p.match.group( 1 ) ) if p.match else -1 p.expect( self.prompt ) p.sendline( 'h1 ifconfig' ) i = p.expect( ['h1-eth0.%d' % vlan, pexpect.TIMEOUT ], timeout=2 ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() self.assertEqual( percent, 0 ) # no packet loss on ping self.assertEqual( i, 0 ) # check vlan intf is present if __name__ == '__main__': unittest.main()
1,539
29.196078
83
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_emptynet.py
#!/usr/bin/env python """ Test for emptynet.py """ import unittest import pexpect class testEmptyNet( unittest.TestCase ): prompt = 'mininet>' def testEmptyNet( self ): "Run simple CLI tests: pingall (verify 0% drop) and iperf (sanity)" p = pexpect.spawn( 'python -m mininet.examples.emptynet' ) p.expect( self.prompt ) # pingall test p.sendline( 'pingall' ) p.expect ( '(\d+)% dropped' ) percent = int( p.match.group( 1 ) ) if p.match else -1 self.assertEqual( percent, 0 ) p.expect( self.prompt ) # iperf test p.sendline( 'iperf' ) p.expect( "Results: \['[\d.]+ .bits/sec', '[\d.]+ .bits/sec'\]" ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() if __name__ == '__main__': unittest.main()
835
24.333333
75
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_linuxrouter.py
#!/usr/bin/env python """ Test for linuxrouter.py """ import unittest import pexpect from mininet.util import quietRun class testLinuxRouter( unittest.TestCase ): prompt = 'mininet>' def testPingall( self ): "Test connectivity between hosts" p = pexpect.spawn( 'python -m mininet.examples.linuxrouter' ) p.expect( self.prompt ) p.sendline( 'pingall' ) p.expect ( '(\d+)% dropped' ) percent = int( p.match.group( 1 ) ) if p.match else -1 p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() self.assertEqual( percent, 0 ) def testRouterPing( self ): "Test connectivity from h1 to router" p = pexpect.spawn( 'python -m mininet.examples.linuxrouter' ) p.expect( self.prompt ) p.sendline( 'h1 ping -c 1 r0' ) p.expect ( '(\d+)% packet loss' ) percent = int( p.match.group( 1 ) ) if p.match else -1 p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() self.assertEqual( percent, 0 ) def testTTL( self ): "Verify that the TTL is decremented" p = pexpect.spawn( 'python -m mininet.examples.linuxrouter' ) p.expect( self.prompt ) p.sendline( 'h1 ping -c 1 h2' ) p.expect ( 'ttl=(\d+)' ) ttl = int( p.match.group( 1 ) ) if p.match else -1 p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() self.assertEqual( ttl, 63 ) # 64 - 1 if __name__ == '__main__': unittest.main()
1,534
27.962264
69
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/runner.py
#!/usr/bin/env python """ Run all mininet.examples tests -v : verbose output -quick : skip tests that take more than ~30 seconds """ import unittest import os import sys from mininet.util import ensureRoot from mininet.clean import cleanup class MininetTestResult( unittest.TextTestResult ): def addFailure( self, test, err ): super( MininetTestResult, self ).addFailure( test, err ) cleanup() def addError( self,test, err ): super( MininetTestResult, self ).addError( test, err ) cleanup() class MininetTestRunner( unittest.TextTestRunner ): def _makeResult( self ): return MininetTestResult( self.stream, self.descriptions, self.verbosity ) def runTests( testDir, verbosity=1 ): "discover and run all tests in testDir" # ensure root and cleanup before starting tests ensureRoot() cleanup() # discover all tests in testDir testSuite = unittest.defaultTestLoader.discover( testDir ) # run tests MininetTestRunner( verbosity=verbosity ).run( testSuite ) if __name__ == '__main__': # get the directory containing example tests testDir = os.path.dirname( os.path.realpath( __file__ ) ) verbosity = 2 if '-v' in sys.argv else 1 runTests( testDir, verbosity )
1,263
29.095238
82
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_multitest.py
#!/usr/bin/env python """ Test for multitest.py """ import unittest import pexpect class testMultiTest( unittest.TestCase ): prompt = 'mininet>' def testMultiTest( self ): "Verify pingall (0% dropped) and hX-eth0 interface for each host (ifconfig)" p = pexpect.spawn( 'python -m mininet.examples.multitest' ) p.expect( '(\d+)% dropped' ) dropped = int( p.match.group( 1 ) ) self.assertEqual( dropped, 0 ) ifCount = 0 while True: index = p.expect( [ 'h\d-eth0', self.prompt ] ) if index == 0: ifCount += 1 elif index == 1: p.sendline( 'exit' ) break p.wait() self.assertEqual( ifCount, 4 ) if __name__ == '__main__': unittest.main()
806
23.454545
84
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_controllers.py
#!/usr/bin/env python """ Tests for controllers.py and controllers2.py """ import unittest import pexpect class testControllers( unittest.TestCase ): prompt = 'mininet>' def connectedTest( self, name, cmap ): "Verify that switches are connected to the controller specified by cmap" p = pexpect.spawn( 'python -m %s' % name ) p.expect( self.prompt ) # but first a simple ping test p.sendline( 'pingall' ) p.expect ( '(\d+)% dropped' ) percent = int( p.match.group( 1 ) ) if p.match else -1 self.assertEqual( percent, 0 ) p.expect( self.prompt ) # verify connected controller for switch in cmap: p.sendline( 'sh ovs-vsctl get-controller %s' % switch ) p.expect( 'tcp:([\d.:]+)') actual = p.match.group(1) expected = cmap[ switch ] self.assertEqual( actual, expected ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() def testControllers( self ): c0 = '127.0.0.1:6633' c1 = '127.0.0.1:6634' cmap = { 's1': c0, 's2': c1, 's3': c0 } self.connectedTest( 'mininet.examples.controllers', cmap ) def testControllers2( self ): c0 = '127.0.0.1:6633' c1 = '127.0.0.1:6634' cmap = { 's1': c0, 's2': c1 } self.connectedTest( 'mininet.examples.controllers2', cmap ) if __name__ == '__main__': unittest.main()
1,463
28.877551
80
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_cpu.py
#!/usr/bin/env python """ Test for cpu.py results format: sched cpu client MB/s cfs 45.00% 13254.669841 cfs 40.00% 11822.441399 cfs 30.00% 5112.963009 cfs 20.00% 3449.090009 cfs 10.00% 2271.741564 """ import unittest import pexpect import sys class testCPU( unittest.TestCase ): prompt = 'mininet>' @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testCPU( self ): "Verify that CPU utilization is monotonically decreasing for each scheduler" p = pexpect.spawn( 'python -m mininet.examples.cpu' ) # matches each line from results( shown above ) opts = [ '([a-z]+)\t([\d\.]+)%\t([\d\.]+)', pexpect.EOF ] scheds = [] while True: index = p.expect( opts, timeout=600 ) if index == 0: sched = p.match.group( 1 ) cpu = float( p.match.group( 2 ) ) bw = float( p.match.group( 3 ) ) if sched not in scheds: scheds.append( sched ) else: self.assertTrue( bw < previous_bw, "%f should be less than %f\n" % ( bw, previous_bw ) ) previous_bw = bw else: break self.assertTrue( len( scheds ) > 0 ) if __name__ == '__main__': unittest.main()
1,426
25.425926
84
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_treeping64.py
#!/usr/bin/env python """ Test for treeping64.py """ import unittest import pexpect import sys class testTreePing64( unittest.TestCase ): prompt = 'mininet>' @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testTreePing64( self ): "Run the example and verify ping results" p = pexpect.spawn( 'python -m mininet.examples.treeping64' ) p.expect( 'Tree network ping results:', timeout=6000 ) count = 0 while True: index = p.expect( [ '(\d+)% packet loss', pexpect.EOF ] ) if index == 0: percent = int( p.match.group( 1 ) ) if p.match else -1 self.assertEqual( percent, 0 ) count += 1 else: break self.assertTrue( count > 0 ) if __name__ == '__main__': unittest.main()
844
24.606061
70
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_bind.py
#!/usr/bin/env python """ Tests for bind.py """ import unittest import pexpect class testBind( unittest.TestCase ): prompt = 'mininet>' def setUp( self ): self.net = pexpect.spawn( 'python -m mininet.examples.bind' ) self.net.expect( "Private Directories: \[([\w\s,'/]+)\]" ) self.directories = [] # parse directories from mn output for d in self.net.match.group(1).split(', '): self.directories.append( d.strip("'") ) self.net.expect( self.prompt ) self.assertTrue( len( self.directories ) > 0 ) def testCreateFile( self ): "Create a file, a.txt, in the first private directory and verify" fileName = 'a.txt' directory = self.directories[ 0 ] path = directory + '/' + fileName self.net.sendline( 'h1 touch %s; ls %s' % ( path, directory ) ) index = self.net.expect( [ fileName, self.prompt ] ) self.assertTrue( index == 0 ) self.net.expect( self.prompt ) self.net.sendline( 'h1 rm %s' % path ) self.net.expect( self.prompt ) def testIsolation( self ): "Create a file in two hosts and verify that contents are different" fileName = 'b.txt' directory = self.directories[ 0 ] path = directory + '/' + fileName contents = { 'h1' : '1', 'h2' : '2' } # Verify file doesn't exist, then write private copy of file for host in contents: value = contents[ host ] self.net.sendline( '%s cat %s' % ( host, path ) ) self.net.expect( 'No such file' ) self.net.expect( self.prompt ) self.net.sendline( '%s echo %s > %s' % ( host, value, path ) ) self.net.expect( self.prompt ) # Verify file contents for host in contents: value = contents[ host ] self.net.sendline( '%s cat %s' % ( host, path ) ) self.net.expect( value ) self.net.expect( self.prompt ) self.net.sendline( '%s rm %s' % ( host, path ) ) self.net.expect( self.prompt ) # TODO: need more tests def tearDown( self ): self.net.sendline( 'exit' ) self.net.wait() if __name__ == '__main__': unittest.main()
2,270
32.895522
75
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_limit.py
#!/usr/bin/env python """ Test for limit.py """ import unittest import pexpect import sys class testLimit( unittest.TestCase ): @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testLimit( self ): "Verify that CPU limits are within a 2% tolerance of limit for each scheduler" p = pexpect.spawn( 'python -m mininet.examples.limit' ) opts = [ '\*\*\* Testing network ([\d\.]+) Mbps', '\*\*\* Results: \[([\d\., ]+)\]', pexpect.EOF ] count = 0 bw = 0 tolerance = 2 while True: index = p.expect( opts ) if index == 0: bw = float( p.match.group( 1 ) ) count += 1 elif index == 1: results = p.match.group( 1 ) for x in results.split( ',' ): result = float( x ) self.assertTrue( result < bw + tolerance ) self.assertTrue( result > bw - tolerance ) else: break self.assertTrue( count > 0 ) if __name__ == '__main__': unittest.main()
1,137
26.756098
86
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_simpleperf.py
#!/usr/bin/env python """ Test for simpleperf.py """ import unittest import pexpect import sys from mininet.log import setLogLevel from mininet.examples.simpleperf import SingleSwitchTopo class testSimplePerf( unittest.TestCase ): @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testE2E( self ): "Run the example and verify iperf results" # 10 Mb/s, plus or minus 20% tolerance BW = 10 TOLERANCE = .2 p = pexpect.spawn( 'python -m mininet.examples.simpleperf testmode' ) # check iperf results p.expect( "Results: \['10M', '([\d\.]+) .bits/sec", timeout=480 ) measuredBw = float( p.match.group( 1 ) ) lowerBound = BW * ( 1 - TOLERANCE ) upperBound = BW + ( 1 + TOLERANCE ) self.assertGreaterEqual( measuredBw, lowerBound ) self.assertLessEqual( measuredBw, upperBound ) p.wait() if __name__ == '__main__': setLogLevel( 'warning' ) unittest.main()
976
26.914286
77
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_numberedports.py
#!/usr/bin/env python """ Test for numberedports.py """ import unittest import pexpect from collections import defaultdict from mininet.node import OVSSwitch class testNumberedports( unittest.TestCase ): @unittest.skipIf( OVSSwitch.setup() or OVSSwitch.isOldOVS(), "old version of OVS" ) def testConsistency( self ): """verify consistency between mininet and ovs ports""" p = pexpect.spawn( 'python -m mininet.examples.numberedports' ) opts = [ 'Validating that s1-eth\d is actually on port \d ... Validated.', 'Validating that s1-eth\d is actually on port \d ... WARNING', pexpect.EOF ] correct_ports = True count = 0 while True: index = p.expect( opts ) if index == 0: count += 1 elif index == 1: correct_ports = False elif index == 2: self.assertNotEqual( 0, count ) break self.assertTrue( correct_ports ) def testNumbering( self ): """verify that all of the port numbers are printed correctly and consistent with their interface""" p = pexpect.spawn( 'python -m mininet.examples.numberedports' ) opts = [ 's1-eth(\d+) : (\d+)', pexpect.EOF ] count_intfs = 0 while True: index = p.expect( opts ) if index == 0: count_intfs += 1 intfport = p.match.group( 1 ) ofport = p.match.group( 2 ) self.assertEqual( intfport, ofport ) elif index == 1: break self.assertNotEqual( 0, count_intfs ) if __name__ == '__main__': unittest.main()
1,744
31.924528
107
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_scratchnet.py
#!/usr/bin/env python """ Test for scratchnet.py """ import unittest import pexpect class testScratchNet( unittest.TestCase ): opts = [ "1 packets transmitted, 1 received, 0% packet loss", pexpect.EOF ] def pingTest( self, name ): "Verify that no ping packets were dropped" p = pexpect.spawn( 'python -m %s' % name ) index = p.expect( self.opts ) self.assertEqual( index, 0 ) def testPingKernel( self ): self.pingTest( 'mininet.examples.scratchnet' ) def testPingUser( self ): self.pingTest( 'mininet.examples.scratchnetuser' ) if __name__ == '__main__': unittest.main()
647
22.142857
79
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_intfoptions.py
#!/usr/bin/env python """ Test for intfOptions.py """ import unittest import pexpect import sys class testIntfOptions( unittest.TestCase ): def testIntfOptions( self ): "verify that intf.config is correctly limiting traffic" p = pexpect.spawn( 'python -m mininet.examples.intfoptions ' ) tolerance = .2 # plus or minus 20% opts = [ "Results: \['([\d\.]+) .bits/sec", "Results: \['10M', '([\d\.]+) .bits/sec", "h(\d+)->h(\d+): (\d)/(\d)," "rtt min/avg/max/mdev ([\d\.]+)/([\d\.]+)/([\d\.]+)/([\d\.]+) ms", pexpect.EOF ] while True: index = p.expect( opts, timeout=600 ) if index == 0: BW = 5 bw = float( p.match.group( 1 ) ) self.assertGreaterEqual( bw, BW * ( 1 - tolerance ) ) self.assertLessEqual( bw, BW * ( 1 + tolerance ) ) elif index == 1: BW = 10 measuredBw = float( p.match.group( 1 ) ) loss = ( measuredBw / BW ) * 100 self.assertGreaterEqual( loss, 50 * ( 1 - tolerance ) ) self.assertLessEqual( loss, 50 * ( 1 + tolerance ) ) elif index == 2: delay = float( p.match.group( 6 ) ) self.assertGreaterEqual( delay, 15 * ( 1 - tolerance ) ) self.assertLessEqual( delay, 15 * ( 1 + tolerance ) ) else: break if __name__ == '__main__': unittest.main()
1,549
33.444444
83
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_clusterSanity.py
#!/usr/bin/env python ''' A simple sanity check test for cluster edition ''' import unittest import pexpect class clusterSanityCheck( unittest.TestCase ): prompt = 'mininet>' def testClusterPingAll( self ): p = pexpect.spawn( 'python -m mininet.examples.clusterSanity' ) p.expect( self.prompt ) p.sendline( 'pingall' ) p.expect ( '(\d+)% dropped' ) percent = int( p.match.group( 1 ) ) if p.match else -1 self.assertEqual( percent, 0 ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() if __name__ == '__main__': unittest.main()
624
21.321429
71
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_mobility.py
#!/usr/bin/env python """ Test for mobility.py """ import unittest from subprocess import check_output class testMobility( unittest.TestCase ): def testMobility( self ): "Run the example and verify its 4 ping results" cmd = 'python -m mininet.examples.mobility 2>&1' grep = ' | grep -c " 0% dropped" ' result = check_output( cmd + grep, shell=True ) assert int( result ) == 4 if __name__ == '__main__': unittest.main()
472
21.52381
56
py
cba-pipeline-public
cba-pipeline-public-master/containernet/examples/test/test_natnet.py
#!/usr/bin/env python """ Test for natnet.py """ import unittest import pexpect from mininet.util import quietRun class testNATNet( unittest.TestCase ): prompt = 'mininet>' def setUp( self ): self.net = pexpect.spawn( 'python -m mininet.examples.natnet' ) self.net.expect( self.prompt ) def testPublicPing( self ): "Attempt to ping the public server (h0) from h1 and h2" self.net.sendline( 'h1 ping -c 1 h0' ) self.net.expect ( '(\d+)% packet loss' ) percent = int( self.net.match.group( 1 ) ) if self.net.match else -1 self.assertEqual( percent, 0 ) self.net.expect( self.prompt ) self.net.sendline( 'h2 ping -c 1 h0' ) self.net.expect ( '(\d+)% packet loss' ) percent = int( self.net.match.group( 1 ) ) if self.net.match else -1 self.assertEqual( percent, 0 ) self.net.expect( self.prompt ) def testPrivatePing( self ): "Attempt to ping h1 and h2 from public server" self.net.sendline( 'h0 ping -c 1 -t 1 h1' ) result = self.net.expect ( [ 'unreachable', 'loss' ] ) self.assertEqual( result, 0 ) self.net.expect( self.prompt ) self.net.sendline( 'h0 ping -c 1 -t 1 h2' ) result = self.net.expect ( [ 'unreachable', 'loss' ] ) self.assertEqual( result, 0 ) self.net.expect( self.prompt ) def testPrivateToPrivatePing( self ): "Attempt to ping from NAT'ed host h1 to NAT'ed host h2" self.net.sendline( 'h1 ping -c 1 -t 1 h2' ) result = self.net.expect ( [ '[Uu]nreachable', 'loss' ] ) self.assertEqual( result, 0 ) self.net.expect( self.prompt ) def tearDown( self ): self.net.sendline( 'exit' ) self.net.wait() if __name__ == '__main__': unittest.main()
1,827
30.517241
76
py
cba-pipeline-public
cba-pipeline-public-master/containernet/bin/clear_crash.sh
#!/bin/bash sudo docker rm -f $(sudo docker ps --filter 'label=com.containernet' -a -q) sudo ./mn -c
101
24.5
75
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/util/versioncheck.py
#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Mininet [0-9\.\+]+\w*' *", shell=True ) error = False for line in lines.split( '\n' ): if line and 'Binary' not in line: fname, fversion = line.split( ':' ) if version != fversion: print "%s: incorrect version '%s' (should be '%s')" % ( fname, fversion, version ) error = True if error: exit( 1 )
666
25.68
72
py
cba-pipeline-public
cba-pipeline-public-master/containernet/util/install.sh
#!/usr/bin/env bash # Mininet install script for Ubuntu (and Debian Wheezy+) # Brandon Heller (brandonh@stanford.edu) # Fail on error set -e # Fail on unset var usage set -o nounset # Get directory containing mininet folder MININET_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd -P )" # Set up build directory, which by default is the working directory # unless the working directory is a subdirectory of mininet, # in which case we use the directory containing mininet BUILD_DIR="$(pwd -P)" case $BUILD_DIR in $MININET_DIR/*) BUILD_DIR=$MININET_DIR;; # currect directory is a subdirectory *) BUILD_DIR=$BUILD_DIR;; esac # Location of CONFIG_NET_NS-enabled kernel(s) KERNEL_LOC=http://www.openflow.org/downloads/mininet # Attempt to identify Linux release DIST=Unknown RELEASE=Unknown CODENAME=Unknown ARCH=`uname -m` if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; fi if [ "$ARCH" = "i686" ]; then ARCH="i386"; fi test -e /etc/debian_version && DIST="Debian" grep Ubuntu /etc/lsb-release &> /dev/null && DIST="Ubuntu" if [ "$DIST" = "Ubuntu" ] || [ "$DIST" = "Debian" ]; then # Truly non-interactive apt-get installation install='sudo DEBIAN_FRONTEND=noninteractive apt-get -y -q install' remove='sudo DEBIAN_FRONTEND=noninteractive apt-get -y -q remove' pkginst='sudo dpkg -i' # Prereqs for this script if ! which lsb_release &> /dev/null; then $install lsb-release fi fi test -e /etc/fedora-release && DIST="Fedora" test -e /etc/redhat-release && DIST="RedHatEnterpriseServer" if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then install='sudo yum -y install' remove='sudo yum -y erase' pkginst='sudo rpm -ivh' # Prereqs for this script if ! which lsb_release &> /dev/null; then $install redhat-lsb-core fi fi if which lsb_release &> /dev/null; then DIST=`lsb_release -is` RELEASE=`lsb_release -rs` CODENAME=`lsb_release -cs` fi echo "Detected Linux distribution: $DIST $RELEASE $CODENAME $ARCH" # Kernel params KERNEL_NAME=`uname -r` KERNEL_HEADERS=kernel-headers-${KERNEL_NAME} if ! echo $DIST | egrep 'Ubuntu|Debian|Fedora|RedHatEnterpriseServer'; then echo "Install.sh currently only supports Ubuntu, Debian, RedHat and Fedora." exit 1 fi # More distribution info DIST_LC=`echo $DIST | tr [A-Z] [a-z]` # as lower case # Determine whether version $1 >= version $2 # usage: if version_ge 1.20 1.2.3; then echo "true!"; fi function version_ge { # sort -V sorts by *version number* latest=`printf "$1\n$2" | sort -V | tail -1` # If $1 is latest version, then $1 >= $2 [ "$1" == "$latest" ] } # Kernel Deb pkg to be removed: KERNEL_IMAGE_OLD=linux-image-2.6.26-33-generic DRIVERS_DIR=/lib/modules/${KERNEL_NAME}/kernel/drivers/net OVS_RELEASE=1.4.0 OVS_PACKAGE_LOC=https://github.com/downloads/mininet/mininet OVS_BUILDSUFFIX=-ignore # was -2 OVS_PACKAGE_NAME=ovs-$OVS_RELEASE-core-$DIST_LC-$RELEASE-$ARCH$OVS_BUILDSUFFIX.tar OVS_TAG=v$OVS_RELEASE OF13_SWITCH_REV=${OF13_SWITCH_REV:-""} function pre_build { cd $BUILD_DIR rm -rf openflow pox oftest oflops ofsoftswitch13 loxigen ivs ryu noxcore nox13oflib } function kernel { echo "Install Mininet-compatible kernel if necessary" sudo apt-get update if ! $install linux-image-$KERNEL_NAME; then echo "Could not install linux-image-$KERNEL_NAME" echo "Skipping - assuming installed kernel is OK." fi } function kernel_clean { echo "Cleaning kernel..." # To save disk space, remove previous kernel if ! $remove $KERNEL_IMAGE_OLD; then echo $KERNEL_IMAGE_OLD not installed. fi # Also remove downloaded packages: rm -f $HOME/linux-headers-* $HOME/linux-image-* } # Install Mininet deps function mn_deps { echo "Installing Mininet dependencies" if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then $install gcc make socat psmisc xterm openssh-clients iperf \ iproute telnet python-setuptools libcgroup-tools \ ethtool help2man pyflakes pylint python-pep8 python-pexpect else $install gcc make socat psmisc xterm ssh iperf iproute telnet \ python-setuptools cgroup-bin ethtool help2man \ pyflakes pylint pep8 python-pexpect fi echo "Installing Mininet core" pushd $MININET_DIR/containernet sudo make install popd } # Install Mininet developer dependencies function mn_dev { echo "Installing Mininet developer dependencies" $install doxygen doxypy texlive-fonts-recommended if ! $install doxygen-latex; then echo "doxygen-latex not needed" fi } # The following will cause a full OF install, covering: # -user switch # The instructions below are an abbreviated version from # http://www.openflowswitch.org/wk/index.php/Debian_Install function of { echo "Installing OpenFlow reference implementation..." cd $BUILD_DIR $install autoconf automake libtool make gcc if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then $install git pkgconfig glibc-devel else $install git-core autotools-dev pkg-config libc6-dev fi # was: git clone git://openflowswitch.org/openflow.git # Use our own fork on github for now: git clone git://github.com/mininet/openflow cd $BUILD_DIR/openflow # Patch controller to handle more than 16 switches patch -p1 < $MININET_DIR/containernet/util/openflow-patches/controller.patch # Resume the install: ./boot.sh ./configure make sudo make install cd $BUILD_DIR } function of13 { echo "Installing OpenFlow 1.3 soft switch implementation..." cd $BUILD_DIR/ $install git-core autoconf automake autotools-dev pkg-config \ make gcc g++ libtool libc6-dev cmake libpcap-dev libxerces-c2-dev \ unzip libpcre3-dev flex bison libboost-dev if [ ! -d "ofsoftswitch13" ]; then git clone https://github.com/CPqD/ofsoftswitch13.git if [[ -n "$OF13_SWITCH_REV" ]]; then cd ofsoftswitch13 git checkout ${OF13_SWITCH_REV} cd .. fi fi # Install netbee if [ "$DIST" = "Ubuntu" ] && version_ge $RELEASE 14.04; then NBEESRC="nbeesrc-feb-24-2015" NBEEDIR="netbee" else NBEESRC="nbeesrc-jan-10-2013" NBEEDIR="nbeesrc-jan-10-2013" fi NBEEURL=${NBEEURL:-http://www.nbee.org/download/} wget -nc ${NBEEURL}${NBEESRC}.zip unzip ${NBEESRC}.zip cd ${NBEEDIR}/src cmake . make cd $BUILD_DIR/ sudo cp ${NBEEDIR}/bin/libn*.so /usr/local/lib sudo ldconfig sudo cp -R ${NBEEDIR}/include/ /usr/ # Resume the install: cd $BUILD_DIR/ofsoftswitch13 ./boot.sh ./configure make sudo make install cd $BUILD_DIR } function install_wireshark { if ! which wireshark; then echo "Installing Wireshark" if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then $install wireshark wireshark-gnome else $install wireshark tshark fi fi # Copy coloring rules: OF is white-on-blue: echo "Optionally installing wireshark color filters" mkdir -p $HOME/.wireshark cp -n $MININET_DIR/containernet/util/colorfilters $HOME/.wireshark echo "Checking Wireshark version" WSVER=`wireshark -v | egrep -o '[0-9\.]+' | head -1` if version_ge $WSVER 1.12; then echo "Wireshark version $WSVER >= 1.12 - returning" return fi echo "Cloning LoxiGen and building openflow.lua dissector" cd $BUILD_DIR git clone https://github.com/floodlight/loxigen.git cd loxigen make wireshark # Copy into plugin directory # libwireshark0/ on 11.04; libwireshark1/ on later WSDIR=`find /usr/lib -type d -name 'libwireshark*' | head -1` WSPLUGDIR=$WSDIR/plugins/ PLUGIN=loxi_output/wireshark/openflow.lua sudo cp $PLUGIN $WSPLUGDIR echo "Copied openflow plugin $PLUGIN to $WSPLUGDIR" cd $BUILD_DIR } # Install Open vSwitch specific version Ubuntu package function ubuntuOvs { echo "Creating and Installing Open vSwitch packages..." OVS_SRC=$BUILD_DIR/openvswitch OVS_TARBALL_LOC=http://openvswitch.org/releases if ! echo "$DIST" | egrep "Ubuntu|Debian" > /dev/null; then echo "OS must be Ubuntu or Debian" $cd BUILD_DIR return fi if [ "$DIST" = "Ubuntu" ] && ! version_ge $RELEASE 12.04; then echo "Ubuntu version must be >= 12.04" cd $BUILD_DIR return fi if [ "$DIST" = "Debian" ] && ! version_ge $RELEASE 7.0; then echo "Debian version must be >= 7.0" cd $BUILD_DIR return fi rm -rf $OVS_SRC mkdir -p $OVS_SRC cd $OVS_SRC if wget $OVS_TARBALL_LOC/openvswitch-$OVS_RELEASE.tar.gz 2> /dev/null; then tar xzf openvswitch-$OVS_RELEASE.tar.gz else echo "Failed to find OVS at $OVS_TARBALL_LOC/openvswitch-$OVS_RELEASE.tar.gz" cd $BUILD_DIR return fi # Remove any old packages $remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller \ openvswitch-pki openvswitch-switch # Get build deps $install build-essential fakeroot debhelper autoconf automake libssl-dev \ pkg-config bzip2 openssl python-all procps python-qt4 \ python-zopeinterface python-twisted-conch dkms # Build OVS cd $BUILD_DIR/openvswitch/openvswitch-$OVS_RELEASE DEB_BUILD_OPTIONS='parallel=2 nocheck' fakeroot debian/rules binary cd .. $pkginst openvswitch-common_$OVS_RELEASE*.deb openvswitch-datapath-dkms_$OVS_RELEASE*.deb \ openvswitch-pki_$OVS_RELEASE*.deb openvswitch-switch_$OVS_RELEASE*.deb if $pkginst openvswitch-controller_$OVS_RELEASE*.deb; then echo "Ignoring error installing openvswitch-controller" fi modinfo openvswitch sudo ovs-vsctl show # Switch can run on its own, but # Mininet should control the controller # This appears to only be an issue on Ubuntu/Debian if sudo service openvswitch-controller stop; then echo "Stopped running controller" fi if [ -e /etc/init.d/openvswitch-controller ]; then sudo update-rc.d openvswitch-controller disable fi } # Install Open vSwitch function ovs { echo "Installing Open vSwitch..." if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then $install openvswitch openvswitch-controller return fi if [ "$DIST" = "Ubuntu" ] && ! version_ge $RELEASE 14.04; then # Older Ubuntu versions need openvswitch-datapath/-dkms # Manually installing openvswitch-datapath may be necessary # for manually built kernel .debs using Debian's defective kernel # packaging, which doesn't yield usable headers. if ! dpkg --get-selections | grep openvswitch-datapath; then # If you've already installed a datapath, assume you # know what you're doing and don't need dkms datapath. # Otherwise, install it. $install openvswitch-datapath-dkms fi fi $install openvswitch-switch OVSC="" if $install openvswitch-controller; then OVSC="openvswitch-controller" else echo "Attempting to install openvswitch-testcontroller" if $install openvswitch-testcontroller; then OVSC="openvswitch-testcontroller" else echo "Failed - skipping openvswitch-testcontroller" fi fi if [ "$OVSC" ]; then # Switch can run on its own, but # Mininet should control the controller # This appears to only be an issue on Ubuntu/Debian if sudo service $OVSC stop; then echo "Stopped running controller" fi if [ -e /etc/init.d/$OVSC ]; then sudo update-rc.d $OVSC disable fi fi } function remove_ovs { pkgs=`dpkg --get-selections | grep openvswitch | awk '{ print $1;}'` echo "Removing existing Open vSwitch packages:" echo $pkgs if ! $remove $pkgs; then echo "Not all packages removed correctly" fi # For some reason this doesn't happen if scripts=`ls /etc/init.d/*openvswitch* 2>/dev/null`; then echo $scripts for s in $scripts; do s=$(basename $s) echo SCRIPT $s sudo service $s stop sudo rm -f /etc/init.d/$s sudo update-rc.d -f $s remove done fi echo "Done removing OVS" } function ivs { echo "Installing Indigo Virtual Switch..." IVS_SRC=$BUILD_DIR/ivs # Install dependencies $install git pkg-config gcc make libnl-3-dev libnl-route-3-dev libnl-genl-3-dev # Install IVS from source cd $BUILD_DIR git clone git://github.com/floodlight/ivs $IVS_SRC --recursive cd $IVS_SRC make sudo make install } # Install RYU function ryu { echo "Installing RYU..." # install Ryu dependencies" $install autoconf automake g++ libtool python make if [ "$DIST" = "Ubuntu" -o "$DIST" = "Debian" ]; then $install libxml2 libxslt-dev python-pip python-dev sudo pip install --upgrade gevent pbr webob routes paramiko \\ oslo.config fi # if needed, update python-six SIX_VER=`pip show six | grep Version | awk '{print $2}'` if version_ge 1.7.0 $SIX_VER; then echo "Installing python-six version 1.7.0..." sudo pip install -I six==1.7.0 fi # fetch RYU cd $BUILD_DIR/ git clone git://github.com/osrg/ryu.git ryu cd ryu # install ryu sudo python ./setup.py install # Add symbolic link to /usr/bin sudo ln -s ./bin/ryu-manager /usr/local/bin/ryu-manager } # Install NOX with tutorial files function nox { echo "Installing NOX w/tutorial files..." # Install NOX deps: $install autoconf automake g++ libtool python python-twisted \ swig libssl-dev make if [ "$DIST" = "Debian" ]; then $install libboost1.35-dev elif [ "$DIST" = "Ubuntu" ]; then $install python-dev libboost-dev $install libboost-filesystem-dev $install libboost-test-dev fi # Install NOX optional deps: $install libsqlite3-dev python-simplejson # Fetch NOX destiny cd $BUILD_DIR/ git clone https://github.com/noxrepo/nox-classic.git noxcore cd noxcore if ! git checkout -b destiny remotes/origin/destiny ; then echo "Did not check out a new destiny branch - assuming current branch is destiny" fi # Apply patches git checkout -b tutorial-destiny git am $MININET_DIR/containernet/util/nox-patches/*tutorial-port-nox-destiny*.patch if [ "$DIST" = "Ubuntu" ] && version_ge $RELEASE 12.04; then git am $MININET_DIR/containernet/util/nox-patches/*nox-ubuntu12-hacks.patch fi # Build ./boot.sh mkdir build cd build ../configure make -j3 #make check # Add NOX_CORE_DIR env var: sed -i -e 's|# for examples$|&\nexport NOX_CORE_DIR=$BUILD_DIR/noxcore/build/src|' ~/.bashrc # To verify this install: #cd ~/noxcore/build/src #./nox_core -v -i ptcp: } # Install NOX Classic/Zaku for OpenFlow 1.3 function nox13 { echo "Installing NOX w/tutorial files..." # Install NOX deps: $install autoconf automake g++ libtool python python-twisted \ swig libssl-dev make if [ "$DIST" = "Debian" ]; then $install libboost1.35-dev elif [ "$DIST" = "Ubuntu" ]; then $install python-dev libboost-dev $install libboost-filesystem-dev $install libboost-test-dev fi # Fetch NOX destiny cd $BUILD_DIR/ git clone https://github.com/CPqD/nox13oflib.git cd nox13oflib # Build ./boot.sh mkdir build cd build ../configure make -j3 #make check # To verify this install: #cd ~/nox13oflib/build/src #./nox_core -v -i ptcp: } # "Install" POX function pox { echo "Installing POX into $BUILD_DIR/pox..." cd $BUILD_DIR git clone https://github.com/noxrepo/pox.git } # Install OFtest function oftest { echo "Installing oftest..." # Install deps: $install tcpdump python-scapy # Install oftest: cd $BUILD_DIR/ git clone git://github.com/floodlight/oftest } # Install cbench function cbench { echo "Installing cbench..." if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then $install net-snmp-devel libpcap-devel libconfig-devel else $install libsnmp-dev libpcap-dev libconfig-dev fi cd $BUILD_DIR/ # was: git clone git://gitosis.stanford.edu/oflops.git # Use our own fork on github for now: git clone git://github.com/mininet/oflops cd oflops sh boot.sh || true # possible error in autoreconf, so run twice sh boot.sh ./configure --with-openflow-src-dir=$BUILD_DIR/openflow make sudo make install || true # make install fails; force past this } function vm_other { echo "Doing other Mininet VM setup tasks..." # Remove avahi-daemon, which may cause unwanted discovery packets to be # sent during tests, near link status changes: echo "Removing avahi-daemon" $remove avahi-daemon # was: Disable IPv6. Add to /etc/modprobe.d/blacklist: #echo "Attempting to disable IPv6" #if [ "$DIST" = "Ubuntu" ]; then # BLACKLIST=/etc/modprobe.d/blacklist.conf #else # BLACKLIST=/etc/modprobe.d/blacklist #fi #sudo sh -c "echo 'blacklist net-pf-10\nblacklist ipv6' >> $BLACKLIST" echo "Disabling IPv6" # Disable IPv6 if ! grep 'disable_ipv6' /etc/sysctl.conf; then echo 'Disabling IPv6' echo ' # Mininet: disable IPv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf > /dev/null fi # Since the above doesn't disable neighbor discovery, also do this: if ! grep 'ipv6.disable' /etc/default/grub; then sudo sed -i -e \ 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 /' \ /etc/default/grub sudo update-grub fi # Disabling IPv6 breaks X11 forwarding via ssh line='AddressFamily inet' file='/etc/ssh/sshd_config' echo "Adding $line to $file" if ! grep "$line" $file > /dev/null; then echo "$line" | sudo tee -a $file > /dev/null fi # Enable command auto completion using sudo; modify ~/.bashrc: sed -i -e 's|# for examples$|&\ncomplete -cf sudo|' ~/.bashrc # Install tcpdump, cmd-line packet dump tool. Also install gitk, # a graphical git history viewer. $install tcpdump gitk # Install common text editors $install vim nano emacs # Install NTP $install ntp # Install vconfig for VLAN example if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then $install vconfig else $install vlan fi # Set git to colorize everything. git config --global color.diff auto git config --global color.status auto git config --global color.branch auto # Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1: if [ "$DIST" = "Debian" ]; then sudo sed -i -e 's/^timeout.*$/timeout 1/' /boot/grub/menu.lst fi # Clean unneeded debs: rm -f ~/linux-headers-* ~/linux-image-* } # Script to copy built OVS kernel module to where modprobe will # find them automatically. Removes the need to keep an environment variable # for insmod usage, and works nicely with multiple kernel versions. # # The downside is that after each recompilation of OVS you'll need to # re-run this script. If you're using only one kernel version, then it may be # a good idea to use a symbolic link in place of the copy below. function modprobe { echo "Setting up modprobe for OVS kmod..." set +o nounset if [ -z "$OVS_KMODS" ]; then echo "OVS_KMODS not set. Aborting." else sudo cp $OVS_KMODS $DRIVERS_DIR sudo depmod -a ${KERNEL_NAME} fi set -o nounset } function all { if [ "$DIST" = "Fedora" ]; then printf "\nFedora 18+ support (still work in progress):\n" printf " * Fedora 18+ has kernel 3.10 RPMS in the updates repositories\n" printf " * Fedora 18+ has openvswitch 1.10 RPMS in the updates repositories\n" printf " * the install.sh script options [-bfnpvw] should work.\n" printf " * for a basic setup just try:\n" printf " install.sh -fnpv\n\n" exit 3 fi echo "Installing all packages except for -eix (doxypy, ivs, nox-classic)..." pre_build kernel mn_deps # Skip mn_dev (doxypy/texlive/fonts/etc.) because it's huge # mn_dev of install_wireshark ovs # We may add ivs once it's more mature # ivs # NOX-classic is deprecated, but you can install it manually if desired. # nox pox oftest cbench echo "Enjoy Mininet!" } # Restore disk space and remove sensitive files before shipping a VM. function vm_clean { echo "Cleaning VM..." sudo apt-get clean sudo apt-get autoremove sudo rm -rf /tmp/* sudo rm -rf openvswitch*.tar.gz # Remove sensistive files history -c # note this won't work if you have multiple bash sessions rm -f ~/.bash_history # need to clear in memory and remove on disk rm -f ~/.ssh/id_rsa* ~/.ssh/known_hosts sudo rm -f ~/.ssh/authorized_keys* # Remove SSH keys and regenerate on boot echo 'Removing SSH keys from /etc/ssh/' sudo rm -f /etc/ssh/*key* if ! grep mininet /etc/rc.local >& /dev/null; then sudo sed -i -e "s/exit 0//" /etc/rc.local echo ' # mininet: regenerate ssh keys if we deleted them if ! stat -t /etc/ssh/*key* >/dev/null 2>&1; then /usr/sbin/dpkg-reconfigure openssh-server fi exit 0 ' | sudo tee -a /etc/rc.local > /dev/null fi # Remove Mininet files #sudo rm -f /lib/modules/python2.5/site-packages/mininet* #sudo rm -f /usr/bin/mnexec # Clear optional dev script for SSH keychain load on boot rm -f ~/.bash_profile # Clear git changes git config --global user.name "None" git config --global user.email "None" # Note: you can shrink the .vmdk in vmware using # vmware-vdiskmanager -k *.vmdk echo "Zeroing out disk blocks for efficient compaction..." time sudo dd if=/dev/zero of=/tmp/zero bs=1M || true sync ; sleep 1 ; sync ; sudo rm -f /tmp/zero } function usage { printf '\nUsage: %s [-abcdfhikmnprtvVwxy03]\n\n' $(basename $0) >&2 printf 'This install script attempts to install useful packages\n' >&2 printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2 printf 'If you run into trouble, try\n' >&2 printf 'installing one thing at a time, and looking at the \n' >&2 printf 'specific installation function in this script.\n\n' >&2 printf 'options:\n' >&2 printf -- ' -a: (default) install (A)ll packages - good luck!\n' >&2 printf -- ' -b: install controller (B)enchmark (oflops)\n' >&2 printf -- ' -c: (C)lean up after kernel install\n' >&2 printf -- ' -d: (D)elete some sensitive files from a VM image\n' >&2 printf -- ' -e: install Mininet d(E)veloper dependencies\n' >&2 printf -- ' -f: install Open(F)low\n' >&2 printf -- ' -h: print this (H)elp message\n' >&2 printf -- ' -i: install (I)ndigo Virtual Switch\n' >&2 printf -- ' -k: install new (K)ernel\n' >&2 printf -- ' -m: install Open vSwitch kernel (M)odule from source dir\n' >&2 printf -- ' -n: install Mini(N)et dependencies + core files\n' >&2 printf -- ' -p: install (P)OX OpenFlow Controller\n' >&2 printf -- ' -r: remove existing Open vSwitch packages\n' >&2 printf -- ' -s <dir>: place dependency (S)ource/build trees in <dir>\n' >&2 printf -- ' -t: complete o(T)her Mininet VM setup tasks\n' >&2 printf -- ' -v: install Open (V)switch\n' >&2 printf -- ' -V <version>: install a particular version of Open (V)switch on Ubuntu\n' >&2 printf -- ' -w: install OpenFlow (W)ireshark dissector\n' >&2 printf -- ' -y: install R(y)u Controller\n' >&2 printf -- ' -x: install NO(X) Classic OpenFlow controller\n' >&2 printf -- ' -0: (default) -0[fx] installs OpenFlow 1.0 versions\n' >&2 printf -- ' -3: -3[fx] installs OpenFlow 1.3 versions\n' >&2 exit 2 } OF_VERSION=1.0 if [ $# -eq 0 ] then all else while getopts 'abcdefhikmnprs:tvV:wxy03' OPTION do case $OPTION in a) all;; b) cbench;; c) kernel_clean;; d) vm_clean;; e) mn_dev;; f) case $OF_VERSION in 1.0) of;; 1.3) of13;; *) echo "Invalid OpenFlow version $OF_VERSION";; esac;; h) usage;; i) ivs;; k) kernel;; m) modprobe;; n) mn_deps;; p) pox;; r) remove_ovs;; s) mkdir -p $OPTARG; # ensure the directory is created BUILD_DIR="$( cd -P "$OPTARG" && pwd )"; # get the full path echo "Dependency installation directory: $BUILD_DIR";; t) vm_other;; v) ovs;; V) OVS_RELEASE=$OPTARG; ubuntuOvs;; w) install_wireshark;; x) case $OF_VERSION in 1.0) nox;; 1.3) nox13;; *) echo "Invalid OpenFlow version $OF_VERSION";; esac;; y) ryu;; 0) OF_VERSION=1.0;; 3) OF_VERSION=1.3;; ?) usage;; esac done shift $(($OPTIND - 1)) fi
25,739
30.049457
96
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/util/clustersetup.sh
#!/usr/bin/env bash # Mininet ssh authentication script for cluster edition # This script will create a single key pair, which is then # propagated throughout the entire cluster. # There are two options for setup; temporary setup # persistent setup. If no options are specified, and the script # is only given ip addresses or host names, it will default to # the temporary setup. An ssh directory is then created in # /tmp/mn/ssh on each node, and mounted with the keys over the # user's ssh directory. This setup can easily be torn down by running # clustersetup with the -c option. # If the -p option is used, the setup will be persistent. In this # case, the key pair will be be distributed directly to each node's # ssh directory, but will be called cluster_key. An option to # specify this key for use will be added to the config file in each # user's ssh directory. set -e num_options=0 persistent=false showHelp=false clean=false declare -a hosts=() user=$(whoami) SSHDIR=/tmp/mn/ssh USERDIR=$HOME/.ssh usage="./clustersetup.sh [ -p|h|c ] [ host1 ] [ host2 ] ...\n Authenticate yourself and other cluster nodes to each other via ssh for mininet cluster edition. By default, we use a temporary ssh setup. An ssh directory is mounted over $USERDIR on each machine in the cluster. -h: display this help -p: create a persistent ssh setup. This will add new ssh keys and known_hosts to each nodes $USERDIR directory -c: method to clean up a temporary ssh setup. Any hosts taken as arguments will be cleaned " persistentSetup() { echo "***creating key pair" ssh-keygen -t rsa -C "Cluster_Edition_Key" -f $USERDIR/cluster_key -N '' &> /dev/null cat $USERDIR/cluster_key.pub >> $USERDIR/authorized_keys echo "***configuring ssh" echo "IdentityFile $USERDIR/cluster_key" >> $USERDIR/config echo "IdentityFile $USERDIR/id_rsa" >> $USERDIR/config for host in $hosts; do echo "***copying public key to $host" ssh-copy-id -i $USERDIR/cluster_key.pub $user@$host &> /dev/null echo "***copying key pair to remote host" scp $USERDIR/cluster_key $user@$host:$USERDIR scp $USERDIR/cluster_key.pub $user@$host:$USERDIR echo "***configuring remote host" ssh -o ForwardAgent=yes $user@$host " echo 'IdentityFile $USERDIR/cluster_key' >> $USERDIR/config echo 'IdentityFile $USERDIR/id_rsa' >> $USERDIR/config" done for host in $hosts; do echo "***copying known_hosts to $host" scp $USERDIR/known_hosts $user@$host:$USERDIR/cluster_known_hosts ssh $user@$host " cat $USERDIR/cluster_known_hosts >> $USERDIR/known_hosts rm $USERDIR/cluster_known_hosts" done } tempSetup() { echo "***creating temporary ssh directory" mkdir -p $SSHDIR echo "***creating key pair" ssh-keygen -t rsa -C "Cluster_Edition_Key" -f $SSHDIR/id_rsa -N '' &> /dev/null echo "***mounting temporary ssh directory" sudo mount --bind $SSHDIR $USERDIR cp $SSHDIR/id_rsa.pub $SSHDIR/authorized_keys for host in $hosts; do echo "***copying public key to $host" ssh-copy-id $user@$host &> /dev/null echo "***mounting remote temporary ssh directory for $host" ssh -o ForwardAgent=yes $user@$host " mkdir -p $SSHDIR cp $USERDIR/authorized_keys $SSHDIR/authorized_keys sudo mount --bind $SSHDIR $USERDIR" echo "***copying key pair to $host" scp $SSHDIR/{id_rsa,id_rsa.pub} $user@$host:$SSHDIR done for host in $hosts; do echo "***copying known_hosts to $host" scp $SSHDIR/known_hosts $user@$host:$SSHDIR done } cleanup() { for host in $hosts; do echo "***cleaning up $host" ssh $user@$host "sudo umount $USERDIR sudo rm -rf $SSHDIR" done echo "**unmounting local directories" sudo umount $USERDIR echo "***removing temporary ssh directory" sudo rm -rf $SSHDIR echo "done!" } if [ $# -eq 0 ]; then echo "ERROR: No Arguments" echo "$usage" exit else while getopts 'hpc' OPTION do ((num_options+=1)) case $OPTION in h) showHelp=true;; p) persistent=true;; c) clean=true;; ?) showHelp=true;; esac done shift $(($OPTIND - 1)) fi if [ "$num_options" -gt 1 ]; then echo "ERROR: Too Many Options" echo "$usage" exit fi if $showHelp; then echo "$usage" exit fi for i in "$@"; do output=$(getent ahostsv4 "$i") if [ -z "$output" ]; then echo '***WARNING: could not find hostname "$i"' echo "" else hosts+="$i " fi done if $clean; then cleanup exit fi echo "***authenticating to:" for host in $hosts; do echo "$host" done echo if $persistent; then echo '***Setting up persistent SSH configuration between all nodes' persistentSetup echo $'\n*** Sucessfully set up ssh throughout the cluster!' else echo '*** Setting up temporary SSH configuration between all nodes' tempSetup echo $'\n***Finished temporary setup. When you are done with your cluster' echo $' session, tear down the SSH connections with' echo $' ./clustersetup.sh -c '$hosts'' fi echo
5,422
28.63388
89
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/util/build-ovs-packages.sh
#!/bin/bash # Attempt to build debian packages for OVS set -e # exit on error set -u # exit on undefined variable kvers=`uname -r` ksrc=/lib/modules/$kvers/build dist=`lsb_release -is | tr [A-Z] [a-z]` release=`lsb_release -rs` arch=`uname -m` buildsuffix=-2 if [ "$arch" = "i686" ]; then arch=i386; fi if [ "$arch" = "x86_64" ]; then arch=amd64; fi overs=1.4.0 ovs=openvswitch-$overs ovstgz=$ovs.tar.gz ovsurl=http://openvswitch.org/releases/$ovstgz install='sudo apt-get install -y' echo "*** Installing debian/ubuntu build system" $install build-essential devscripts ubuntu-dev-tools debhelper dh-make $install diff patch cdbs quilt gnupg fakeroot lintian pbuilder piuparts $install module-assistant echo "*** Installing OVS dependencies" $install pkg-config gcc make python-dev libssl-dev libtool $install dkms ipsec-tools echo "*** Installing headers for $kvers" $install linux-headers-$kvers echo "*** Retrieving OVS source" wget -c $ovsurl tar xzf $ovstgz cd $ovs echo "*** Patching OVS source" # Not sure why this fails, but off it goes! sed -i -e 's/dh_strip/# dh_strip/' debian/rules if [ "$release" = "10.04" ]; then # Lucid doesn't seem to have all the packages for ovsdbmonitor echo "*** Patching debian/rules to remove dh_python2" sed -i -e 's/dh_python2/dh_pysupport/' debian/rules echo "*** Not building ovsdbmonitor since it's too hard on 10.04" mv debian/ovsdbmonitor.install debian/ovsdbmonitor.install.backup sed -i -e 's/ovsdbmonitor.install/ovsdbmonitor.install.backup/' Makefile.in else # Install a bag of hurt for ovsdbmonitor $install python-pyside.qtcore pyqt4-dev-tools python-twisted python-twisted-bin \ python-twisted-core python-twisted-conch python-anyjson python-zope.interface fi # init script was written to assume that commands complete sed -i -e 's/^set -e/#set -e/' debian/openvswitch-controller.init echo "*** Building OVS user packages" opts=--with-linux=/lib/modules/`uname -r`/build fakeroot make -f debian/rules DATAPATH_CONFIGURE_OPTS=$opts binary echo "*** Building OVS datapath kernel module package" # Still looking for the "right" way to do this... sudo mkdir -p /usr/src/linux ln -sf _debian/openvswitch.tar.gz . sudo make -f debian/rules.modules KSRC=$ksrc KVERS=$kvers binary-modules echo "*** Built the following packages:" cd ~ ls -l *deb archive=ovs-$overs-core-$dist-$release-$arch$buildsuffix.tar ovsbase='common pki switch brcompat controller datapath-dkms' echo "*** Packing up $ovsbase .debs into:" echo " $archive" pkgs="" for component in $ovsbase; do if echo $component | egrep 'dkms|pki'; then # Architecture-independent packages deb=(openvswitch-${component}_$overs*all.deb) else deb=(openvswitch-${component}_$overs*$arch.deb) fi pkgs="$pkgs $deb" done rm -rf $archive tar cf $archive $pkgs echo "*** Contents of archive $archive:" tar tf $archive echo "*** Done (hopefully)"
2,932
29.873684
83
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/util/doxify.py
#!/usr/bin/python """ Convert simple documentation to epydoc/pydoctor-compatible markup """ from sys import stdin, stdout, argv import os from tempfile import mkstemp from subprocess import call import re spaces = re.compile( r'\s+' ) singleLineExp = re.compile( r'\s+"([^"]+)"' ) commentStartExp = re.compile( r'\s+"""' ) commentEndExp = re.compile( r'"""$' ) returnExp = re.compile( r'\s+(returns:.*)' ) lastindent = '' comment = False def fixParam( line ): "Change foo: bar to @foo bar" result = re.sub( r'(\w+):', r'@param \1', line ) result = re.sub( r' @', r'@', result) return result def fixReturns( line ): "Change returns: foo to @return foo" return re.sub( 'returns:', r'@returns', line ) def fixLine( line ): global comment match = spaces.match( line ) if not match: return line else: indent = match.group(0) if singleLineExp.match( line ): return re.sub( '"', '"""', line ) if commentStartExp.match( line ): comment = True if comment: line = fixReturns( line ) line = fixParam( line ) if commentEndExp.search( line ): comment = False return line def test(): "Test transformations" assert fixLine(' "foo"') == ' """foo"""' assert fixParam( 'foo: bar' ) == '@param foo bar' assert commentStartExp.match( ' """foo"""') def funTest(): testFun = ( 'def foo():\n' ' "Single line comment"\n' ' """This is a test"""\n' ' bar: int\n' ' baz: string\n' ' returns: junk"""\n' ' if True:\n' ' print "OK"\n' ).splitlines( True ) fixLines( testFun ) def fixLines( lines, fid ): for line in lines: os.write( fid, fixLine( line ) ) if __name__ == '__main__': if False: funTest() infile = open( argv[1] ) outfid, outname = mkstemp() fixLines( infile.readlines(), outfid ) infile.close() os.close( outfid ) call( [ 'doxypy', outname ] )
2,004
21.277778
65
py
cba-pipeline-public
cba-pipeline-public-master/containernet/util/sch_htb-ofbuf/sch_htb.c
#define OFBUF (1) /* * net/sched/sch_htb.c Hierarchical token bucket, feed tree version * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * * Authors: Martin Devera, <devik@cdi.cz> * * Credits (in time order) for older HTB versions: * Stef Coene <stef.coene@docum.org> * HTB support at LARTC mailing list * Ondrej Kraus, <krauso@barr.cz> * found missing INIT_QDISC(htb) * Vladimir Smelhaus, Aamer Akhter, Bert Hubert * helped a lot to locate nasty class stall bug * Andi Kleen, Jamal Hadi, Bert Hubert * code review and helpful comments on shaping * Tomasz Wrona, <tw@eter.tym.pl> * created test case so that I was able to fix nasty bug * Wilfried Weissmann * spotted bug in dequeue code and helped with fix * Jiri Fojtasek * fixed requeue routine * and many others. thanks. */ #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/errno.h> #include <linux/skbuff.h> #include <linux/list.h> #include <linux/compiler.h> #include <linux/rbtree.h> #include <linux/workqueue.h> #include <linux/slab.h> #include <net/netlink.h> #include <net/pkt_sched.h> /* HTB algorithm. Author: devik@cdi.cz ======================================================================== HTB is like TBF with multiple classes. It is also similar to CBQ because it allows to assign priority to each class in hierarchy. In fact it is another implementation of Floyd's formal sharing. Levels: Each class is assigned level. Leaf has ALWAYS level 0 and root classes have level TC_HTB_MAXDEPTH-1. Interior nodes has level one less than their parent. */ static int htb_hysteresis __read_mostly = 0; /* whether to use mode hysteresis for speedup */ #define HTB_VER 0x30011 /* major must be matched with number suplied by TC as version */ #if HTB_VER >> 16 != TC_HTB_PROTOVER #error "Mismatched sch_htb.c and pkt_sch.h" #endif /* Module parameter and sysfs export */ module_param (htb_hysteresis, int, 0640); MODULE_PARM_DESC(htb_hysteresis, "Hysteresis mode, less CPU load, less accurate"); /* used internaly to keep status of single class */ enum htb_cmode { HTB_CANT_SEND, /* class can't send and can't borrow */ HTB_MAY_BORROW, /* class can't send but may borrow */ HTB_CAN_SEND /* class can send */ }; /* interior & leaf nodes; props specific to leaves are marked L: */ struct htb_class { struct Qdisc_class_common common; /* general class parameters */ struct gnet_stats_basic_packed bstats; struct gnet_stats_queue qstats; struct gnet_stats_rate_est rate_est; struct tc_htb_xstats xstats; /* our special stats */ int refcnt; /* usage count of this class */ /* topology */ int level; /* our level (see above) */ unsigned int children; struct htb_class *parent; /* parent class */ int prio; /* these two are used only by leaves... */ int quantum; /* but stored for parent-to-leaf return */ union { struct htb_class_leaf { struct Qdisc *q; int deficit[TC_HTB_MAXDEPTH]; struct list_head drop_list; } leaf; struct htb_class_inner { struct rb_root feed[TC_HTB_NUMPRIO]; /* feed trees */ struct rb_node *ptr[TC_HTB_NUMPRIO]; /* current class ptr */ /* When class changes from state 1->2 and disconnects from * parent's feed then we lost ptr value and start from the * first child again. Here we store classid of the * last valid ptr (used when ptr is NULL). */ u32 last_ptr_id[TC_HTB_NUMPRIO]; } inner; } un; struct rb_node node[TC_HTB_NUMPRIO]; /* node for self or feed tree */ struct rb_node pq_node; /* node for event queue */ psched_time_t pq_key; int prio_activity; /* for which prios are we active */ enum htb_cmode cmode; /* current mode of the class */ /* class attached filters */ struct tcf_proto *filter_list; int filter_cnt; /* token bucket parameters */ struct qdisc_rate_table *rate; /* rate table of the class itself */ struct qdisc_rate_table *ceil; /* ceiling rate (limits borrows too) */ long buffer, cbuffer; /* token bucket depth/rate */ psched_tdiff_t mbuffer; /* max wait time */ long tokens, ctokens; /* current number of tokens */ psched_time_t t_c; /* checkpoint time */ }; struct htb_sched { struct Qdisc_class_hash clhash; struct list_head drops[TC_HTB_NUMPRIO];/* active leaves (for drops) */ /* self list - roots of self generating tree */ struct rb_root row[TC_HTB_MAXDEPTH][TC_HTB_NUMPRIO]; int row_mask[TC_HTB_MAXDEPTH]; struct rb_node *ptr[TC_HTB_MAXDEPTH][TC_HTB_NUMPRIO]; u32 last_ptr_id[TC_HTB_MAXDEPTH][TC_HTB_NUMPRIO]; /* self wait list - roots of wait PQs per row */ struct rb_root wait_pq[TC_HTB_MAXDEPTH]; /* time of nearest event per level (row) */ psched_time_t near_ev_cache[TC_HTB_MAXDEPTH]; int defcls; /* class where unclassified flows go to */ /* filters for qdisc itself */ struct tcf_proto *filter_list; int rate2quantum; /* quant = rate / rate2quantum */ psched_time_t now; /* cached dequeue time */ struct qdisc_watchdog watchdog; /* non shaped skbs; let them go directly thru */ struct sk_buff_head direct_queue; int direct_qlen; /* max qlen of above */ long direct_pkts; #if OFBUF /* overflow buffer */ struct sk_buff_head ofbuf; int ofbuf_queued; /* # packets queued in above */ #endif #define HTB_WARN_TOOMANYEVENTS 0x1 unsigned int warned; /* only one warning */ struct work_struct work; }; /* find class in global hash table using given handle */ static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch) { struct htb_sched *q = qdisc_priv(sch); struct Qdisc_class_common *clc; clc = qdisc_class_find(&q->clhash, handle); if (clc == NULL) return NULL; return container_of(clc, struct htb_class, common); } /** * htb_classify - classify a packet into class * * It returns NULL if the packet should be dropped or -1 if the packet * should be passed directly thru. In all other cases leaf class is returned. * We allow direct class selection by classid in priority. The we examine * filters in qdisc and in inner nodes (if higher filter points to the inner * node). If we end up with classid MAJOR:0 we enqueue the skb into special * internal fifo (direct). These packets then go directly thru. If we still * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessful * then finish and return direct queue. */ #define HTB_DIRECT ((struct htb_class *)-1L) static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; struct tcf_result res; struct tcf_proto *tcf; int result; /* allow to select class by setting skb->priority to valid classid; * note that nfmark can be used too by attaching filter fw with no * rules in it */ if (skb->priority == sch->handle) return HTB_DIRECT; /* X:0 (direct flow) selected */ cl = htb_find(skb->priority, sch); if (cl && cl->level == 0) return cl; *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; tcf = q->filter_list; while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { #ifdef CONFIG_NET_CLS_ACT switch (result) { case TC_ACT_QUEUED: case TC_ACT_STOLEN: *qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN; case TC_ACT_SHOT: return NULL; } #endif cl = (void *)res.class; if (!cl) { if (res.classid == sch->handle) return HTB_DIRECT; /* X:0 (direct flow) */ cl = htb_find(res.classid, sch); if (!cl) break; /* filter selected invalid classid */ } if (!cl->level) return cl; /* we hit leaf; return it */ /* we have got inner class; apply inner filter chain */ tcf = cl->filter_list; } /* classification failed; try to use default class */ cl = htb_find(TC_H_MAKE(TC_H_MAJ(sch->handle), q->defcls), sch); if (!cl || cl->level) return HTB_DIRECT; /* bad default .. this is safe bet */ return cl; } /** * htb_add_to_id_tree - adds class to the round robin list * * Routine adds class to the list (actually tree) sorted by classid. * Make sure that class is not already on such list for given prio. */ static void htb_add_to_id_tree(struct rb_root *root, struct htb_class *cl, int prio) { struct rb_node **p = &root->rb_node, *parent = NULL; while (*p) { struct htb_class *c; parent = *p; c = rb_entry(parent, struct htb_class, node[prio]); if (cl->common.classid > c->common.classid) p = &parent->rb_right; else p = &parent->rb_left; } rb_link_node(&cl->node[prio], parent, p); rb_insert_color(&cl->node[prio], root); } /** * htb_add_to_wait_tree - adds class to the event queue with delay * * The class is added to priority event queue to indicate that class will * change its mode in cl->pq_key microseconds. Make sure that class is not * already in the queue. */ static void htb_add_to_wait_tree(struct htb_sched *q, struct htb_class *cl, long delay) { struct rb_node **p = &q->wait_pq[cl->level].rb_node, *parent = NULL; cl->pq_key = q->now + delay; if (cl->pq_key == q->now) cl->pq_key++; /* update the nearest event cache */ if (q->near_ev_cache[cl->level] > cl->pq_key) q->near_ev_cache[cl->level] = cl->pq_key; while (*p) { struct htb_class *c; parent = *p; c = rb_entry(parent, struct htb_class, pq_node); if (cl->pq_key >= c->pq_key) p = &parent->rb_right; else p = &parent->rb_left; } rb_link_node(&cl->pq_node, parent, p); rb_insert_color(&cl->pq_node, &q->wait_pq[cl->level]); } /** * htb_next_rb_node - finds next node in binary tree * * When we are past last key we return NULL. * Average complexity is 2 steps per call. */ static inline void htb_next_rb_node(struct rb_node **n) { *n = rb_next(*n); } /** * htb_add_class_to_row - add class to its row * * The class is added to row at priorities marked in mask. * It does nothing if mask == 0. */ static inline void htb_add_class_to_row(struct htb_sched *q, struct htb_class *cl, int mask) { q->row_mask[cl->level] |= mask; while (mask) { int prio = ffz(~mask); mask &= ~(1 << prio); htb_add_to_id_tree(q->row[cl->level] + prio, cl, prio); } } /* If this triggers, it is a bug in this code, but it need not be fatal */ static void htb_safe_rb_erase(struct rb_node *rb, struct rb_root *root) { if (RB_EMPTY_NODE(rb)) { WARN_ON(1); } else { rb_erase(rb, root); RB_CLEAR_NODE(rb); } } /** * htb_remove_class_from_row - removes class from its row * * The class is removed from row at priorities marked in mask. * It does nothing if mask == 0. */ static inline void htb_remove_class_from_row(struct htb_sched *q, struct htb_class *cl, int mask) { int m = 0; while (mask) { int prio = ffz(~mask); mask &= ~(1 << prio); if (q->ptr[cl->level][prio] == cl->node + prio) htb_next_rb_node(q->ptr[cl->level] + prio); htb_safe_rb_erase(cl->node + prio, q->row[cl->level] + prio); if (!q->row[cl->level][prio].rb_node) m |= 1 << prio; } q->row_mask[cl->level] &= ~m; } /** * htb_activate_prios - creates active classe's feed chain * * The class is connected to ancestors and/or appropriate rows * for priorities it is participating on. cl->cmode must be new * (activated) mode. It does nothing if cl->prio_activity == 0. */ static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl) { struct htb_class *p = cl->parent; long m, mask = cl->prio_activity; while (cl->cmode == HTB_MAY_BORROW && p && mask) { m = mask; while (m) { int prio = ffz(~m); m &= ~(1 << prio); if (p->un.inner.feed[prio].rb_node) /* parent already has its feed in use so that * reset bit in mask as parent is already ok */ mask &= ~(1 << prio); htb_add_to_id_tree(p->un.inner.feed + prio, cl, prio); } p->prio_activity |= mask; cl = p; p = cl->parent; } if (cl->cmode == HTB_CAN_SEND && mask) htb_add_class_to_row(q, cl, mask); } /** * htb_deactivate_prios - remove class from feed chain * * cl->cmode must represent old mode (before deactivation). It does * nothing if cl->prio_activity == 0. Class is removed from all feed * chains and rows. */ static void htb_deactivate_prios(struct htb_sched *q, struct htb_class *cl) { struct htb_class *p = cl->parent; long m, mask = cl->prio_activity; while (cl->cmode == HTB_MAY_BORROW && p && mask) { m = mask; mask = 0; while (m) { int prio = ffz(~m); m &= ~(1 << prio); if (p->un.inner.ptr[prio] == cl->node + prio) { /* we are removing child which is pointed to from * parent feed - forget the pointer but remember * classid */ p->un.inner.last_ptr_id[prio] = cl->common.classid; p->un.inner.ptr[prio] = NULL; } htb_safe_rb_erase(cl->node + prio, p->un.inner.feed + prio); if (!p->un.inner.feed[prio].rb_node) mask |= 1 << prio; } p->prio_activity &= ~mask; cl = p; p = cl->parent; } if (cl->cmode == HTB_CAN_SEND && mask) htb_remove_class_from_row(q, cl, mask); } static inline long htb_lowater(const struct htb_class *cl) { if (htb_hysteresis) return cl->cmode != HTB_CANT_SEND ? -cl->cbuffer : 0; else return 0; } static inline long htb_hiwater(const struct htb_class *cl) { if (htb_hysteresis) return cl->cmode == HTB_CAN_SEND ? -cl->buffer : 0; else return 0; } /** * htb_class_mode - computes and returns current class mode * * It computes cl's mode at time cl->t_c+diff and returns it. If mode * is not HTB_CAN_SEND then cl->pq_key is updated to time difference * from now to time when cl will change its state. * Also it is worth to note that class mode doesn't change simply * at cl->{c,}tokens == 0 but there can rather be hysteresis of * 0 .. -cl->{c,}buffer range. It is meant to limit number of * mode transitions per time unit. The speed gain is about 1/6. */ static inline enum htb_cmode htb_class_mode(struct htb_class *cl, long *diff) { long toks; if ((toks = (cl->ctokens + *diff)) < htb_lowater(cl)) { *diff = -toks; return HTB_CANT_SEND; } if ((toks = (cl->tokens + *diff)) >= htb_hiwater(cl)) return HTB_CAN_SEND; *diff = -toks; return HTB_MAY_BORROW; } /** * htb_change_class_mode - changes classe's mode * * This should be the only way how to change classe's mode under normal * cirsumstances. Routine will update feed lists linkage, change mode * and add class to the wait event queue if appropriate. New mode should * be different from old one and cl->pq_key has to be valid if changing * to mode other than HTB_CAN_SEND (see htb_add_to_wait_tree). */ static void htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, long *diff) { enum htb_cmode new_mode = htb_class_mode(cl, diff); if (new_mode == cl->cmode) return; if (cl->prio_activity) { /* not necessary: speed optimization */ if (cl->cmode != HTB_CANT_SEND) htb_deactivate_prios(q, cl); cl->cmode = new_mode; if (new_mode != HTB_CANT_SEND) htb_activate_prios(q, cl); } else cl->cmode = new_mode; } /** * htb_activate - inserts leaf cl into appropriate active feeds * * Routine learns (new) priority of leaf and activates feed chain * for the prio. It can be called on already active leaf safely. * It also adds leaf into droplist. */ static inline void htb_activate(struct htb_sched *q, struct htb_class *cl) { WARN_ON(cl->level || !cl->un.leaf.q || !cl->un.leaf.q->q.qlen); if (!cl->prio_activity) { cl->prio_activity = 1 << cl->prio; htb_activate_prios(q, cl); list_add_tail(&cl->un.leaf.drop_list, q->drops + cl->prio); } } /** * htb_deactivate - remove leaf cl from active feeds * * Make sure that leaf is active. In the other words it can't be called * with non-active leaf. It also removes class from the drop list. */ static inline void htb_deactivate(struct htb_sched *q, struct htb_class *cl) { WARN_ON(!cl->prio_activity); htb_deactivate_prios(q, cl); cl->prio_activity = 0; list_del_init(&cl->un.leaf.drop_list); } static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) { int uninitialized_var(ret); struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = htb_classify(skb, sch, &ret); #if OFBUF if(cl != HTB_DIRECT && cl) skb_get(skb); #endif if (cl == HTB_DIRECT) { /* enqueue to helper queue */ if (q->direct_queue.qlen < q->direct_qlen) { __skb_queue_tail(&q->direct_queue, skb); q->direct_pkts++; } else { kfree_skb(skb); sch->qstats.drops++; return NET_XMIT_DROP; } #ifdef CONFIG_NET_CLS_ACT } else if (!cl) { if (ret & __NET_XMIT_BYPASS) sch->qstats.drops++; kfree_skb(skb); return ret; #endif } else if ((ret = qdisc_enqueue(skb, cl->un.leaf.q)) != NET_XMIT_SUCCESS) { /* We shouldn't drop this, but enqueue it into ofbuf */ // TODO: is skb actually valid? // Ans: looks like qdisc_enqueue will end up freeing the packet // if enqueue failed. So we should incr refcnt before calling qdisc_enqueue... #if OFBUF __skb_queue_tail(&q->ofbuf, skb); q->ofbuf_queued++; #else if (net_xmit_drop_count(ret)) { sch->qstats.drops++; cl->qstats.drops++; } return ret; #endif } else { bstats_update(&cl->bstats, skb); htb_activate(q, cl); #if OFBUF kfree_skb(skb); #endif } sch->q.qlen++; return NET_XMIT_SUCCESS; } static inline void htb_accnt_tokens(struct htb_class *cl, int bytes, long diff) { long toks = diff + cl->tokens; if (toks > cl->buffer) toks = cl->buffer; toks -= (long) qdisc_l2t(cl->rate, bytes); if (toks <= -cl->mbuffer) toks = 1 - cl->mbuffer; cl->tokens = toks; } static inline void htb_accnt_ctokens(struct htb_class *cl, int bytes, long diff) { long toks = diff + cl->ctokens; if (toks > cl->cbuffer) toks = cl->cbuffer; toks -= (long) qdisc_l2t(cl->ceil, bytes); if (toks <= -cl->mbuffer) toks = 1 - cl->mbuffer; cl->ctokens = toks; } /** * htb_charge_class - charges amount "bytes" to leaf and ancestors * * Routine assumes that packet "bytes" long was dequeued from leaf cl * borrowing from "level". It accounts bytes to ceil leaky bucket for * leaf and all ancestors and to rate bucket for ancestors at levels * "level" and higher. It also handles possible change of mode resulting * from the update. Note that mode can also increase here (MAY_BORROW to * CAN_SEND) because we can use more precise clock that event queue here. * In such case we remove class from event queue first. */ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl, int level, struct sk_buff *skb) { int bytes = qdisc_pkt_len(skb); enum htb_cmode old_mode; long diff; while (cl) { diff = psched_tdiff_bounded(q->now, cl->t_c, cl->mbuffer); if (cl->level >= level) { if (cl->level == level) cl->xstats.lends++; htb_accnt_tokens(cl, bytes, diff); } else { cl->xstats.borrows++; cl->tokens += diff; /* we moved t_c; update tokens */ } htb_accnt_ctokens(cl, bytes, diff); cl->t_c = q->now; old_mode = cl->cmode; diff = 0; htb_change_class_mode(q, cl, &diff); if (old_mode != cl->cmode) { if (old_mode != HTB_CAN_SEND) htb_safe_rb_erase(&cl->pq_node, q->wait_pq + cl->level); if (cl->cmode != HTB_CAN_SEND) htb_add_to_wait_tree(q, cl, diff); } /* update basic stats except for leaves which are already updated */ if (cl->level) bstats_update(&cl->bstats, skb); cl = cl->parent; } } /** * htb_do_events - make mode changes to classes at the level * * Scans event queue for pending events and applies them. Returns time of * next pending event (0 for no event in pq, q->now for too many events). * Note: Applied are events whose have cl->pq_key <= q->now. */ static psched_time_t htb_do_events(struct htb_sched *q, int level, unsigned long start) { /* don't run for longer than 2 jiffies; 2 is used instead of * 1 to simplify things when jiffy is going to be incremented * too soon */ unsigned long stop_at = start + 2; while (time_before(jiffies, stop_at)) { struct htb_class *cl; long diff; struct rb_node *p = rb_first(&q->wait_pq[level]); if (!p) return 0; cl = rb_entry(p, struct htb_class, pq_node); if (cl->pq_key > q->now) return cl->pq_key; htb_safe_rb_erase(p, q->wait_pq + level); diff = psched_tdiff_bounded(q->now, cl->t_c, cl->mbuffer); htb_change_class_mode(q, cl, &diff); if (cl->cmode != HTB_CAN_SEND) htb_add_to_wait_tree(q, cl, diff); } /* too much load - let's continue after a break for scheduling */ if (!(q->warned & HTB_WARN_TOOMANYEVENTS)) { pr_warning("htb: too many events!\n"); q->warned |= HTB_WARN_TOOMANYEVENTS; } return q->now; } /* Returns class->node+prio from id-tree where classe's id is >= id. NULL * is no such one exists. */ static struct rb_node *htb_id_find_next_upper(int prio, struct rb_node *n, u32 id) { struct rb_node *r = NULL; while (n) { struct htb_class *cl = rb_entry(n, struct htb_class, node[prio]); if (id > cl->common.classid) { n = n->rb_right; } else if (id < cl->common.classid) { r = n; n = n->rb_left; } else { return n; } } return r; } /** * htb_lookup_leaf - returns next leaf class in DRR order * * Find leaf where current feed pointers points to. */ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio, struct rb_node **pptr, u32 * pid) { int i; struct { struct rb_node *root; struct rb_node **pptr; u32 *pid; } stk[TC_HTB_MAXDEPTH], *sp = stk; BUG_ON(!tree->rb_node); sp->root = tree->rb_node; sp->pptr = pptr; sp->pid = pid; for (i = 0; i < 65535; i++) { if (!*sp->pptr && *sp->pid) { /* ptr was invalidated but id is valid - try to recover * the original or next ptr */ *sp->pptr = htb_id_find_next_upper(prio, sp->root, *sp->pid); } *sp->pid = 0; /* ptr is valid now so that remove this hint as it * can become out of date quickly */ if (!*sp->pptr) { /* we are at right end; rewind & go up */ *sp->pptr = sp->root; while ((*sp->pptr)->rb_left) *sp->pptr = (*sp->pptr)->rb_left; if (sp > stk) { sp--; if (!*sp->pptr) { WARN_ON(1); return NULL; } htb_next_rb_node(sp->pptr); } } else { struct htb_class *cl; cl = rb_entry(*sp->pptr, struct htb_class, node[prio]); if (!cl->level) return cl; (++sp)->root = cl->un.inner.feed[prio].rb_node; sp->pptr = cl->un.inner.ptr + prio; sp->pid = cl->un.inner.last_ptr_id + prio; } } WARN_ON(1); return NULL; } /* dequeues packet at given priority and level; call only if * you are sure that there is active class at prio/level */ static struct sk_buff *htb_dequeue_tree(struct htb_sched *q, int prio, int level) { struct sk_buff *skb = NULL; struct htb_class *cl, *start; /* look initial class up in the row */ start = cl = htb_lookup_leaf(q->row[level] + prio, prio, q->ptr[level] + prio, q->last_ptr_id[level] + prio); do { next: if (unlikely(!cl)) return NULL; /* class can be empty - it is unlikely but can be true if leaf * qdisc drops packets in enqueue routine or if someone used * graft operation on the leaf since last dequeue; * simply deactivate and skip such class */ if (unlikely(cl->un.leaf.q->q.qlen == 0)) { struct htb_class *next; htb_deactivate(q, cl); /* row/level might become empty */ if ((q->row_mask[level] & (1 << prio)) == 0) return NULL; next = htb_lookup_leaf(q->row[level] + prio, prio, q->ptr[level] + prio, q->last_ptr_id[level] + prio); if (cl == start) /* fix start if we just deleted it */ start = next; cl = next; goto next; } skb = cl->un.leaf.q->dequeue(cl->un.leaf.q); if (likely(skb != NULL)) break; qdisc_warn_nonwc("htb", cl->un.leaf.q); htb_next_rb_node((level ? cl->parent->un.inner.ptr : q-> ptr[0]) + prio); cl = htb_lookup_leaf(q->row[level] + prio, prio, q->ptr[level] + prio, q->last_ptr_id[level] + prio); } while (cl != start); if (likely(skb != NULL)) { cl->un.leaf.deficit[level] -= qdisc_pkt_len(skb); if (cl->un.leaf.deficit[level] < 0) { cl->un.leaf.deficit[level] += cl->quantum; htb_next_rb_node((level ? cl->parent->un.inner.ptr : q-> ptr[0]) + prio); } /* this used to be after charge_class but this constelation * gives us slightly better performance */ if (!cl->un.leaf.q->q.qlen) htb_deactivate(q, cl); htb_charge_class(q, cl, level, skb); } return skb; } static struct sk_buff *htb_dequeue(struct Qdisc *sch) { struct sk_buff *skb; struct htb_sched *q = qdisc_priv(sch); int level; psched_time_t next_event; unsigned long start_at; u32 r, i; struct sk_buff *pkt; /* try to dequeue direct packets as high prio (!) to minimize cpu work */ skb = __skb_dequeue(&q->direct_queue); if (skb != NULL) { ok: qdisc_bstats_update(sch, skb); qdisc_unthrottled(sch); sch->q.qlen--; #if OFBUF if(q->ofbuf_queued > 0) { i = 0; r = net_random() % q->ofbuf_queued; // enqueue the rth packet and drop the rest while((pkt = __skb_dequeue(&q->ofbuf)) != NULL) { if(i == r) { // the chosen one htb_enqueue(pkt, sch); } else { kfree_skb(pkt); } i++; } q->ofbuf_queued = 0; } #endif return skb; } if (!sch->q.qlen) goto fin; q->now = psched_get_time(); start_at = jiffies; next_event = q->now + 5 * PSCHED_TICKS_PER_SEC; for (level = 0; level < TC_HTB_MAXDEPTH; level++) { /* common case optimization - skip event handler quickly */ int m; psched_time_t event; if (q->now >= q->near_ev_cache[level]) { event = htb_do_events(q, level, start_at); if (!event) event = q->now + PSCHED_TICKS_PER_SEC; q->near_ev_cache[level] = event; } else event = q->near_ev_cache[level]; if (next_event > event) next_event = event; m = ~q->row_mask[level]; while (m != (int)(-1)) { int prio = ffz(m); m |= 1 << prio; skb = htb_dequeue_tree(q, prio, level); if (likely(skb != NULL)) goto ok; } } sch->qstats.overlimits++; if (likely(next_event > q->now)) qdisc_watchdog_schedule(&q->watchdog, next_event); else schedule_work(&q->work); fin: return skb; } /* try to drop from each class (by prio) until one succeed */ static unsigned int htb_drop(struct Qdisc *sch) { struct htb_sched *q = qdisc_priv(sch); int prio; for (prio = TC_HTB_NUMPRIO - 1; prio >= 0; prio--) { struct list_head *p; list_for_each(p, q->drops + prio) { struct htb_class *cl = list_entry(p, struct htb_class, un.leaf.drop_list); unsigned int len; if (cl->un.leaf.q->ops->drop && (len = cl->un.leaf.q->ops->drop(cl->un.leaf.q))) { sch->q.qlen--; if (!cl->un.leaf.q->q.qlen) htb_deactivate(q, cl); return len; } } } return 0; } /* reset all classes */ /* always caled under BH & queue lock */ static void htb_reset(struct Qdisc *sch) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; struct hlist_node *n; unsigned int i; for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry(cl, n, &q->clhash.hash[i], common.hnode) { if (cl->level) memset(&cl->un.inner, 0, sizeof(cl->un.inner)); else { if (cl->un.leaf.q) qdisc_reset(cl->un.leaf.q); INIT_LIST_HEAD(&cl->un.leaf.drop_list); } cl->prio_activity = 0; cl->cmode = HTB_CAN_SEND; } } qdisc_watchdog_cancel(&q->watchdog); __skb_queue_purge(&q->direct_queue); sch->q.qlen = 0; #if OFBUF __skb_queue_purge(&q->ofbuf); q->ofbuf_queued = 0; #endif memset(q->row, 0, sizeof(q->row)); memset(q->row_mask, 0, sizeof(q->row_mask)); memset(q->wait_pq, 0, sizeof(q->wait_pq)); memset(q->ptr, 0, sizeof(q->ptr)); for (i = 0; i < TC_HTB_NUMPRIO; i++) INIT_LIST_HEAD(q->drops + i); } static const struct nla_policy htb_policy[TCA_HTB_MAX + 1] = { [TCA_HTB_PARMS] = { .len = sizeof(struct tc_htb_opt) }, [TCA_HTB_INIT] = { .len = sizeof(struct tc_htb_glob) }, [TCA_HTB_CTAB] = { .type = NLA_BINARY, .len = TC_RTAB_SIZE }, [TCA_HTB_RTAB] = { .type = NLA_BINARY, .len = TC_RTAB_SIZE }, }; static void htb_work_func(struct work_struct *work) { struct htb_sched *q = container_of(work, struct htb_sched, work); struct Qdisc *sch = q->watchdog.qdisc; __netif_schedule(qdisc_root(sch)); } static int htb_init(struct Qdisc *sch, struct nlattr *opt) { struct htb_sched *q = qdisc_priv(sch); struct nlattr *tb[TCA_HTB_INIT + 1]; struct tc_htb_glob *gopt; int err; int i; if (!opt) return -EINVAL; err = nla_parse_nested(tb, TCA_HTB_INIT, opt, htb_policy); if (err < 0) return err; if (tb[TCA_HTB_INIT] == NULL) { pr_err("HTB: hey probably you have bad tc tool ?\n"); return -EINVAL; } gopt = nla_data(tb[TCA_HTB_INIT]); if (gopt->version != HTB_VER >> 16) { pr_err("HTB: need tc/htb version %d (minor is %d), you have %d\n", HTB_VER >> 16, HTB_VER & 0xffff, gopt->version); return -EINVAL; } err = qdisc_class_hash_init(&q->clhash); if (err < 0) return err; for (i = 0; i < TC_HTB_NUMPRIO; i++) INIT_LIST_HEAD(q->drops + i); qdisc_watchdog_init(&q->watchdog, sch); INIT_WORK(&q->work, htb_work_func); skb_queue_head_init(&q->direct_queue); #if OFBUF skb_queue_head_init(&q->ofbuf); q->ofbuf_queued = 0; #endif q->direct_qlen = qdisc_dev(sch)->tx_queue_len; if (q->direct_qlen < 2) /* some devices have zero tx_queue_len */ q->direct_qlen = 2; if ((q->rate2quantum = gopt->rate2quantum) < 1) q->rate2quantum = 1; q->defcls = gopt->defcls; return 0; } static int htb_dump(struct Qdisc *sch, struct sk_buff *skb) { spinlock_t *root_lock = qdisc_root_sleeping_lock(sch); struct htb_sched *q = qdisc_priv(sch); struct nlattr *nest; struct tc_htb_glob gopt; spin_lock_bh(root_lock); gopt.direct_pkts = q->direct_pkts; gopt.version = HTB_VER; gopt.rate2quantum = q->rate2quantum; gopt.defcls = q->defcls; gopt.debug = 0; nest = nla_nest_start(skb, TCA_OPTIONS); if (nest == NULL) goto nla_put_failure; NLA_PUT(skb, TCA_HTB_INIT, sizeof(gopt), &gopt); nla_nest_end(skb, nest); spin_unlock_bh(root_lock); return skb->len; nla_put_failure: spin_unlock_bh(root_lock); nla_nest_cancel(skb, nest); return -1; } static int htb_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { struct htb_class *cl = (struct htb_class *)arg; spinlock_t *root_lock = qdisc_root_sleeping_lock(sch); struct nlattr *nest; struct tc_htb_opt opt; spin_lock_bh(root_lock); tcm->tcm_parent = cl->parent ? cl->parent->common.classid : TC_H_ROOT; tcm->tcm_handle = cl->common.classid; if (!cl->level && cl->un.leaf.q) tcm->tcm_info = cl->un.leaf.q->handle; nest = nla_nest_start(skb, TCA_OPTIONS); if (nest == NULL) goto nla_put_failure; memset(&opt, 0, sizeof(opt)); opt.rate = cl->rate->rate; opt.buffer = cl->buffer; opt.ceil = cl->ceil->rate; opt.cbuffer = cl->cbuffer; opt.quantum = cl->quantum; opt.prio = cl->prio; opt.level = cl->level; NLA_PUT(skb, TCA_HTB_PARMS, sizeof(opt), &opt); nla_nest_end(skb, nest); spin_unlock_bh(root_lock); return skb->len; nla_put_failure: spin_unlock_bh(root_lock); nla_nest_cancel(skb, nest); return -1; } static int htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d) { struct htb_class *cl = (struct htb_class *)arg; if (!cl->level && cl->un.leaf.q) cl->qstats.qlen = cl->un.leaf.q->q.qlen; cl->xstats.tokens = cl->tokens; cl->xstats.ctokens = cl->ctokens; if (gnet_stats_copy_basic(d, &cl->bstats) < 0 || gnet_stats_copy_rate_est(d, NULL, &cl->rate_est) < 0 || gnet_stats_copy_queue(d, &cl->qstats) < 0) return -1; return gnet_stats_copy_app(d, &cl->xstats, sizeof(cl->xstats)); } static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { struct htb_class *cl = (struct htb_class *)arg; if (cl->level) return -EINVAL; if (new == NULL && (new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, cl->common.classid)) == NULL) return -ENOBUFS; sch_tree_lock(sch); *old = cl->un.leaf.q; cl->un.leaf.q = new; if (*old != NULL) { qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); qdisc_reset(*old); } sch_tree_unlock(sch); return 0; } static struct Qdisc *htb_leaf(struct Qdisc *sch, unsigned long arg) { struct htb_class *cl = (struct htb_class *)arg; return !cl->level ? cl->un.leaf.q : NULL; } static void htb_qlen_notify(struct Qdisc *sch, unsigned long arg) { struct htb_class *cl = (struct htb_class *)arg; if (cl->un.leaf.q->q.qlen == 0) htb_deactivate(qdisc_priv(sch), cl); } static unsigned long htb_get(struct Qdisc *sch, u32 classid) { struct htb_class *cl = htb_find(classid, sch); if (cl) cl->refcnt++; return (unsigned long)cl; } static inline int htb_parent_last_child(struct htb_class *cl) { if (!cl->parent) /* the root class */ return 0; if (cl->parent->children > 1) /* not the last child */ return 0; return 1; } static void htb_parent_to_leaf(struct htb_sched *q, struct htb_class *cl, struct Qdisc *new_q) { struct htb_class *parent = cl->parent; WARN_ON(cl->level || !cl->un.leaf.q || cl->prio_activity); if (parent->cmode != HTB_CAN_SEND) htb_safe_rb_erase(&parent->pq_node, q->wait_pq + parent->level); parent->level = 0; memset(&parent->un.inner, 0, sizeof(parent->un.inner)); INIT_LIST_HEAD(&parent->un.leaf.drop_list); parent->un.leaf.q = new_q ? new_q : &noop_qdisc; parent->tokens = parent->buffer; parent->ctokens = parent->cbuffer; parent->t_c = psched_get_time(); parent->cmode = HTB_CAN_SEND; } static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl) { if (!cl->level) { WARN_ON(!cl->un.leaf.q); qdisc_destroy(cl->un.leaf.q); } gen_kill_estimator(&cl->bstats, &cl->rate_est); qdisc_put_rtab(cl->rate); qdisc_put_rtab(cl->ceil); tcf_destroy_chain(&cl->filter_list); kfree(cl); } static void htb_destroy(struct Qdisc *sch) { struct htb_sched *q = qdisc_priv(sch); struct hlist_node *n, *next; struct htb_class *cl; unsigned int i; cancel_work_sync(&q->work); qdisc_watchdog_cancel(&q->watchdog); /* This line used to be after htb_destroy_class call below * and surprisingly it worked in 2.4. But it must precede it * because filter need its target class alive to be able to call * unbind_filter on it (without Oops). */ tcf_destroy_chain(&q->filter_list); for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry(cl, n, &q->clhash.hash[i], common.hnode) tcf_destroy_chain(&cl->filter_list); } for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry_safe(cl, n, next, &q->clhash.hash[i], common.hnode) htb_destroy_class(sch, cl); } qdisc_class_hash_destroy(&q->clhash); __skb_queue_purge(&q->direct_queue); #if OFBUF __skb_queue_purge(&q->ofbuf); q->ofbuf_queued = 0; #endif } static int htb_delete(struct Qdisc *sch, unsigned long arg) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; unsigned int qlen; struct Qdisc *new_q = NULL; int last_child = 0; // TODO: why don't allow to delete subtree ? references ? does // tc subsys quarantee us that in htb_destroy it holds no class // refs so that we can remove children safely there ? if (cl->children || cl->filter_cnt) return -EBUSY; if (!cl->level && htb_parent_last_child(cl)) { new_q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, cl->parent->common.classid); last_child = 1; } sch_tree_lock(sch); if (!cl->level) { qlen = cl->un.leaf.q->q.qlen; qdisc_reset(cl->un.leaf.q); qdisc_tree_decrease_qlen(cl->un.leaf.q, qlen); } /* delete from hash and active; remainder in destroy_class */ qdisc_class_hash_remove(&q->clhash, &cl->common); if (cl->parent) cl->parent->children--; if (cl->prio_activity) htb_deactivate(q, cl); if (cl->cmode != HTB_CAN_SEND) htb_safe_rb_erase(&cl->pq_node, q->wait_pq + cl->level); if (last_child) htb_parent_to_leaf(q, cl, new_q); BUG_ON(--cl->refcnt == 0); /* * This shouldn't happen: we "hold" one cops->get() when called * from tc_ctl_tclass; the destroy method is done from cops->put(). */ sch_tree_unlock(sch); return 0; } static void htb_put(struct Qdisc *sch, unsigned long arg) { struct htb_class *cl = (struct htb_class *)arg; if (--cl->refcnt == 0) htb_destroy_class(sch, cl); } static int htb_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg) { int err = -EINVAL; struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)*arg, *parent; struct nlattr *opt = tca[TCA_OPTIONS]; struct qdisc_rate_table *rtab = NULL, *ctab = NULL; struct nlattr *tb[__TCA_HTB_MAX]; struct tc_htb_opt *hopt; /* extract all subattrs from opt attr */ if (!opt) goto failure; err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy); if (err < 0) goto failure; err = -EINVAL; if (tb[TCA_HTB_PARMS] == NULL) goto failure; parent = parentid == TC_H_ROOT ? NULL : htb_find(parentid, sch); hopt = nla_data(tb[TCA_HTB_PARMS]); rtab = qdisc_get_rtab(&hopt->rate, tb[TCA_HTB_RTAB]); ctab = qdisc_get_rtab(&hopt->ceil, tb[TCA_HTB_CTAB]); if (!rtab || !ctab) goto failure; if (!cl) { /* new class */ struct Qdisc *new_q; int prio; struct { struct nlattr nla; struct gnet_estimator opt; } est = { .nla = { .nla_len = nla_attr_size(sizeof(est.opt)), .nla_type = TCA_RATE, }, .opt = { /* 4s interval, 16s averaging constant */ .interval = 2, .ewma_log = 2, }, }; /* check for valid classid */ if (!classid || TC_H_MAJ(classid ^ sch->handle) || htb_find(classid, sch)) goto failure; /* check maximal depth */ if (parent && parent->parent && parent->parent->level < 2) { pr_err("htb: tree is too deep\n"); goto failure; } err = -ENOBUFS; cl = kzalloc(sizeof(*cl), GFP_KERNEL); if (!cl) goto failure; err = gen_new_estimator(&cl->bstats, &cl->rate_est, qdisc_root_sleeping_lock(sch), tca[TCA_RATE] ? : &est.nla); if (err) { kfree(cl); goto failure; } cl->refcnt = 1; cl->children = 0; INIT_LIST_HEAD(&cl->un.leaf.drop_list); RB_CLEAR_NODE(&cl->pq_node); for (prio = 0; prio < TC_HTB_NUMPRIO; prio++) RB_CLEAR_NODE(&cl->node[prio]); /* create leaf qdisc early because it uses kmalloc(GFP_KERNEL) * so that can't be used inside of sch_tree_lock * -- thanks to Karlis Peisenieks */ new_q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid); sch_tree_lock(sch); if (parent && !parent->level) { unsigned int qlen = parent->un.leaf.q->q.qlen; /* turn parent into inner node */ qdisc_reset(parent->un.leaf.q); qdisc_tree_decrease_qlen(parent->un.leaf.q, qlen); qdisc_destroy(parent->un.leaf.q); if (parent->prio_activity) htb_deactivate(q, parent); /* remove from evt list because of level change */ if (parent->cmode != HTB_CAN_SEND) { htb_safe_rb_erase(&parent->pq_node, q->wait_pq); parent->cmode = HTB_CAN_SEND; } parent->level = (parent->parent ? parent->parent->level : TC_HTB_MAXDEPTH) - 1; memset(&parent->un.inner, 0, sizeof(parent->un.inner)); } /* leaf (we) needs elementary qdisc */ cl->un.leaf.q = new_q ? new_q : &noop_qdisc; cl->common.classid = classid; cl->parent = parent; /* set class to be in HTB_CAN_SEND state */ cl->tokens = hopt->buffer; cl->ctokens = hopt->cbuffer; cl->mbuffer = 60 * PSCHED_TICKS_PER_SEC; /* 1min */ cl->t_c = psched_get_time(); cl->cmode = HTB_CAN_SEND; /* attach to the hash list and parent's family */ qdisc_class_hash_insert(&q->clhash, &cl->common); if (parent) parent->children++; } else { if (tca[TCA_RATE]) { err = gen_replace_estimator(&cl->bstats, &cl->rate_est, qdisc_root_sleeping_lock(sch), tca[TCA_RATE]); if (err) return err; } sch_tree_lock(sch); } /* it used to be a nasty bug here, we have to check that node * is really leaf before changing cl->un.leaf ! */ if (!cl->level) { cl->quantum = rtab->rate.rate / q->rate2quantum; if (!hopt->quantum && cl->quantum < 1000) { pr_warning( "HTB: quantum of class %X is small. Consider r2q change.\n", cl->common.classid); cl->quantum = 1000; } if (!hopt->quantum && cl->quantum > 200000) { pr_warning( "HTB: quantum of class %X is big. Consider r2q change.\n", cl->common.classid); cl->quantum = 200000; } if (hopt->quantum) cl->quantum = hopt->quantum; if ((cl->prio = hopt->prio) >= TC_HTB_NUMPRIO) cl->prio = TC_HTB_NUMPRIO - 1; } cl->buffer = hopt->buffer; cl->cbuffer = hopt->cbuffer; if (cl->rate) qdisc_put_rtab(cl->rate); cl->rate = rtab; if (cl->ceil) qdisc_put_rtab(cl->ceil); cl->ceil = ctab; sch_tree_unlock(sch); qdisc_class_hash_grow(sch, &q->clhash); *arg = (unsigned long)cl; return 0; failure: if (rtab) qdisc_put_rtab(rtab); if (ctab) qdisc_put_rtab(ctab); return err; } static struct tcf_proto **htb_find_tcf(struct Qdisc *sch, unsigned long arg) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl = (struct htb_class *)arg; struct tcf_proto **fl = cl ? &cl->filter_list : &q->filter_list; return fl; } static unsigned long htb_bind_filter(struct Qdisc *sch, unsigned long parent, u32 classid) { struct htb_class *cl = htb_find(classid, sch); /*if (cl && !cl->level) return 0; * The line above used to be there to prevent attaching filters to * leaves. But at least tc_index filter uses this just to get class * for other reasons so that we have to allow for it. * ---- * 19.6.2002 As Werner explained it is ok - bind filter is just * another way to "lock" the class - unlike "get" this lock can * be broken by class during destroy IIUC. */ if (cl) cl->filter_cnt++; return (unsigned long)cl; } static void htb_unbind_filter(struct Qdisc *sch, unsigned long arg) { struct htb_class *cl = (struct htb_class *)arg; if (cl) cl->filter_cnt--; } static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg) { struct htb_sched *q = qdisc_priv(sch); struct htb_class *cl; struct hlist_node *n; unsigned int i; if (arg->stop) return; for (i = 0; i < q->clhash.hashsize; i++) { hlist_for_each_entry(cl, n, &q->clhash.hash[i], common.hnode) { if (arg->count < arg->skip) { arg->count++; continue; } if (arg->fn(sch, (unsigned long)cl, arg) < 0) { arg->stop = 1; return; } arg->count++; } } } static const struct Qdisc_class_ops htb_class_ops = { .graft = htb_graft, .leaf = htb_leaf, .qlen_notify = htb_qlen_notify, .get = htb_get, .put = htb_put, .change = htb_change_class, .delete = htb_delete, .walk = htb_walk, .tcf_chain = htb_find_tcf, .bind_tcf = htb_bind_filter, .unbind_tcf = htb_unbind_filter, .dump = htb_dump_class, .dump_stats = htb_dump_class_stats, }; static struct Qdisc_ops htb_qdisc_ops __read_mostly = { .cl_ops = &htb_class_ops, .id = "htb", .priv_size = sizeof(struct htb_sched), .enqueue = htb_enqueue, .dequeue = htb_dequeue, .peek = qdisc_peek_dequeued, .drop = htb_drop, .init = htb_init, .reset = htb_reset, .destroy = htb_destroy, .dump = htb_dump, .owner = THIS_MODULE, }; static int __init htb_module_init(void) { return register_qdisc(&htb_qdisc_ops); } static void __exit htb_module_exit(void) { unregister_qdisc(&htb_qdisc_ops); } module_init(htb_module_init) module_exit(htb_module_exit) MODULE_LICENSE("GPL");
43,917
25.697872
93
c
cba-pipeline-public
cba-pipeline-public-master/containernet/util/docker/entrypoint.sh
#! /bin/bash -e service openvswitch-switch start if [ ! -S /var/run/docker.sock ]; then echo 'Error: the Docker socket file "/var/run/docker.sock" was not found. It should be mounted as a volume.' exit 1 fi # this cannot be done from the Dockerfile since we have the socket not mounted during build echo 'Pulling the "ubuntu:trusty" image ... please wait' docker pull 'ubuntu:trusty' echo "Welcome to Containernet running within a Docker container ..." if [[ $# -eq 0 ]]; then exec /bin/bash else exec $* fi
529
24.238095
112
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/util/vm/install-mininet-vm.sh
#!/bin/bash # This script is intended to install Mininet into # a brand-new Ubuntu virtual machine, # to create a fully usable "tutorial" VM. # # optional argument: Mininet branch to install set -e echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null sudo sed -i -e 's/Default/#Default/' /etc/sudoers echo mininet-vm | sudo tee /etc/hostname > /dev/null sudo sed -i -e 's/ubuntu/mininet-vm/g' /etc/hosts sudo hostname `cat /etc/hostname` sudo sed -i -e 's/splash//' /etc/default/grub sudo sed -i -e 's/quiet/text/' /etc/default/grub sudo update-grub # Update from official archive sudo apt-get update # 12.10 and earlier #sudo sed -i -e 's/us.archive.ubuntu.com/mirrors.kernel.org/' \ # /etc/apt/sources.list # 13.04 and later #sudo sed -i -e 's/\/archive.ubuntu.com/\/mirrors.kernel.org/' \ # /etc/apt/sources.list # Clean up vmware easy install junk if present if [ -e /etc/issue.backup ]; then sudo mv /etc/issue.backup /etc/issue fi if [ -e /etc/rc.local.backup ]; then sudo mv /etc/rc.local.backup /etc/rc.local fi # Fetch Mininet sudo apt-get -y install git-core openssh-server git clone git://github.com/mininet/mininet # Optionally check out branch if [ "$1" != "" ]; then pushd mininet #git checkout -b $1 $1 # TODO branch will in detached HEAD state if it is not master git checkout $1 popd fi # Install Mininet time mininet/util/install.sh # Finalize VM time mininet/util/install.sh -tcd # Ignoring this since NOX classic is deprecated #if ! grep NOX_CORE_DIR .bashrc; then # echo "export NOX_CORE_DIR=~/noxcore/build/src/" >> .bashrc #fi echo "Done preparing Mininet VM."
1,630
30.365385
78
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/util/vm/build.py
#!/usr/bin/python """ build.py: build a Mininet VM Basic idea: prepare -> create base install image if it's missing - download iso if it's missing - install from iso onto image build -> create cow disk for new VM, based on base image -> boot it in qemu/kvm with text /serial console -> install Mininet test -> sudo mn --test pingall -> make test release -> shut down VM -> shrink-wrap VM -> upload to storage """ import os from os import stat, path from stat import ST_MODE, ST_SIZE from os.path import abspath from sys import exit, stdout, argv, modules import re from glob import glob from subprocess import check_output, call, Popen from tempfile import mkdtemp, NamedTemporaryFile from time import time, strftime, localtime import argparse from distutils.spawn import find_executable import inspect pexpect = None # For code check - imported dynamically # boot can be slooooow!!!! need to debug/optimize somehow TIMEOUT=600 # Some configuration options # Possibly change this to use the parsed arguments instead! LogToConsole = False # VM output to console rather than log file SaveQCOW2 = False # Save QCOW2 image rather than deleting it NoKVM = False # Don't use kvm and use emulation instead Branch = None # Branch to update and check out before testing Zip = False # Archive .ovf and .vmdk into a .zip file Forward = [] # VM port forwarding options (-redir) Chown = '' # Build directory owner VMImageDir = os.environ[ 'HOME' ] + '/vm-images' Prompt = '\$ ' # Shell prompt that pexpect will wait for isoURLs = { 'precise32server': 'http://mirrors.kernel.org/ubuntu-releases/12.04/' 'ubuntu-12.04.5-server-i386.iso', 'precise64server': 'http://mirrors.kernel.org/ubuntu-releases/12.04/' 'ubuntu-12.04.5-server-amd64.iso', 'trusty32server': 'http://mirrors.kernel.org/ubuntu-releases/14.04/' 'ubuntu-14.04.3-server-i386.iso', 'trusty64server': 'http://mirrors.kernel.org/ubuntu-releases/14.04/' 'ubuntu-14.04.3-server-amd64.iso', 'wily32server': 'http://mirrors.kernel.org/ubuntu-releases/15.10/' 'ubuntu-15.10-server-i386.iso', 'wily64server': 'http://mirrors.kernel.org/ubuntu-releases/15.10/' 'ubuntu-15.10-server-amd64.iso', } def OSVersion( flavor ): "Return full OS version string for build flavor" urlbase = path.basename( isoURLs.get( flavor, 'unknown' ) ) return path.splitext( urlbase )[ 0 ] def OVFOSNameID( flavor ): "Return OVF-specified ( OS Name, ID ) for flavor" version = OSVersion( flavor ) arch = archFor( flavor ) if 'ubuntu' in version: map = { 'i386': ( 'Ubuntu', 93 ), 'x86_64': ( 'Ubuntu 64-bit', 94 ) } else: map = { 'i386': ( 'Linux', 36 ), 'x86_64': ( 'Linux 64-bit', 101 ) } osname, osid = map[ arch ] return osname, osid LogStartTime = time() LogFile = None def log( *args, **kwargs ): """Simple log function: log( message along with local and elapsed time cr: False/0 for no CR""" cr = kwargs.get( 'cr', True ) elapsed = time() - LogStartTime clocktime = strftime( '%H:%M:%S', localtime() ) msg = ' '.join( str( arg ) for arg in args ) output = '%s [ %.3f ] %s' % ( clocktime, elapsed, msg ) if cr: print output else: print output, # Optionally mirror to LogFile if type( LogFile ) is file: if cr: output += '\n' LogFile.write( output ) LogFile.flush() def run( cmd, **kwargs ): "Convenient interface to check_output" log( '-', cmd ) cmd = cmd.split() arg0 = cmd[ 0 ] if not find_executable( arg0 ): raise Exception( 'Cannot find executable "%s";' % arg0 + 'you might try %s --depend' % argv[ 0 ] ) return check_output( cmd, **kwargs ) def srun( cmd, **kwargs ): "Run + sudo" return run( 'sudo ' + cmd, **kwargs ) # BL: we should probably have a "checkDepend()" which # checks to make sure all dependencies are satisfied! def depend(): "Install package dependencies" log( '* Installing package dependencies' ) run( 'sudo apt-get -qy update' ) run( 'sudo apt-get -qy install' ' kvm cloud-utils genisoimage qemu-kvm qemu-utils' ' e2fsprogs dnsmasq curl' ' python-setuptools mtools zip' ) run( 'sudo easy_install pexpect' ) def popen( cmd ): "Convenient interface to popen" log( cmd ) cmd = cmd.split() return Popen( cmd ) def remove( fname ): "Remove a file, ignoring errors" try: os.remove( fname ) except OSError: pass def findiso( flavor ): "Find iso, fetching it if it's not there already" url = isoURLs[ flavor ] name = path.basename( url ) iso = path.join( VMImageDir, name ) if not path.exists( iso ) or ( stat( iso )[ ST_MODE ] & 0777 != 0444 ): log( '* Retrieving', url ) run( 'curl -C - -o %s %s' % ( iso, url ) ) # Make sure the file header/type is something reasonable like # 'ISO' or 'x86 boot sector', and not random html or text result = run( 'file ' + iso ) if 'ISO' not in result and 'boot' not in result: os.remove( iso ) raise Exception( 'findiso: could not download iso from ' + url ) # Write-protect iso, signaling it is complete log( '* Write-protecting iso', iso) os.chmod( iso, 0444 ) log( '* Using iso', iso ) return iso def attachNBD( cow, flags='' ): """Attempt to attach a COW disk image and return its nbd device flags: additional flags for qemu-nbd (e.g. -r for readonly)""" # qemu-nbd requires an absolute path cow = abspath( cow ) log( '* Checking for unused /dev/nbdX device ' ) for i in range ( 0, 63 ): nbd = '/dev/nbd%d' % i # Check whether someone's already messing with that device if call( [ 'pgrep', '-f', nbd ] ) == 0: continue srun( 'modprobe nbd max-part=64' ) srun( 'qemu-nbd %s -c %s %s' % ( flags, nbd, cow ) ) print return nbd raise Exception( "Error: could not find unused /dev/nbdX device" ) def detachNBD( nbd ): "Detatch an nbd device" srun( 'qemu-nbd -d ' + nbd ) def extractKernel( image, flavor, imageDir=VMImageDir ): "Extract kernel and initrd from base image" kernel = path.join( imageDir, flavor + '-vmlinuz' ) initrd = path.join( imageDir, flavor + '-initrd' ) if path.exists( kernel ) and ( stat( image )[ ST_MODE ] & 0777 ) == 0444: # If kernel is there, then initrd should also be there return kernel, initrd log( '* Extracting kernel to', kernel ) nbd = attachNBD( image, flags='-r' ) print srun( 'partx ' + nbd ) # Assume kernel is in partition 1/boot/vmlinuz*generic for now part = nbd + 'p1' mnt = mkdtemp() srun( 'mount -o ro,noload %s %s' % ( part, mnt ) ) kernsrc = glob( '%s/boot/vmlinuz*generic' % mnt )[ 0 ] initrdsrc = glob( '%s/boot/initrd*generic' % mnt )[ 0 ] srun( 'cp %s %s' % ( initrdsrc, initrd ) ) srun( 'chmod 0444 ' + initrd ) srun( 'cp %s %s' % ( kernsrc, kernel ) ) srun( 'chmod 0444 ' + kernel ) srun( 'umount ' + mnt ) run( 'rmdir ' + mnt ) detachNBD( nbd ) return kernel, initrd def findBaseImage( flavor, size='8G' ): "Return base VM image and kernel, creating them if needed" image = path.join( VMImageDir, flavor + '-base.qcow2' ) if path.exists( image ): # Detect race condition with multiple builds perms = stat( image )[ ST_MODE ] & 0777 if perms != 0444: raise Exception( 'Error - %s is writable ' % image + '; are multiple builds running?' ) else: # We create VMImageDir here since we are called first run( 'mkdir -p %s' % VMImageDir ) iso = findiso( flavor ) log( '* Creating image file', image ) run( 'qemu-img create -f qcow2 %s %s' % ( image, size ) ) installUbuntu( iso, image ) # Write-protect image, also signaling it is complete log( '* Write-protecting image', image) os.chmod( image, 0444 ) kernel, initrd = extractKernel( image, flavor ) log( '* Using base image', image, 'and kernel', kernel ) return image, kernel, initrd # Kickstart and Preseed files for Ubuntu/Debian installer # # Comments: this is really clunky and painful. If Ubuntu # gets their act together and supports kickstart a bit better # then we can get rid of preseed and even use this as a # Fedora installer as well. # # Another annoying thing about Ubuntu is that it can't just # install a normal system from the iso - it has to download # junk from the internet, making this house of cards even # more precarious. KickstartText =""" #Generated by Kickstart Configurator #platform=x86 #System language lang en_US #Language modules to install langsupport en_US #System keyboard keyboard us #System mouse mouse #System timezone timezone America/Los_Angeles #Root password rootpw --disabled #Initial user user mininet --fullname "mininet" --password "mininet" #Use text mode install text #Install OS instead of upgrade install #Use CDROM installation media cdrom #System bootloader configuration bootloader --location=mbr #Clear the Master Boot Record zerombr yes #Partition clearing information clearpart --all --initlabel #Automatic partitioning autopart #System authorization information auth --useshadow --enablemd5 #Firewall configuration firewall --disabled #Do not configure the X Window System skipx """ # Tell the Ubuntu/Debian installer to stop asking stupid questions PreseedText = ( """ """ #d-i mirror/country string manual #d-i mirror/http/hostname string mirrors.kernel.org """ d-i mirror/http/directory string /ubuntu d-i mirror/http/proxy string d-i partman/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true d-i user-setup/allow-password-weak boolean true d-i finish-install/reboot_in_progress note d-i debian-installer/exit/poweroff boolean true """ ) def makeKickstartFloppy(): "Create and return kickstart floppy, kickstart, preseed" kickstart = 'ks.cfg' with open( kickstart, 'w' ) as f: f.write( KickstartText ) preseed = 'ks.preseed' with open( preseed, 'w' ) as f: f.write( PreseedText ) # Create floppy and copy files to it floppy = 'ksfloppy.img' run( 'qemu-img create %s 1440k' % floppy ) run( 'mkfs -t msdos ' + floppy ) run( 'mcopy -i %s %s ::/' % ( floppy, kickstart ) ) run( 'mcopy -i %s %s ::/' % ( floppy, preseed ) ) return floppy, kickstart, preseed def archFor( filepath ): "Guess architecture for file path" name = path.basename( filepath ) if 'amd64' in name or 'x86_64' in name: arch = 'x86_64' # Beware of version 64 of a 32-bit OS elif 'i386' in name or '32' in name or 'x86' in name: arch = 'i386' elif '64' in name: arch = 'x86_64' else: log( "Error: can't discern CPU for name", name ) exit( 1 ) return arch def installUbuntu( iso, image, logfilename='install.log', memory=1024 ): "Install Ubuntu from iso onto image" kvm = 'qemu-system-' + archFor( iso ) floppy, kickstart, preseed = makeKickstartFloppy() # Mount iso so we can use its kernel mnt = mkdtemp() srun( 'mount %s %s' % ( iso, mnt ) ) kernel = path.join( mnt, 'install/vmlinuz' ) initrd = path.join( mnt, 'install/initrd.gz' ) if NoKVM: accel = 'tcg' else: accel = 'kvm' cmd = [ 'sudo', kvm, '-machine', 'accel=%s' % accel, '-nographic', '-netdev', 'user,id=mnbuild', '-device', 'virtio-net,netdev=mnbuild', '-m', str( memory ), '-k', 'en-us', '-fda', floppy, '-drive', 'file=%s,if=virtio' % image, '-cdrom', iso, '-kernel', kernel, '-initrd', initrd, '-append', ' ks=floppy:/' + kickstart + ' preseed/file=floppy://' + preseed + ' console=ttyS0' ] ubuntuStart = time() log( '* INSTALLING UBUNTU FROM', iso, 'ONTO', image ) log( ' '.join( cmd ) ) log( '* logging to', abspath( logfilename ) ) params = {} if not LogToConsole: logfile = open( logfilename, 'w' ) params = { 'stdout': logfile, 'stderr': logfile } vm = Popen( cmd, **params ) log( '* Waiting for installation to complete') vm.wait() if not LogToConsole: logfile.close() elapsed = time() - ubuntuStart # Unmount iso and clean up srun( 'umount ' + mnt ) run( 'rmdir ' + mnt ) if vm.returncode != 0: raise Exception( 'Ubuntu installation returned error %d' % vm.returncode ) log( '* UBUNTU INSTALLATION COMPLETED FOR', image ) log( '* Ubuntu installation completed in %.2f seconds' % elapsed ) def boot( cow, kernel, initrd, logfile, memory=1024, cpuCores=1 ): """Boot qemu/kvm with a COW disk and local/user data store cow: COW disk path kernel: kernel path logfile: log file for pexpect object memory: memory size in MB cpuCores: number of CPU cores to use returns: pexpect object to qemu process""" # pexpect might not be installed until after depend() is called global pexpect if not pexpect: import pexpect class Spawn( pexpect.spawn ): "Subprocess is sudo, so we have to sudo kill it" def close( self, force=False ): srun( 'kill %d' % self.pid ) arch = archFor( kernel ) log( '* Detected kernel architecture', arch ) if NoKVM: accel = 'tcg' else: accel = 'kvm' cmd = [ 'sudo', 'qemu-system-' + arch, '-machine accel=%s' % accel, '-nographic', '-netdev user,id=mnbuild', '-device virtio-net,netdev=mnbuild', '-m %s' % memory, '-k en-us', '-kernel', kernel, '-initrd', initrd, '-drive file=%s,if=virtio' % cow, '-append "root=/dev/vda1 init=/sbin/init console=ttyS0" ' ] if Forward: cmd += sum( [ [ '-redir', f ] for f in Forward ], [] ) if cpuCores > 1: cmd += [ '-smp cores=%s' % cpuCores ] cmd = ' '.join( cmd ) log( '* BOOTING VM FROM', cow ) log( cmd ) vm = Spawn( cmd, timeout=TIMEOUT, logfile=logfile ) return vm def login( vm, user='mininet', password='mininet' ): "Log in to vm (pexpect object)" log( '* Waiting for login prompt' ) vm.expect( 'login: ' ) log( '* Logging in' ) vm.sendline( user ) log( '* Waiting for password prompt' ) vm.expect( 'Password: ' ) log( '* Sending password' ) vm.sendline( password ) log( '* Waiting for login...' ) def removeNtpd( vm, prompt=Prompt, ntpPackage='ntp' ): "Remove ntpd and set clock immediately" log( '* Removing ntpd' ) vm.sendline( 'sudo -n apt-get -qy remove ' + ntpPackage ) vm.expect( prompt ) # Try to make sure that it isn't still running vm.sendline( 'sudo -n pkill ntpd' ) vm.expect( prompt ) log( '* Getting seconds since epoch from this server' ) # Note r'date +%s' specifies a format for 'date', not python! seconds = int( run( r'date +%s' ) ) log( '* Setting VM clock' ) vm.sendline( 'sudo -n date -s @%d' % seconds ) def sanityTest( vm ): "Run Mininet sanity test (pingall) in vm" vm.sendline( 'sudo -n mn --test pingall' ) if vm.expect( [ ' 0% dropped', pexpect.TIMEOUT ], timeout=45 ) == 0: log( '* Sanity check OK' ) else: log( '* Sanity check FAILED' ) log( '* Sanity check output:' ) log( vm.before ) def coreTest( vm, prompt=Prompt ): "Run core tests (make test) in VM" log( '* Making sure cgroups are mounted' ) vm.sendline( 'sudo -n service cgroup-lite restart' ) vm.expect( prompt ) vm.sendline( 'sudo -n cgroups-mount' ) vm.expect( prompt ) log( '* Running make test' ) vm.sendline( 'cd ~/mininet; sudo make test' ) # We should change "make test" to report the number of # successful and failed tests. For now, we have to # know the time for each test, which means that this # script will have to change as we add more tests. for test in range( 0, 2 ): if vm.expect( [ 'OK.*\r\n', 'FAILED.*\r\n', pexpect.TIMEOUT ], timeout=180 ) == 0: log( '* Test', test, 'OK' ) else: log( '* Test', test, 'FAILED' ) log( '* Test', test, 'output:' ) log( vm.before ) def installPexpect( vm, prompt=Prompt ): "install pexpect" vm.sendline( 'sudo -n apt-get -qy install python-pexpect' ) vm.expect( prompt ) def noneTest( vm, prompt=Prompt ): "This test does nothing" installPexpect( vm, prompt ) vm.sendline( 'echo' ) def examplesquickTest( vm, prompt=Prompt ): "Quick test of mininet examples" installPexpect( vm, prompt ) vm.sendline( 'sudo -n python ~/mininet/examples/test/runner.py -v -quick' ) def examplesfullTest( vm, prompt=Prompt ): "Full (slow) test of mininet examples" installPexpect( vm, prompt ) vm.sendline( 'sudo -n python ~/mininet/examples/test/runner.py -v' ) def walkthroughTest( vm, prompt=Prompt ): "Test mininet walkthrough" installPexpect( vm, prompt ) vm.sendline( 'sudo -n python ~/mininet/mininet/test/test_walkthrough.py -v' ) def useTest( vm, prompt=Prompt ): "Use VM interactively - exit by pressing control-]" old = vm.logfile if old == stdout: # Avoid doubling every output character! log( '* Temporarily disabling logging to stdout' ) vm.logfile = None log( '* Switching to interactive use - press control-] to exit' ) vm.interact() if old == stdout: log( '* Restoring logging to stdout' ) vm.logfile = stdout # A convenient alias for use - 'run'; we might want to allow # 'run' to take a parameter runTest = useTest def checkOutBranch( vm, branch, prompt=Prompt ): # This is a bit subtle; it will check out an existing branch (e.g. master) # if it exists; otherwise it will create a detached branch. # The branch will be rebased to its parent on origin. # This probably doesn't matter since we're running on a COW disk # anyway. vm.sendline( 'cd ~/mininet; git fetch --all; git checkout ' + branch + '; git pull --rebase origin ' + branch ) vm.expect( prompt ) vm.sendline( 'sudo -n make install' ) def interact( vm, tests, pre='', post='', prompt=Prompt ): "Interact with vm, which is a pexpect object" login( vm ) log( '* Waiting for login...' ) vm.expect( prompt ) log( '* Sending hostname command' ) vm.sendline( 'hostname' ) log( '* Waiting for output' ) vm.expect( prompt ) log( '* Fetching Mininet VM install script' ) branch = Branch if Branch else 'master' vm.sendline( 'wget ' 'https://raw.github.com/mininet/mininet/%s/util/vm/' 'install-mininet-vm.sh' % branch ) vm.expect( prompt ) log( '* Running VM install script' ) installcmd = 'bash -v install-mininet-vm.sh' if Branch: installcmd += ' ' + Branch vm.sendline( installcmd ) vm.expect ( 'password for mininet: ' ) vm.sendline( 'mininet' ) log( '* Waiting for script to complete... ' ) # Gigantic timeout for now ;-( vm.expect( 'Done preparing Mininet', timeout=3600 ) log( '* Completed successfully' ) vm.expect( prompt ) version = getMininetVersion( vm ) vm.expect( prompt ) log( '* Mininet version: ', version ) log( '* Testing Mininet' ) runTests( vm, tests=tests, pre=pre, post=post ) # Ubuntu adds this because we install via a serial console, # but we want the VM to boot via the VM console. Otherwise # we get the message 'error: terminal "serial" not found' log( '* Disabling serial console' ) vm.sendline( "sudo sed -i -e 's/^GRUB_TERMINAL=serial/#GRUB_TERMINAL=serial/' " "/etc/default/grub; sudo update-grub" ) vm.expect( prompt ) log( '* Shutting down' ) vm.sendline( 'sync; sudo shutdown -h now' ) log( '* Waiting for EOF/shutdown' ) vm.read() log( '* Interaction complete' ) return version def cleanup(): "Clean up leftover qemu-nbd processes and other junk" call( [ 'sudo', 'pkill', '-9', 'qemu-nbd' ] ) def convert( cow, basename ): """Convert a qcow2 disk to a vmdk and put it a new directory basename: base name for output vmdk file""" vmdk = basename + '.vmdk' log( '* Converting qcow2 to vmdk' ) run( 'qemu-img convert -f qcow2 -O vmdk %s %s' % ( cow, vmdk ) ) return vmdk # Template for OVF - a very verbose format! # In the best of all possible worlds, we might use an XML # library to generate this, but a template is easier and # possibly more concise! # Warning: XML file cannot begin with a newline! OVFTemplate = """<?xml version="1.0"?> <Envelope ovf:version="1.0" xml:lang="en-US" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <References> <File ovf:href="%(diskname)s" ovf:id="file1" ovf:size="%(filesize)d"/> </References> <DiskSection> <Info>Virtual disk information</Info> <Disk ovf:capacity="%(disksize)d" ovf:capacityAllocationUnits="byte" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized"/> </DiskSection> <NetworkSection> <Info>The list of logical networks</Info> <Network ovf:name="nat"> <Description>The nat network</Description> </Network> </NetworkSection> <VirtualSystem ovf:id="%(vmname)s"> <Info>%(vminfo)s (%(name)s)</Info> <Name>%(vmname)s</Name> <OperatingSystemSection ovf:id="%(osid)d"> <Info>The kind of installed guest operating system</Info> <Description>%(osname)s</Description> </OperatingSystemSection> <VirtualHardwareSection> <Info>Virtual hardware requirements</Info> <Item> <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits> <rasd:Description>Number of Virtual CPUs</rasd:Description> <rasd:ElementName>%(cpus)s virtual CPU(s)</rasd:ElementName> <rasd:InstanceID>1</rasd:InstanceID> <rasd:ResourceType>3</rasd:ResourceType> <rasd:VirtualQuantity>%(cpus)s</rasd:VirtualQuantity> </Item> <Item> <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits> <rasd:Description>Memory Size</rasd:Description> <rasd:ElementName>%(mem)dMB of memory</rasd:ElementName> <rasd:InstanceID>2</rasd:InstanceID> <rasd:ResourceType>4</rasd:ResourceType> <rasd:VirtualQuantity>%(mem)d</rasd:VirtualQuantity> </Item> <Item> <rasd:Address>0</rasd:Address> <rasd:Caption>scsiController0</rasd:Caption> <rasd:Description>SCSI Controller</rasd:Description> <rasd:ElementName>scsiController0</rasd:ElementName> <rasd:InstanceID>4</rasd:InstanceID> <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType> <rasd:ResourceType>6</rasd:ResourceType> </Item> <Item> <rasd:AddressOnParent>0</rasd:AddressOnParent> <rasd:ElementName>disk1</rasd:ElementName> <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource> <rasd:InstanceID>11</rasd:InstanceID> <rasd:Parent>4</rasd:Parent> <rasd:ResourceType>17</rasd:ResourceType> </Item> <Item> <rasd:AddressOnParent>2</rasd:AddressOnParent> <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation> <rasd:Connection>nat</rasd:Connection> <rasd:Description>E1000 ethernet adapter on nat</rasd:Description> <rasd:ElementName>ethernet0</rasd:ElementName> <rasd:InstanceID>12</rasd:InstanceID> <rasd:ResourceSubType>E1000</rasd:ResourceSubType> <rasd:ResourceType>10</rasd:ResourceType> </Item> <Item> <rasd:Address>0</rasd:Address> <rasd:Caption>usb</rasd:Caption> <rasd:Description>USB Controller</rasd:Description> <rasd:ElementName>usb</rasd:ElementName> <rasd:InstanceID>9</rasd:InstanceID> <rasd:ResourceType>23</rasd:ResourceType> </Item> </VirtualHardwareSection> </VirtualSystem> </Envelope> """ def generateOVF( name, osname, osid, diskname, disksize, mem=1024, cpus=1, vmname='Mininet-VM', vminfo='A Mininet Virtual Machine' ): """Generate (and return) OVF file "name.ovf" name: root name of OVF file to generate osname: OS name for OVF (Ubuntu | Ubuntu 64-bit) osid: OS ID for OVF (93 | 94 ) diskname: name of disk file disksize: size of virtual disk in bytes mem: VM memory size in MB cpus: # of virtual CPUs vmname: Name for VM (default name when importing) vmimfo: Brief description of VM for OVF""" ovf = name + '.ovf' filesize = stat( diskname )[ ST_SIZE ] params = dict( osname=osname, osid=osid, diskname=diskname, filesize=filesize, disksize=disksize, name=name, mem=mem, cpus=cpus, vmname=vmname, vminfo=vminfo ) xmltext = OVFTemplate % params with open( ovf, 'w+' ) as f: f.write( xmltext ) return ovf def qcow2size( qcow2 ): "Return virtual disk size (in bytes) of qcow2 image" output = check_output( [ 'qemu-img', 'info', qcow2 ] ) try: assert 'format: qcow' in output bytes = int( re.findall( '(\d+) bytes', output )[ 0 ] ) except: raise Exception( 'Could not determine size of %s' % qcow2 ) return bytes def build( flavor='raring32server', tests=None, pre='', post='', memory=1024 ): """Build a Mininet VM; return vmdk and vdisk size tests: tests to run pre: command line to run in VM before tests post: command line to run in VM after tests prompt: shell prompt (default '$ ') memory: memory size in MB""" global LogFile, Zip, Chown start = time() lstart = localtime() date = strftime( '%y%m%d-%H-%M-%S', lstart) ovfdate = strftime( '%y%m%d', lstart ) dir = 'mn-%s-%s' % ( flavor, date ) if Branch: dirname = 'mn-%s-%s-%s' % ( Branch, flavor, date ) try: os.mkdir( dir) except: raise Exception( "Failed to create build directory %s" % dir ) if Chown: run( 'chown %s %s' % ( Chown, dir ) ) os.chdir( dir ) LogFile = open( 'build.log', 'w' ) log( '* Logging to', abspath( LogFile.name ) ) log( '* Created working directory', dir ) image, kernel, initrd = findBaseImage( flavor ) basename = 'mininet-' + flavor volume = basename + '.qcow2' run( 'qemu-img create -f qcow2 -b %s %s' % ( image, volume ) ) log( '* VM image for', flavor, 'created as', volume ) if LogToConsole: logfile = stdout else: logfile = open( flavor + '.log', 'w+' ) log( '* Logging results to', abspath( logfile.name ) ) vm = boot( volume, kernel, initrd, logfile, memory=memory ) version = interact( vm, tests=tests, pre=pre, post=post ) size = qcow2size( volume ) arch = archFor( flavor ) vmdk = convert( volume, basename='mininet-vm-' + arch ) if not SaveQCOW2: log( '* Removing qcow2 volume', volume ) os.remove( volume ) log( '* Converted VM image stored as', abspath( vmdk ) ) ovfname = 'mininet-%s-%s-%s' % ( version, ovfdate, OSVersion( flavor ) ) osname, osid = OVFOSNameID( flavor ) ovf = generateOVF( name=ovfname, osname=osname, osid=osid, diskname=vmdk, disksize=size ) log( '* Generated OVF descriptor file', ovf ) if Zip: log( '* Generating .zip file' ) run( 'zip %s-ovf.zip %s %s' % ( ovfname, ovf, vmdk ) ) end = time() elapsed = end - start log( '* Results logged to', abspath( logfile.name ) ) log( '* Completed in %.2f seconds' % elapsed ) log( '* %s VM build DONE!!!!! :D' % flavor ) os.chdir( '..' ) def runTests( vm, tests=None, pre='', post='', prompt=Prompt, uninstallNtpd=False ): "Run tests (list) in vm (pexpect object)" # We disable ntpd and set the time so that ntpd won't be # messing with the time during tests. Set to true for a COW # disk and False for a non-COW disk. if uninstallNtpd: removeNtpd( vm ) vm.expect( prompt ) if Branch: checkOutBranch( vm, branch=Branch ) vm.expect( prompt ) if not tests: tests = [] if pre: log( '* Running command', pre ) vm.sendline( pre ) vm.expect( prompt ) testfns = testDict() if tests: log( '* Running tests' ) for test in tests: if test not in testfns: raise Exception( 'Unknown test: ' + test ) log( '* Running test', test ) fn = testfns[ test ] fn( vm ) vm.expect( prompt ) if post: log( '* Running post-test command', post ) vm.sendline( post ) vm.expect( prompt ) def getMininetVersion( vm ): "Run mn to find Mininet version in VM" vm.sendline( '~/mininet/bin/mn --version' ) # Eat command line echo, then read output line vm.readline() version = vm.readline().strip() return version def bootAndRun( image, prompt=Prompt, memory=1024, cpuCores=1, outputFile=None, runFunction=None, **runArgs ): """Boot and test VM tests: list of tests to run pre: command line to run in VM before tests post: command line to run in VM after tests prompt: shell prompt (default '$ ') memory: VM memory size in MB cpuCores: number of CPU cores to use""" bootTestStart = time() basename = path.basename( image ) image = abspath( image ) tmpdir = mkdtemp( prefix='test-' + basename ) log( '* Using tmpdir', tmpdir ) cow = path.join( tmpdir, basename + '.qcow2' ) log( '* Creating COW disk', cow ) run( 'qemu-img create -f qcow2 -b %s %s' % ( image, cow ) ) log( '* Extracting kernel and initrd' ) kernel, initrd = extractKernel( image, flavor=basename, imageDir=tmpdir ) if LogToConsole: logfile = stdout else: logfile = NamedTemporaryFile( prefix=basename, suffix='.testlog', delete=False ) log( '* Logging VM output to', logfile.name ) vm = boot( cow=cow, kernel=kernel, initrd=initrd, logfile=logfile, memory=memory, cpuCores=cpuCores ) login( vm ) log( '* Waiting for prompt after login' ) vm.expect( prompt ) # runFunction should begin with sendline and should eat its last prompt if runFunction: runFunction( vm, **runArgs ) log( '* Shutting down' ) vm.sendline( 'sudo -n shutdown -h now ' ) log( '* Waiting for shutdown' ) vm.wait() if outputFile: log( '* Saving temporary image to %s' % outputFile ) convert( cow, outputFile ) log( '* Removing temporary dir', tmpdir ) srun( 'rm -rf ' + tmpdir ) elapsed = time() - bootTestStart log( '* Boot and test completed in %.2f seconds' % elapsed ) def buildFlavorString(): "Return string listing valid build flavors" return 'valid build flavors: %s' % ' '.join( sorted( isoURLs ) ) def testDict(): "Return dict of tests in this module" suffix = 'Test' trim = len( suffix ) fdict = dict( [ ( fname[ : -trim ], f ) for fname, f in inspect.getmembers( modules[ __name__ ], inspect.isfunction ) if fname.endswith( suffix ) ] ) return fdict def testString(): "Return string listing valid tests" tests = [ '%s <%s>' % ( name, func.__doc__ ) for name, func in testDict().iteritems() ] return 'valid tests: %s' % ', '.join( tests ) def parseArgs(): "Parse command line arguments and run" global LogToConsole, NoKVM, Branch, Zip, TIMEOUT, Forward, Chown parser = argparse.ArgumentParser( description='Mininet VM build script', epilog='' ) parser.add_argument( '-v', '--verbose', action='store_true', help='send VM output to console rather than log file' ) parser.add_argument( '-d', '--depend', action='store_true', help='install dependencies for this script' ) parser.add_argument( '-l', '--list', action='store_true', help='list valid build flavors and tests' ) parser.add_argument( '-c', '--clean', action='store_true', help='clean up leftover build junk (e.g. qemu-nbd)' ) parser.add_argument( '-q', '--qcow2', action='store_true', help='save qcow2 image rather than deleting it' ) parser.add_argument( '-n', '--nokvm', action='store_true', help="Don't use kvm - use tcg emulation instead" ) parser.add_argument( '-m', '--memory', metavar='MB', type=int, default=1024, help='VM memory size in MB' ) parser.add_argument( '-i', '--image', metavar='image', default=[], action='append', help='Boot and test an existing VM image' ) parser.add_argument( '-t', '--test', metavar='test', default=[], action='append', help='specify a test to run; ' + testString() ) parser.add_argument( '-w', '--timeout', metavar='timeout', type=int, default=0, help='set expect timeout' ) parser.add_argument( '-r', '--run', metavar='cmd', default='', help='specify a command line to run before tests' ) parser.add_argument( '-p', '--post', metavar='cmd', default='', help='specify a command line to run after tests' ) parser.add_argument( '-b', '--branch', metavar='branch', help='branch to install and/or check out and test' ) parser.add_argument( 'flavor', nargs='*', help='VM flavor(s) to build; ' + buildFlavorString() ) parser.add_argument( '-z', '--zip', action='store_true', help='archive .ovf and .vmdk into .zip file' ) parser.add_argument( '-o', '--out', help='output file for test image (vmdk)' ) parser.add_argument( '-f', '--forward', default=[], action='append', help='forward VM ports to local server, e.g. tcp:5555::22' ) parser.add_argument( '-u', '--chown', metavar='user', help='specify an owner for build directory' ) args = parser.parse_args() if args.depend: depend() if args.list: print buildFlavorString() if args.clean: cleanup() if args.verbose: LogToConsole = True if args.nokvm: NoKVM = True if args.branch: Branch = args.branch if args.zip: Zip = True if args.timeout: TIMEOUT = args.timeout if args.forward: Forward = args.forward if not args.test and not args.run and not args.post: args.test = [ 'sanity', 'core' ] if args.chown: Chown = args.chown for flavor in args.flavor: if flavor not in isoURLs: print "Unknown build flavor:", flavor print buildFlavorString() break try: build( flavor, tests=args.test, pre=args.run, post=args.post, memory=args.memory ) except Exception as e: log( '* BUILD FAILED with exception: ', e ) exit( 1 ) for image in args.image: bootAndRun( image, runFunction=runTests, tests=args.test, pre=args.run, post=args.post, memory=args.memory, outputFile=args.out, uninstallNtpd=True ) if not ( args.depend or args.list or args.clean or args.flavor or args.image ): parser.print_help() if __name__ == '__main__': parseArgs()
36,314
34.188953
100
py
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ISSUE_TEMPLATE.md
========= Issue submission guidelines (you may delete the text below after reading it ) ========= Before creating a new issue around a potential bug please: 1. Check your browser's console for 404s (MPD file or media fragments) 2. Check for Access-Denied errors which indicates an issue with the server's HTTP access control (CORS) 3. Please use the Dash Validator (http://dashif.org/conformance.html) to make sure your MPD and media fragments conform before you file an issue. 4. View the Javascript console to see the debug traces produced by the reference player. They may indicate why your content is not playing. 5. When you do file an issue please add as much info as possible: * Your dash.js, browser and OS system versions * Valid MPD test content - ideally the URL to the manifest or a static copy of it if it is not public. * The relevant excerpt from the console trace showing the problem. * A clear sequence of steps to reproduce the problem.
960
67.642857
145
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/temp.sh
grunt cp dist/dash.all.min.js ~/tud/hiwi/ndn-demo/ndn_player/src/ cd /Users/mac/tud/hiwi/ndn-demo/ndn_player #gulp serve ./node_modules/gulp/bin/gulp.js serve
159
25.666667
59
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/LICENSE.md
# dash.js BSD License Agreement The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license. **Copyright (c) 2015, Dash Industry Forum. **All rights reserved.** * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Dash Industry Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. **THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.**
1,781
126.285714
759
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/AUTHORS.md
# Dash.js Authors List #####Please add entries to the bottom of the list in the following format * @GitHub UserName (Required) [Name and/or Organization] (Optional) #Authors * @nweber [Digital Primates] * @jefftapper [Jeff Tapper, Digital Primates] * @KozhinM [Mikail Kozhin, Microsoft Open Technologies] * @kirkshoop [Kirk Shoop, Microsoft Open Technologies] * @wilaw [Will Law, Akamai Technologies] * @AkamaiDASH [Dan Sparacio, Akamai Technologies] * @dsilhavy [Daniel Silhavy, Fraunhofer Fokus] * @greg80303 [Greg Rutz, CableLabs] * @heff [Steve Hefferman, Brightcove] * @Tomjohnson916 [Tom Johnson, Brightcove] * @jeroenwiljering [Jeroen Wijering, JWPlayer] * @bbcrddave [David Evans, BBC R&D] * @bbert [Bertrand Berthelot, Orange] * @vigneshvg [Vignesh Venkatasubramanian, Google] * @nicosang [Nicolas Angot, Orange] * @PriyadarshiniV * @senthil-codr [Senthil] * @dweremeichik [Dylan Weremeichik] * @aleal-envivio * @mconlin * @umavinoth * @lbonn * @mdale [Michael Dale, Kaltura] * @sgrebnov [Sergey Grebnov, Microsoft Open Technologies] * @wesleytodd [Wes Todd, Vubeology] * @colde [Loke Dupont, Xstream] * @rgardler [Ross Gardler, Microsoft Open Technologies] * @squapp * @xiaomings * @rcollins112 [Rich Collins, Wowza] * @timothy003 [Timothy Liang] * @JaapHaitsma * @72lions [Thodoris Tsiridis, 72lions] * @TobbeMobiTV [Torbjörn Einarsson, MobiTV] * @mstorsjo [Martin Storsjö] * @Hyddan [Daniel Hedenius] * @qjia7 * @waqarz * @WMSPanel [WMSPanel Team] * @matt-hammond-bbc [Matt Hammond, BBC R&D]
1,507
31.782609
73
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/README.md
<img src="https://cloud.githubusercontent.com/assets/2762250/7824984/985c3e76-03bc-11e5-807b-1402bde4fe56.png" width="400"> Travis CI Status: [![Travis CI Status](http://img.shields.io/travis/Dash-Industry-Forum/dash.js/development.svg?style=flat-square)](https://travis-ci.org/Dash-Industry-Forum/dash.js) Join the discussion: [![Slack Status](https://dashif-slack.azurewebsites.net/badge.svg)](https://dashif-slack.azurewebsites.net) ## Overview A reference client implementation for the playback of MPEG DASH via JavaScript and [compliant browsers](http://caniuse.com/#feat=mediasource). Learn more about DASH IF Reference Client on our [wiki](https://github.com/Dash-Industry-Forum/dash.js/wiki). If your intent is to use the player code without contributing back to this project, then use the MASTER branch which holds the approved and stable public releases. If your goal is to improve or extend the code and contribute back to this project, then you should make your changes in, and submit a pull request against, the DEVELOPMENT branch. Read through our wiki section on https://github.com/Dash-Industry-Forum/dash.js/wiki/How-to-Contribute for a walk-through of the contribution process. All new work should be in the development branch. Master is now reserved for tagged builds. ## Documentation Before you get started, please read the Dash.js v2.0 Migration Document found [here](https://github.com/Dash-Industry-Forum/dash.js/wiki/Migration-2.0) Full [API Documentation ](http://cdn.dashjs.org/latest/jsdoc/index.html) is available describing all public methods, interfaces, properties, and events. For help, join our [Slack channel](https://dashif-slack.azurewebsites.net), our [email list](https://groups.google.com/d/forum/dashjs) and read our [wiki](https://github.com/Dash-Industry-Forum/dash.js/wiki). ## Reference players The released [pre-built reference players](http://dashif.org/reference/players/javascript/index.html) are publicly accessible if you want direct access without writing any Javascript. The [nightly build of the /dev branch reference player](http://dashif.org/reference/players/javascript/nightly/dash.js/samples/dash-if-reference-player/index.html), is pre-release but contains the latest fixes. It is a good place to start if you are debugging playback problems. A nightly build of the latest minified files are also available: [dash.all.min.js](http://dashif.org/reference/players/javascript/nightly/dash.js/dist/dash.all.min.js) and its debug version [dash.all.debug.js](http://dashif.org/reference/players/javascript/nightly/dash.js/dist/dash.all.debug.js). ## Quick Start for Users If you just want a DASH player to use and don't need to see the code or commit to this project, then follow the instructions below. If you are a developer and want to work with this code base, then skip down to the "Quick Start for Developers" section. Put the following code in your web page ``` <script src="http://cdn.dashjs.org/latest/dash.all.min.js"></script> ... <style> video { width: 640px; height: 360px; } </style> ... <body> <div> <video data-dashjs-player autoplay src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" controls></video> </div> </body> ``` Then place your page under a web server (do not try to run from the file system) and load it via http in a MSE-enabled browser. The video will start automatically. Switch out the manifest URL to your own manifest once you have everything working. If you prefer to use the latest code from this project (versus the last tagged release) then see the "Quick Start for Developers" section below. View the /samples folder for many other examples of embedding and using the player. ## Quick Start for Developers ### Reference Player 1. Download 'development' branch 2. Extract dash.js and move the entire folder to localhost (or run any http server instance such as python's SimpleHTTPServer at the root of the dash.js folder). 3. Open samples/dash-if-reference-player/index.html in your MSE capable web browser. ### Install Core Dependencies 1. [install nodejs](http://nodejs.org/) 2. [install grunt](http://gruntjs.com/getting-started) * npm install -g grunt-cli ### Build / Run tests on commandline. 1. Install all Node Modules defined in package.json * npm install 2. Run the GruntFile.js default task * grunt 3. You can also target individual tasks: E.g. * grunt debug (quickest build) * grunt dist * grunt release * grunt test ## Getting Started The standard setup method uses javascript to initialize and provide video details to dash.js. `MediaPlayerFactory` provides an alternative declarative setup syntax. ### Standard Setup Create a video element somewhere in your html. For our purposes, make sure the controls attribute is present. ```html <video id="videoPlayer" controls></video> ``` Add dash.all.min.js to the end of the body. ```html <body> ... <script src="yourPathToDash/dash.all.min.js"></script> </body> ``` Now comes the good stuff. We need to create a MediaPlayer and initialize it. ``` js var url = "http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd"; var player = dashjs.MediaPlayer().create(); player.initialize(document.querySelector("#videoPlayer"), url, true); ``` When it is all done, it should look similar to this: ```html <!doctype html> <html> <head> <title>Dash.js Rocks</title> <style> video { width: 640px; height: 360px; } </style> </head> <body> <div> <video id="videoPlayer" controls></video> </div> <script src="yourPathToDash/dash.all.min.js"></script> <script> (function(){ var url = "http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd"; var player = dashjs.MediaPlayer().create(); player.initialize(document.querySelector("#videoPlayer"), url, true); })(); </script> </body> </html> ``` ### Module Setup We publish dash.js to [npm](https://www.npmjs.com/package/dashjs). Examples of how to use dash.js in different module bundlers can be found in the [`samples/modules`](https://github.com/Dash-Industry-Forum/dash.js/tree/development/samples/modules) directory. ### MediaPlayerFactory Setup An alternative way to build a Dash.js player in your web page is to use the MediaPlayerFactory. The MediaPlayerFactory will automatically instantiate and initialize the MediaPlayer module on appropriately tagged video elements. Create a video element somewhere in your html and provide the path to your `mpd` file as src. Also ensure that your video element has the `data-dashjs-player` attribute on it. ```html <video data-dashjs-player autoplay src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" controls> </video> ``` Add dash.all.min.js to the end of the body. ```html <body> ... <script src="yourPathToDash/dash.all.min.js"></script> </body> ``` When it is all done, it should look similar to this: ```html <!doctype html> <html> <head> <title>Dash.js Rocks</title> <style> video { width: 640px; height: 360px; } </style> </head> <body> <div> <video data-dashjs-player autoplay src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" controls> </video> </div> <script src="yourPathToDash/dash.all.min.js"></script> </body> </html> ``` ### Tested With [<img src="https://cloud.githubusercontent.com/assets/7864462/12837037/452a17c6-cb73-11e5-9f39-fc96893bc9bf.png" alt="Browser Stack Logo" width="300">](https://www.browserstack.com/)
7,802
41.407609
391
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/.travis.yml
language: node_js node_js: - "0.11" - "0.10" before_install: npm install -g grunt-cli install: npm install
111
15
40
yml
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/DashJsMediaFile/index.html
<!doctype html> <html> <head> <meta charset="utf-8" /> <title>Dash.js Rocks</title> <style> video { width: 1280px; height: 480px; } </style> </head> <body> <div> <video id="videoPlayer" controls></video> </div> <div align="center"> <select id="select" onchange="start()"> <option value="true" selected>NDN</option> <option value="false">Non NDN</option> </select> </div> <script type="text/javascript" src="../dist/dash.all.min.js"></script> <script> var NDN; window.onload = start; function start() { NDN = document.getElementById("select").value; //var url = "http://dash.edgesuite.net/dash264/TestCases/1a/netflix/exMPD_BIP_TC1.mpd"; var url = "http://dash.edgesuite.net/dash264/TestCases/1a/sony/SNE_DASH_SD_CASE1A_REVISED.mpd"; var player = dashjs.MediaPlayer().create(); player.initialize(document.querySelector("#videoPlayer"), url, true); }; </script> </body> </html>
1,152
30.162162
103
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/test/helpers/DashUtil.html
<!-- The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license. // // Copyright (c) 2013, Microsoft Open Technologies, Inc. // // All rights reserved. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. // - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. // - Neither the name of the Microsoft Open Technologies, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Dash Player</title> <meta name="description" content="" /> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <style type="text/css"> @import url("style.css"); </style> <!-- Player --> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script src="MPDList.js"></script> <script src="DashUtil.js"></script> <script src="FileSaver.js"></script> <script src="MPDfiles.js"></script> </head> <body background="blueGradientBackground.jpg" width="100%" height="100%" style="background-repeat:no-repeat;background-size:100% 100%"> <center> <div style="width: 95%; background-color: #FFFFFF;margin-top:0px" height="100%"> <center> <div id="divHeader" >DASH PLAYER TEST APP <img src = "MSOpenTech.png" alt = "MSOpenTech" width="150px" style="margin-top:10px"/> </div> </br> <fieldset style="width:550px;"> <legend style="font-family:Verdana; font-size:14px; font-weight:bold"> Instructions </legend> <center> <div id="divBody"> This is an Application to test Dash Player against various MPDS </br> </br> Usage:</br> <ul> <li> Click on Reset before running a new test</li> <li> You can add/edit MPD list in dash.js-pr\test\js\utils\MPDList.js</li> <li> MPD url should be added corresponding to appropriate array index</li> <li> Enable ActiveX options to run on IE</li> </ul> </div> </center> </fieldset> </br> <div width="50px" align="center"> <label id="lbTestMode" style="font-weight:bold">Select Test Mode</label> <select id = "myList"> <option value = "1">Manual</option> <option value = "2">Automation</option> </select> <div> </br> <div width="500px" height="100px" style="overflow-y: 50px"> <div cellpadding="5px"> <input type="button" class="AddMPD" value="Add MPD" style="width:80px;" onclick="addMPD()" /> <input type="button" class="Reset" value="Reset" style="width:80px;" onclick="window.location.reload()"> <input type="button" class="StopTests" value="Stop" style="width:80px;" onclick="stopTest()" id="btnStopTest" /> <input type="button" class="ResumeTests" value="Resume" style="width:80px;" onclick="resumeTest()" id="btnResumeTest" /> <input type="button" class="ExportLog" value="Export Log" style="width:80px;" onclick="logging()" id="btnExportLog" /> <input type="button" class="ExportToJSON" value="Export to JSON" style="width: 110px;" onclick="exportToJSON()" id="btnExportToJSON" /> <input type="file" id="files" name="files[]" /><div id="fileContents" value="" style="visibility:hidden"> </div> </div> <div id = "popup_box" > <div id="addMPDURL" style="margin-left:200px">Enter the MPD Url</div> <input type="text" class="AddMPDText" id="AddMPDTextArea" style="margin-top:20px;width:350px"/> <a id = "popupBoxClose" > X </a> <input type="button" class="AddMPDData" value="Add" style="width: 70px;" onclick="addMPDData()" /> </br> </br> <div id="successMsg" ></div> </div> <div id = "container" > </div > </div> <div id="MPDUrl"></div> </br> </center> <center> <div id="divtable" > <table height="100%" style="border: 1px solid black;" id="tbMPD"> <thead> <tr align="center" style="border: 1px solid black;"> <th width="150px"> MPD </th> <th width="250px"> Events </th> <th width="150px"> Actions </th> </tr> <thead> <tbody> <tr style="border: 1px solid black;" align="center" height="100%" id="template"> <td style="border: 1px solid black;"> MPD template </td> <td id="VideoPlayer0" height="100%" style="border: 1px solid black; margin:2; padding:2" width="250px"> <div id="Video0" class="ClassVideo0" style="display: block; width:250px; height:200px; margin:5px;padding:5px;visibility:visible;"> <!-- <video style="width: 90%" controls></video> --> </div> <div id="MPDUrl0" style="margin:2; padding:2" height="100%" ></div> <div style="margin:2px; padding:2px"> <div id="play0" ></div><div id="pause0" ></div><div id="seek0" ></div><div id="stall0" ></div><div id="error0"></div> </div> </td> <td style="border: 1px solid black;"> <div> <input type="button" class="btn-large" value="Run Test" style="width: 70px;" id="RunTest0" onclick="runTest(this.id)"/> </div> </br> <div> <input type="button" class="btn-large" value="Delete" style="width: 70px;" id="Delete0" onclick="deleteRow(this.id)"/> </div> </td> </tr> </tbody> <table> </br> </br> </div> </center> </div> </center> </body> </html>
8,368
54.059211
758
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/test/helpers/style.css
/* The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license. // // Copyright (c) 2013, Microsoft Open Technologies, Inc. // // All rights reserved. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. // - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. // - Neither the name of the Microsoft Open Technologies, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ body { } #divHeader { font-family: "CAMBRIA"; font-size: 35px; background: #fff; text-align: center; margin-left: 100px; } #divBody { font-family: "Verdana"; font-size: 12px; background: #fff; margin-top:10px; margin-left:5px; text-align: left; } #divCenter { -moz-box-shadow: 0 0 5px #C7C7C7; -webkit-box-shadow: 0 0 5px #C7C7C7; } #txtfileUploader { font-family: "Verdana"; font-size: 12px; background: #fff; margin-top:10px; margin-left:5px; text-align: left; color: #D3D3D3 } #MPDUrl { font-family: "Verdana"; font-size: 12px; background: #fff; } #lbTestMode { font-family: "Verdana"; font-size: 14px; background: #fff; margin-top:40px; text-align: left; } #addMPDURL { font-family: "Verdana"; font-size: 14px; background: #fff; margin-top:40px; text-align: left; } #divtable { overflow-y:scroll; height:500px; } #tbMPD { font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; font-size: 12px; width: 350px; text-align: left; border:1px solid grey; } #tbMPD th { font-size: 14px; font-weight: bold; padding: 10px 8px; color: white; background: #5D8AA8; } #tbMPD td { padding: 10px; font-size: 12px; font-weight: bold; color: black; } #tbMPD .odd { background: #C7C7C7; } #popup_box { display:none; /* Hide the DIV */ position:fixed; _position:absolute; /* hack for internet explorer 6 */ height:200px; width:600px; background:#ffffff; left: 375px; top: 200px; z-index:50; margin-left: 15px; /* additional features, can be omitted */ border:2px solid #C7C7C7; padding:15px; font-size:15px; -moz-box-shadow: 0 0 5px #C7C7C7; -webkit-box-shadow: 0 0 5px #C7C7C7; box-shadow: 0 0 5px #C7C7C7; } #container { background: #d2d2d2; /*Sample*/ width:100%; height:100%; } a{ cursor: pointer; text-decoration:none; } /* This is for the positioning of the Close Link */ #popupBoxClose { font-size:20px; line-height:15px; right:5px; top:5px; position:absolute; color:#ff0000; font-weight:500; }
4,023
24.794872
758
css
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/docs/migration/Migration-2.0.md
# Dash.js Migration Document 1.x --> 2.0 In this document we will cover the major changes to consider when migrating your player from Dash.js version 1.x to 2.0. Here are some high level points: * We have refactored the entire code base from ECMAScript 5 to ECMAScript 6. * We have changed the namespace. * We have changed how you create MediaPlayer. * We have added events and public API to the MediaPlayer module * We have deprecated some of the API calls. * We have externalized some functionality into optional "plugins" * We have changed how you extend Dash.js * We have added experimental BOLA ABR. * We have changed the build and distribution process. ## The Refactor Project The project was started over three years ago when the MSE/EME API was new. It has come a long way due to the hard work of many contributors. It grew to a point where it was becoming hard to understand and maintain. So we decided to refactor! First, we wanted to convert the entire codebase to ES6 Modules/Classes and remove the DI framework and multiple event systems. This way, optimizing and simplifying the code would be easier. Then we wanted to rework much of the logic. We did manage to rework and simplify some stuff but we did not manage to get to all of what is needed. There is still a lot of code snarl and we plan on refactoring this over time. There is still a lot of ES5 code that needs to be converted. Please feel free to file an issue on github highlighting areas in need of refactoring or optimizing! Even better, submit a PR! ```We are currently and always looking for contributors! ``` ## New Dash.js Modules *In v2.0 all modules can be accessed under the namespace **dashjs*** ``` js * dashjs.MediaPlayer * dashjs.MediaPlayerFactory * dashjs.Protection (Optional Auto Detected Plugin) * dashjs.MetricsReporting (Optional Auto Detected Plugin) ``` ## MediaPlayer Creation *Example of how you create a MediaPlayer in v2.0.* ``` var url = "http://dash.edgesuite.net/envivio/Envivio-dash2/manifest.mpd"; var element = document.querySelector("#selector") var player = dashjs.MediaPlayer().create(); player.initialize(element, url, true); ``` ##### MediaPlayerFactory We have also moved the code from Dash.create() and createAll() to MediaPlayerFactory. This is an alternative way to build a Dash.js player in your web page. The MediaPlayerFactory will automatically instantiate and initialize the MediaPlayer module on appropriately tagged video elements. ## New Public API We have cloned most of the native video element's API and events in MediaPlayer. In your player we suggest that you use the available playback API and events from MediaPlayer instead of the native video element. The video element controls are limited and can not handle such features as live streams with DVR windows or Multiple Period content. In Dash.js 1.x we had only partially implemented the video element's playback API in MediaPlayer. Now in v2.0, we now have added most the calls and events. We can add more as requested or needed. **Note** If something is not available it means it has not been extended. In this case, feel free to use the native element's API. Please check the API Documentation for a complete set of API calls and events [here](http://cdn.dashjs.org/latest/jsdoc/index.html). * extend * pause * play * isPaused * isSeeking * setMute * isMuted * setVolume * getVolume * getBufferLength * setMaxAllowedRepresentationRatioFor * getMaxAllowedRepresentationRatioFor * getLimitBitrateByPortal * setLimitBitrateByPortal * setInitialRepresentationRatioFor * getInitialRepresentationRatioFor * getAutoSwitchQualityFor * setAutoSwitchQualityFor * enableBufferOccupancyABR * setBandwidthSafetyFactor * getBandwidthSafetyFactor * setAbandonLoadTimeout * setBufferToKeep * setBufferPruningInterval * setStableBufferTime * setBufferTimeAtTopQuality * setFragmentLoaderRetryAttempts * setFragmentLoaderRetryInterval * setBufferTimeAtTopQualityLongForm * setLongFormContentDurationThreshold * setRichBufferThreshold ## New Events and EventBus All public event types are now stored in MediaPlayerEvents.js and attached to dashjs.MediaPlayer.events for access. See the Plugin section below for more info on Plugin events and how they are arrogated into MediaPlayer.events for access in your player. Please see ``` MediaPlayerEvents & ProtectionEvents``` ## Deprecated, Replaced, or Changed! **Deprecated** ``` js getAutoSwitchQuality use getAutoSwitchQualityFor setAutoSwitchQuality use setAutoSwitchQualityFor ``` **Replaced** ``` js startup replaced by initialize getMetricsExt replaced by getDashMetrics addEventListener replaced by on removeEventListener replaced by off Dash.create() replaced by MediaPlayerFactory.create() Dash.createAll() replaced by MediaPlayerFactory.createAll() ``` **Changed** ``` js setProtectionData - In v1.x setting protection data was an argument of attachSource. ``` ## Plugin Modules *We are trying to address the overall size of dash.all.min.js. This is a "work in-progress". We expect to pull out more features in the future. At this point we offer two external modules both with min an debug files as well as source maps:* In v2.0 you can now load just the MediaPlayer ```dash.mediaplayer.min.js``` and add additional modules if desired. There is no need to tell dash.js about the plugin! Just include any or all of the following scripts and Dash.js will auto detect and instantiate each plugin. Events for plugins will be in the plugin package. Any event in the class marked with ```public_``` will be arrogated into the MediaPlayerEvents object at load and will be accessible via MediaPlayer.events **Protection** ```@dashjs.Protection``` ``` js dash.protection.min.js (dash.protection.debug.js) ``` **MetricsReporting** ```@dashjs.MetricsReporting``` ``` js dash.reporting.min.js (dash.reporting.debug.js) ``` ## Extending Dash.js In v1.x of Dash.js you could replace internal objects with a custom context. We have maintained that capability but have also added a new way to extend Dash.js. We plan on adding more capabilities to extending in the future. There is a new method in MediaPlayer named ```extend()``` There are two ways to extend dash.js, determined by the override argument of this method: 1. If you set override to true any public method in your custom object will override the "same named" dash.js parent object method. 2. If you set override to false your object will completely replace the dash.js object. (Note: This is how it was in 1.x of Dash.js with Dijon). **When you extend you get access to this.context, this.factory and this.parent in your object. This will gain you access to dash.js internal singletons and parent object** * ```this.context``` - Used to pass context for singleton access. * ```this.factory``` - Used to call factory.getSingletonInstance() * ```this.parent``` - A reference to the parent object. *(this.parent is excluded if you extend with override set to false)*. **You must not instantiate or call the object beforehand. Dash.js will create the object.** ``` js player.extend("RequestModifier", SuperRequestModifier, false | true); ``` In 2.1 we plan to add more functionality [Github Issue #1162](https://github.com/Dash-Industry-Forum/dash.js/issues/1162) ## BOLA We introduced an experimental implementation of [BOLA](http://arxiv.org/abs/1601.06748), a new ABR algorithm. Rather than predicting throughput, BOLA does ABR based on buffer occupancy. It is still under development and is not switched on by default. [See WIKI](https://github.com/Dash-Industry-Forum/dash.js/wiki/BOLA-status) *You can enable BOLA by calling ```enableBufferOccupancyABR(true | false)``` in MediaPlayer before playback begins.* ## Build and Distribution ##### Grunt, Babel, Browserify.... As mentioned above, we now transpile and prepare the code for present day browsers. This means we have a compile step. Thus, there are a few more grunt tasks in v2.0's GruntFile.js. The main task names to keep in mind are: * ```grunt debug``` (quickest build) * ```grunt dist``` (builds all) * ```grunt``` (should be run before a commit) *See the GruntFile.js for all the available tasks.* ##### Distributed File Names * We deploy all the dist files to cdn.dashjs.org/<VERSION>/<FILE>.js. * ```http://``` and ```https://``` are both available. * We generate source maps for all the files below. ###### Minified * dash.all.min.js * dash.mediaplayer.min.js * dash.protection.min.js * dash.reporting.min.js ###### Debug * dash.all.debug.js * dash.mediaplayer.debug.js * dash.protection.debug.js * dash.reporting.debug.js ``` Authored by Dan Sparacio - February 12th 2016```
8,701
49.888889
851
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/README.md
NDN-JS: A javascript client library for Named Data Networking -------------------------------------------------------------- NDN-JS is the first native version of the NDN protocol written in JavaScript. It implements the NDN-TLV wire format. The project by the UCLA NDN team - for more information on NDN, see http://named-data.net/ http://ndn.ucla.edu/ See the file [INSTALL](https://github.com/named-data/ndn-js/blob/master/INSTALL) for build and install instructions. License ------- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. A copy of the GNU Lesser General Public License is in the file COPYING. Overview -------- This is a young project, with minimal documentation that we are slowly enhancing. Please submit any bugs or issues to the NDN-JS issue tracker: http://redmine.named-data.net/projects/ndn-js/issues The primary goal of NDN-JS is to provide a pure Javascript implementation of the NDN API that enables developers to create browser-based or Node.js-based applications using Named Data Networking. The approach requires no native code or signed Java applets, and thus can be delivered over the current web to modern browsers with no hassle for the end user. Additional goals for the project: - Websockets transport for the browser (rather than TCP or UDP, which are not directly supported in the browser). - Relatively lightweight and compact, to enable efficient use on the web. The library currently requires a remote NDN forwarder, and has been tested with NFD from the package https://github.com/named-data/NFD . Currently, the library has two APIs for developers: 1. The Javascript API for asynchronous Interest/Data exchange which follows the NDN Common Client Libraries API: http://named-data.net/doc/ndn-ccl-api/ . This API can be used from the browser or Node.js. The browser uses WebSockets for transport and currently requires a proxy for communication with a remote NDN forwarder. The Node.js API can use the Node.js native support for TCP or Unix sockets. 2. A Firefox plug-in, which implements an "ndn:/" url scheme following NDNx repository conventions for file retrieval. By default, both parts of the library connect automatically to a set of proxies and hubs that are part of the NDN research project's testbed. http://named-data.net/ndn-testbed/ There are currently no restrictions on non-commercial, research-oriented data exchange on this testbed. (Contact jburke@remap.ucla.edu for more details.) The developer can also specify a local or remote NDN forwarder as well, as an argument to the Face constructor. JAVASCRIPT API -------------- See files in js/ and examples in tests/, examples/ NDN-JS currently supports expressing Interests (and receiving data) and publishing Data (that answers Interests). This includes encoding and decoding data packets as well as signing and verifying them using RSA keys. ** NDN connectivity ** The only way (for now) to get connectivity to other NDN nodes is via and NDN forwarder. For the Javascript API in the browser, a Websockets proxy that can communicate the target NDN forwarder is currently required. NFD supports its own Websockets proxy. For other forwarders, code for such a proxy (using Node.js) is in the wsproxy directory. The Websocket currently listens on port 9696 and passes messages to the NDN forwarder on the same host. The Node.js API can use the Node.js native support for TCP (remote or local) or Unix sockets (to the local NDN forwarder). ** Including the scripts in a web page ** To use NDN-JS in a web page, one of two scripts must be included using a script tag: ndn.js is a combined library or ndn.min.js is a compressed version of the combined library which loads faster but doesn't show the original source for debugging. A web page script tag can load a [released version](https://github.com/named-data/ndn-js/releases) from RawGit. This URL loads version v0.10.0: - https://cdn.rawgit.com/named-data/ndn-js/v0.10.0/build/ndn.min.js For development, see INSTALL for instructions on how to build these files. Or the latest development snapshot can be downloaded from the `build` directory: - https://github.com/named-data/ndn-js/raw/master/build/ndn.js - https://github.com/named-data/ndn-js/raw/master/build/ndn.min.js ** Examples ** *** ndn-ping You can check out `examples/ndnping/ndn-ping.html` to see an example how to implement ndn-ping in NDN.js *** Example to retrieve content *** A simple example of the current API to express an Interest and receive data: var face = new Face(); // connect to a default hub/proxy function onData(interest, data) { console.log("Received " + data.getName().toUri()); } face.expressInterest(new Name("/ndn/edu/ucla/remap/ndn-js-test/hello.txt"), onData); ** Example to publish content ** // Note that publishing content requires knowledge of a // routable prefix for your upstream NDN forwarder. We are working // on a way to either obtain that prefix or use the /local // convention. For now, see examples/browser/test-publish-async.html FIREFOX ADD-ON FOR THE NDN PROTOCOL ----------------------------------- See files in ndn-protocol/ NDN-JS includes a Firefox extension for the ndn protocol built using the Javascript library. It currently obtains NDN connectivity through the NDN testbed, but you can click Set on the NDN Toolbar to change the connected hub. To install, either download https://github.com/named-data/ndn-js/raw/master/ndn-protocol.xpi or use ndn-protocol.xpi in the distribution. In Firefox, open Tools > Add-ons. In the "gear" or "wrench" menu, click Install Add-on From File and open ndn-protocol.xpi. (In Firefox for Android, type file: in the address bar and click the downloaded ndn-protocol.xpi.) Restart Firefox. Firefox uses the protocol extension to load any URI starting with ndn. See this test page for examples: ndn:/ndn/edu/ucla/remap/demo/ndn-js-test/NDN-Protocol-Examples.html?ndn.ChildSelector=1 When the page is loaded, Firefox updates the address bar with the full matched name from the retrieved content object including the version, but without the implicit digest or segment number (see below). * Interest selectors in the ndn protocol: You can add interest selectors. For example, this uses 1 to select the "rightmost" child (latest version): ndn:/ndn/edu/ucla/remap/ndn-js-test/howdy.txt?my=query&ndn.ChildSelector=1&key=value#ref The browser loads the latest version and changes the address to: ndn:/ndn/edu/ucla/remap/ndn-js-test/howdy.txt/%FD%052%A1%EA_%89?my=query&key=value#ref The child selector was used and removed. Note that the other non-ndn query and ref "?key=value#ref" are still present, in case they are needed by the web application. The following selector keys are supported: ndn.MinSuffixComponent= non-negative int ndn.MaxSuffixComponents= non-negative int ndn.ChildSelector= non-negative int ndn.Scope= non-negative int ndn.InterestLifetime= non-negative int (milliseconds) ndn.PublisherPublicKeyDigest= % escaped value ndn.Nonce= % escaped value ndn.Exclude= comma-separated list of % escaped values or * for ANY * Multiple segments in the ndn protocol A URI for content with multiple segments is handled as follows. If the URI has a segment number, just retrieve that segment and return the content to the browser. Otherwise look at the name in the returned ContentObject. If the returned name has no segment number, just return the content to the browser. If the name has a segment number which isn't 0, store it and express an interest for segment 0. Also express an interest for the highest segment to try to determine the FinalBlockID early. Fetch multiple segments in order and return each content to the browser (in order) as the arrive until we get the segment for FinalBlockID.
8,400
43.449735
138
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/tools/micro-forwarder/make-ndn-micro-forwarder.sh
#!/bin/sh cp ../../build/ndn.js extension cd extension; zip -r ../ndn-micro-forwarder.xpi . ; cd ..
100
24.25
57
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/tools/micro-forwarder/extension/config.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"/> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <title>Micro Forwarder Configuration</title> <script type="text/javascript" src="ndn.js"></script> <script type="text/javascript" src="content.js"></script> <script type="text/javascript" src="config.js"></script> </head> <body> <form> Domain name of remote forwarder:<br /> <input id="uri" type="text" name="URI" size="50" value="memoria.ndn.ucla.edu" /> <br /> Prefix:<br /> <input id="prefix" type="text" name="PREFIX" size="50" value="/" /> </form> <button id="addRoute">Add Route</button><br/> <br/> <button id="showStatus">Show Status</button> <p id="showStatusResult"></p> </body> </html>
1,677
33.244898
78
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/tools/micro-forwarder/extension/popup/choose_option.css
# html, body { # width: 100px; # height: 100px; # } .options { margin: 3% auto; padding: 4px; text-align: center; font-size: 1.0em; # background-color: #E5F2F2; cursor: pointer; }
193
13.923077
29
css
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/tools/micro-forwarder/extension/popup/choose_option.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="choose_option.css"/> </head> <body style = "overflow:hidden;"> <div class = "options"> <button id="showConfig"> Config </button> </div> <script src="choose_option.js"></script> </body> </html>
327
15.4
53
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-throughput-http.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <meta charset="UTF-8"> <head> <title>HTTP Get via XHR</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function run() { var xhr = new XMLHttpRequest(); var url = document.getElementById('interest').value; xhr.open("GET", url, true); //xhr.responseType = "arraybuffer"; var T0 = new Date(); xhr.onload = function(e) { //var arraybuffer = xhr.response; // not responseText /* ... */ //document.getElementById('content').innerHTML += xhr.responseText; var T1 = new Date(); document.getElementById('content').innerHTML += "<p>Time elapsed: " + (T1 - T0) + " ms</p>"; document.getElementById('content').innerHTML += "<p>Buffer size: " + xhr.responseText.length + "</p>"; }; xhr.send(); } </script> </head> <body > <form> Please Enter an Interest:<br /> <input id="interest" type="text" name="INTEREST" size="50" value="marsgale_curiosity_1452.jpg" /> </form> <button onclick="run()">Fetch Content</button> <p id="content">Result: <br/></p> </body> </html>
2,265
34.968254
118
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-interest-matches-name.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Interest Matches Name</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function check(){ var interest = new Interest( new Name(document.getElementById('interest').value)); var nameToCheck = new Name(document.getElementById('nameToCheck').value); var output = (interest.matchesName(nameToCheck) ? "matches" : "doesn't match"); document.getElementById('result').innerHTML = output; } </script> </head> <body > <form> Please enter the name of an interest:<br /> <input id="interest" type="text" name="INTEREST" value="//domain.com/ndn/ucla.edu" /> <br/> Please enter a name to check if the interest matches the name:<br /> <input id="nameToCheck" type="text" name="NAME_TO_CHECK" value="/ndn/./ucla.edu/extra" /> <br/> </form> <button onclick="check()">Check</button> <p id="result"></p> </body> </html>
2,009
33.655172
103
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-get-async.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <meta charset="UTF-8"> <head> <title>NDN Get via WebSocket</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> var face = new Face({host: "localhost"}); //var face = new Face(); function onData(interest, data) { console.log("onData called."); console.log("Host: " + face.connectionInfo.toString()); nameStr = escape(data.getName().toUri()); document.getElementById('content').innerHTML += "<p>Name string: " + nameStr + "</p>"; document.getElementById('content').innerHTML += "<p>Content buffer length: " + data.getContent().size() + "</p>"; document.getElementById('content').innerHTML += EncodingUtils.dataToHtml(data); } function onTimeout(interest) { console.log("onTimeout called. Re-expressing the interest."); console.log("Host: " + face.connectionInfo.toString()); face.expressInterest(interest, onData, onTimeout); } function run() { face.expressInterest(new Name(document.getElementById('interest').value), onData, onTimeout); } </script> </head> <body > <form> Please Enter an Interest:<br /> <input id="interest" type="text" name="INTEREST" size="50" value="/" /> </form> <button id="testBtn" onclick="run()">Fetch Content</button> <p id="content">Content: <br/></p> </body> </html>
2,377
32.971429
119
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-websocket.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Test WebSocket Support</title> <script type="text/javascript"> function test(){ var output = ""; if ('WebSocket' in window) { output += "This browser support WebSocket."; } else { output += "No WebSocket support."; } document.getElementById('result').innerHTML += output; console.log("starting websocket..."); if ("WebSocket" in window) { var ws = new WebSocket("ws://localhost:9696"); ws.onopen = function() { console.log("WebSockets connection opened"); ws.send("Hello Server (from client)."); } ws.onmessage = function(e) { console.log("Got from server: " + e.data); } ws.onclose = function() { console.log("WebSockets connection closed"); } } else { alert("No WebSockets support"); } } </script> </head> <body > <button onclick="test()">Test Now!</button> <p id="result">Result here: </p> </body> </html>
2,211
31.057971
78
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-image-parsing.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Image Parsing</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function sign(){ var input = document.getElementById('contentname').value; var _PEM_PRIVATE_KEY_STRING_ = document.getElementById('privateKey').value; var rsa = new RSAKey(); rsa.readPrivateKeyFromPEMString(_PEM_PRIVATE_KEY_STRING_); var hSig = rsa.signString(input, "sha256"); document.getElementById('result').innerHTML = hSig; } function verify(){ var input = document.getElementById('contentname').value; var signature = document.getElementById('result').innerHTML; var _PEM_X509CERT_STRING_ = document.getElementById('certificate').value; var x509 = new X509(); x509.readCertPEM(_PEM_X509CERT_STRING_); var result = x509.subjectPublicKeyRSA.verifyString(input, signature); if(result) document.getElementById('result').innerHTML = 'SIGNATURE VALID'; else document.getElementById('result').innerHTML = 'SIGNATURE INVALID'; } </script> </head> <body > <form> <input id="privateKey" type="hidden" value="-----BEGIN RSA PRIVATE KEY----- MIICWwIBAAKBgQDRhGF7X4A0ZVlEg594WmODVVUIiiPQs04aLmvfg8SborHss5gQ Xu0aIdUT6nb5rTh5hD2yfpF2WIW6M8z0WxRhwicgXwi80H1aLPf6lEPPLvN29EhQ NjBpkFkAJUbS8uuhJEeKw0cE49g80eBBF4BCqSL6PFQbP9/rByxdxEoAIQIDAQAB AoGAA9/q3Zk6ib2GFRpKDLO/O2KMnAfR+b4XJ6zMGeoZ7Lbpi3MW0Nawk9ckVaX0 ZVGqxbSIX5Cvp/yjHHpww+QbUFrw/gCjLiiYjM9E8C3uAF5AKJ0r4GBPl4u8K4bp bXeSxSB60/wPQFiQAJVcA5xhZVzqNuF3EjuKdHsw+dk+dPECQQDubX/lVGFgD/xY uchz56Yc7VHX+58BUkNSewSzwJRbcueqknXRWwj97SXqpnYfKqZq78dnEF10SWsr /NMKi+7XAkEA4PVqDv/OZAbWr4syXZNv/Mpl4r5suzYMMUD9U8B2JIRnrhmGZPzL x23N9J4hEJ+Xh8tSKVc80jOkrvGlSv+BxwJAaTOtjA3YTV+gU7Hdza53sCnSw/8F YLrgc6NOJtYhX9xqdevbyn1lkU0zPr8mPYg/F84m6MXixm2iuSz8HZoyzwJARi2p aYZ5/5B2lwroqnKdZBJMGKFpUDn7Mb5hiSgocxnvMkv6NjT66Xsi3iYakJII9q8C Ma1qZvT/cigmdbAh7wJAQNXyoizuGEltiSaBXx4H29EdXNYWDJ9SS5f070BRbAIl dqRh3rcNvpY6BKJqFapda1DjdcncZECMizT/GMrc1w== -----END RSA PRIVATE KEY-----"></input> <input id="certificate" type="hidden" value="-----BEGIN CERTIFICATE----- MIIBvTCCASYCCQD55fNzc0WF7TANBgkqhkiG9w0BAQUFADAjMQswCQYDVQQGEwJK UDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwHhcNMTAwNTI4MDIwODUxWhcNMjAwNTI1 MDIwODUxWjAjMQswCQYDVQQGEwJKUDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwgZ8w DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANGEYXtfgDRlWUSDn3haY4NVVQiKI9Cz Thoua9+DxJuiseyzmBBe7Roh1RPqdvmtOHmEPbJ+kXZYhbozzPRbFGHCJyBfCLzQ fVos9/qUQ88u83b0SFA2MGmQWQAlRtLy66EkR4rDRwTj2DzR4EEXgEKpIvo8VBs/ 3+sHLF3ESgAhAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAEZ6mXFFq3AzfaqWHmCy1 ARjlauYAa8ZmUFnLm0emg9dkVBJ63aEqARhtok6bDQDzSJxiLpCEF6G4b/Nv/M/M LyhP+OoOTmETMegAVQMq71choVJyOFE5BtQa6M/lCHEOya5QUfoRF2HF9EjRF44K 3OK+u3ivTSj3zwjtpudY5Xo= -----END CERTIFICATE-----"></input> Please Enter a Text to sign:<br /><input id="contentname" type="text" name="CONTENTNAME" value="/ndn/abc" /> <br /> </form> <button onclick="sign()">Encode</button> <button onclick="verify()">Parse</button> <script type="text/javascript"> var srcString = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=='; var link = document.createElement('img'); link.setAttribute('src', srcString); document.body.appendChild(link); </script> <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0 vr4MkhoXe0rZigAAAABJRU5ErkJggg==" alt="Red dot" /> <p id="result"></p> </body> </html>
5,482
41.176923
381
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-sha256.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Test SHA-256</title> <script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/sha256.js"></script> <script type="text/javascript"> // Save a pointer to the downloaded reference CryptoJS, then set it null so ndn.js can define it again. var referenceCryptoJS = CryptoJS; CryptoJS = null; </script> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function hash(){ var input = document.getElementById('contentname').value; var sha256 = exports.createHash('sha256') var data = DataUtils.toNumbersFromString(input); // Call update multiple times in small chunks to test the buffering. var chunkSize = 3; var nCalls = Math.floor(data / chunkSize); for (var i = 0; i < nCalls; ++i) sha256.update(data.slice(i * chunkSize, chunkSize)); sha256.update(data.slice(i * nCalls, data.length)); var output = "from bytes-- " + DataUtils.toHex(sha256.digest()) + "<br/>"; output += "reference---- " + referenceCryptoJS.SHA256(input); document.getElementById('result').innerHTML = output; } </script> </head> <body > <form> Please Enter Text to Hash:<br /><input id="contentname" type="text" name="CONTENTNAME" value="/ndn/abc" /> <br /> </form> <button onclick="hash()">Hash</button> <p id="result"></p> </body> </html>
2,435
35.909091
121
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-sign-verify-data-hmac.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Sign/Verify a Data Packet with HMAC</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> var TlvData = new Blob(new Buffer([ 0x06, 0x49, // NDN Data 0x07, 0x0a, // Name 0x08, 0x03, 0x6e, 0x64, 0x6e, // "ndn" 0x08, 0x03, 0x61, 0x62, 0x63, // "abc" 0x14, 0x00, // MetaInfo 0x15, 0x08, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x21, // Content = "SUCCESS!" 0x16, 0x0d, // SignatureInfo 0x1b, 0x01, 0x04, // SignatureType = SignatureHmacWithSha256 0x1c, 0x08, // KeyLocator 0x07, 0x06, // Name 0x08, 0x04, 0x6b, 0x65, 0x79, 0x31, // "key1" 0x17, 0x20, // SignatureValue 0x19, 0x86, 0x8e, 0x71, 0x83, 0x99, 0x8d, 0xf3, 0x73, 0x33, 0x2f, 0x3d, 0xd1, 0xc9, 0xc9, 0x50, 0xfc, 0x29, 0xd7, 0x34, 0xc0, 0x79, 0x77, 0x79, 0x1d, 0x83, 0x96, 0xfa, 0x3b, 0x91, 0xfd, 0x36 ]), false); // Use a hard-wired secret for testing. In a real application the signer // ensures that the verifier knows the shared key and its keyName. var HmacKey = new Blob(new Buffer([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ]), false); function encode() { var name = new Name(document.getElementById('contentname').value); var content = document.getElementById('content').value; var freshData = new Data(name); var signature = new HmacWithSha256Signature(); signature.getKeyLocator().setType(KeyLocatorType.KEYNAME); signature.getKeyLocator().setKeyName(new Name("key1")); freshData.setSignature(signature); freshData.setContent(content); KeyChain.signWithHmacWithSha256(freshData, HmacKey); var output = EncodingUtils.encodeToHexData(freshData); document.getElementById('result').innerHTML = output; } function decode() { var input = document.getElementById('result').innerHTML.toUpperCase(); var data = EncodingUtils.decodeHexData(input); var output = EncodingUtils.dataToHtml(data); // Verify with the same KeyChain used to sign. Set the document // element inside the callback so that it receives the result. if (KeyChain.verifyDataWithHmacWithSha256(data, HmacKey)) output += "<br/>Freshly-signed data signature verification: VERIFIED<br/>"; else output += "<br/>Freshly-signed data signature verification: FAILED<br/>"; document.getElementById('result').innerHTML = output; } </script> </head> <body > <form> Please enter a Data packet name:<br /> <input id="contentname" type="text" name="CONTENTNAME" value="/ndn/abc" /> <br />Please enter the content:<br /> <textarea id="content" cols="40" rows="5" name="CONTENT" value="SUCCESS" >SUCCESS!</textarea> </form> <button onclick="encode()">Encode</button> <button onclick="decode()">Decode</button> <p id="result"></p> </body> </html>
3,914
35.933962
100
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-throughput-ws-pipeline.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <meta charset="UTF-8"> <head> <title>NDN Get File via WebSocket</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> hostip = "localhost"; var face = new Face({port:9696,host:hostip}); /////////////////////////////////////////////////////////////////////////////////////////////////////////// /* * Context for calling expressInterest to fetch big file. */ var ContentContext = function ContentContext(face, T0) { this.T0 = T0; // start time this.face = face; this.totalBlocks = 0; // total # of segments delivered to usr; // TODO: in this test script we simply discard the content after it is received // should consider some way to buffer the whole data in future refactor --- SWT // We should always start with the first element so the first data packet object cannot be ooo data //this.firstReceivedSegmentNumber = null; //this.firstReceivedData = null; // statistic counters this.ooo_count = 0; // out-of-order data packet object counter; // when this counter reaches 3, apply fast retransmission alg. this.pkt_recved = 0; // total # of data packet object received this.timed_out = 0; // totle # of timed out interest this.interest_sent = 1; // there is an initial interest before calling the callback this.dups = 0; // total # of dup content segments this.max_window = 32; // max window size this.max_retrans = 5; // max # of trial before give up; if we fail on one segment, the entire process is aborted this.snd_una = 0; // pointer to unacked segments this.snd_wnd = 1; // current window size this.snd_nxt = 1; // pointer to next interest to be sent this.ooo_table_size = 128; this.ooo_table = []; // hash table to mark ooo segments this.terminated = false; // Set this flag after we receive all the segments; }; ContentContext.prototype.expressInterest = function(name) { var thisContext = this; this.face.expressInterest (name, function(interest, data) { thisContext.onData(interest, data); }, function(interest) { thisContext.onTimeout(interest); }); }; ContentContext.prototype.onTimeout = function(interest) { this.pkt_recved++; if (this.terminated == false) { this.timed_out++; // Reduce window size to 1 this.snd_wnd = 1; // Retransmit interest for this segment this.expressInterest(interest.getName()); //console.log("Resend interest sent for " + interest.getName().toUri()); document.getElementById('content').innerHTML += "<p>Resend interest sent for " + interest.getName().toUri() + "</p>"; this.interest_sent++; document.getElementById('content').innerHTML += "<p>Interest " + interest.getName().toUri() + " time out.</p>"; document.getElementById('content').innerHTML += "<p>Total number of blocks: " + this.totalBlocks + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of packets: " + this.pkt_recved + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of dup segments: " + this.dups + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of interest sent: " + this.interest_sent + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of time-out interest: " + this.timed_out + "</p>"; document.getElementById('content').innerHTML += "<p>SND_UNA: " + this.snd_una + "</p>"; document.getElementById('content').innerHTML += "<p>SND_WND: " + this.snd_wnd + "</p>"; document.getElementById('content').innerHTML += "<p>SND_NXT: " + this.snd_nxt + "</p>"; } }; ContentContext.prototype.onData = function(interest, data) { this.pkt_recved++; if (data.getContent().isNull()) { console.log("data content is null"); return; } // Use the segmentNumber to load multiple segments. var segmentNumber = data.getName().get(-1).toSegment(); // Process received data here... // Count content length //nameStr = escape(data.getName().toUri()); //document.getElementById('content').innerHTML += "<p>Name string: " + nameStr + "</p>"; //document.getElementById('content').innerHTML += "<p>Content buffer length: " + data.getContent().size() + "</p>"; /* // Check for the special case if the saved content is for the next segment that we need. if (this.firstReceivedData != null && this.firstReceivedSegmentNumber == segmentNumber + 1) { // Substitute the saved data send its content and keep going. data = this.firstReceivedData; segmentNumber = segmentNumber + 1; // Clear firstReceivedData to save memory. this.firstReceivedData = null; // Process received data here... // Count content length //nameStr = escape(data.getName().toUri()); //document.getElementById('content').innerHTML += "<p>Name string: " + nameStr + "</p>"; //document.getElementById('content').innerHTML += "<p>Content buffer length: " + data.getContent().size() + "</p>"; this.totalBlocks++; } */ // Record final seg# if present var finalSegmentNumber = null; if (data.getMetaInfo() != null && data.getMetaInfo().getFinalBlockId().getValue().size() > 0) finalSegmentNumber = data.getMetaInfo().getFinalBlockId().toSegment(); // Check for out-of-order segment if (segmentNumber != this.snd_una) { //console.log("Out-of-order segment #" + segmentNumber + " received."); document.getElementById('content').innerHTML += "<p>Out-of-order segment #" + segmentNumber + " received.</p>"; this.ooo_count++; if (segmentNumber >= this.snd_nxt || segmentNumber < this.snd_una) { // Discard segment that is out of window //console.log("Out-of-window segment #" + segmentNumber); document.getElementById('content').innerHTML += "<p>Out-of-window segment #" + segmentNumber + "</p>"; return; } // Mark this segment in hash table var slot = segmentNumber % this.ooo_table_size; this.ooo_table[slot] = segmentNumber; if (this.ooo_count == 3) { // Fast retransmit // TODO: expressInterest for seg# = this.snd_una //this.snd_wnd = Math.floor(this.snd_wnd / 2) + 3; } else if (this.ooo_count > 3) { //this.snd_wnd++; // TODO: send a new interest if allowed by snd_wnd // SWT: what if we never receive the first unacked segment??? } return; } // In-order segment; slide window forward this.snd_una++ this.totalBlocks++; var slot = this.snd_una % this.ooo_table_size; while (this.ooo_table[slot] != undefined) { // continue to move forward until we reach a hole in the seg# sequence this.ooo_table[slot] = undefined; this.snd_una++; this.totalBlocks++; slot = this.snd_una % this.ooo_table_size; } if (finalSegmentNumber != null && this.snd_una == finalSegmentNumber + 1) { // All blocks before final block, including final block, is received. Mission complete. // Record stop time and print statistic result this.terminated = true; var T1 = new Date(); document.getElementById('content').innerHTML += "<p>Final block received.</p>"; document.getElementById('content').innerHTML += "<p>Time elapsed: " + (T1 - this.T0) + " ms</p>"; document.getElementById('content').innerHTML += "<p>Total number of blocks: " + this.totalBlocks + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of packets: " + this.pkt_recved + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of dup segments: " + this.dups + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of interest sent: " + this.interest_sent + "</p>"; document.getElementById('content').innerHTML += "<p>Total number of time-out interest: " + this.timed_out + "</p>"; document.getElementById('content').innerHTML += "<p>SND_UNA: " + this.snd_una + "</p>"; document.getElementById('content').innerHTML += "<p>SND_WND: " + this.snd_wnd + "</p>"; document.getElementById('content').innerHTML += "<p>SND_NXT: " + this.snd_nxt + "</p>"; return; } // Adjust window size if (this.snd_wnd < this.max_window) { this.snd_wnd++; //console.log("Window size after adjust: " + this.snd_wnd); } // Send the next interest if allowed by snd_wnd var nextNameComponents = data.getName().components.slice(0, data.getName().size() - 1); //console.log("SND_UNA: " + this.snd_una); //console.log("SND_NXT: " + this.snd_nxt); while (this.snd_nxt - this.snd_una < this.snd_wnd) { // Make a name for the next segment and get it. var segmentNumberPlus1 = DataUtils.nonNegativeIntToBigEndian(this.snd_nxt); // Put a 0 byte in front. var nextSegmentNumber = new Uint8Array(segmentNumberPlus1.length + 1); nextSegmentNumber.set(segmentNumberPlus1, 1); nextNameComponents.push(nextSegmentNumber); var nextName = new Name(nextNameComponents); this.expressInterest(nextName); //console.log("Interest sent for seg # " + this.snd_nxt + " name " + nextName.toUri()); this.interest_sent++; this.snd_nxt++; nextNameComponents.pop(); // Remove segment number from components } }; /* * Convert the big endian Uint8Array to an unsigned int. * Don't check for overflow. */ function ArrayToNum(bytes) { var result = 0; for (var i = 0; i < bytes.length; ++i) { result = result * 10; result += (bytes[i] - 48); } return result; } /* * Convert the int value to a new big endian Uint8Array and return. * If value is 0 or negative, return Uint8Array(0). */ function NumToArray(value) { value = Math.round(value); if (value <= 0) return new Uint8Array(0); numString = value.toString(); var size = numString.length; var result = new Uint8Array(size); for (i = 0; i < size; i++) { result[i] = numString.charCodeAt(i); } return result; } function run() { document.getElementById('content').innerHTML += "<p>Started...</p>"; var name = new Name(document.getElementById('interest').value); var context = new ContentContext(face, new Date()); context.expressInterest(name); } </script> </head> <body > <form> Please Enter an Interest:<br /> <input id="interest" type="text" name="INTEREST" size="50" value="/wentao.shang/mars.jpg/%00" /> </form> <button onclick="run()">Fetch Content</button> <p id="content">Result: <br/></p> </body> </html>
12,462
41.975862
125
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-encode-decode-data.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Encode/Decode Data Packet</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> DEFAULT_RSA_PUBLIC_KEY_DER = new Buffer([ 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb8, 0x09, 0xa7, 0x59, 0x82, 0x84, 0xec, 0x4f, 0x06, 0xfa, 0x1c, 0xb2, 0xe1, 0x38, 0x93, 0x53, 0xbb, 0x7d, 0xd4, 0xac, 0x88, 0x1a, 0xf8, 0x25, 0x11, 0xe4, 0xfa, 0x1d, 0x61, 0x24, 0x5b, 0x82, 0xca, 0xcd, 0x72, 0xce, 0xdb, 0x66, 0xb5, 0x8d, 0x54, 0xbd, 0xfb, 0x23, 0xfd, 0xe8, 0x8e, 0xaf, 0xa7, 0xb3, 0x79, 0xbe, 0x94, 0xb5, 0xb7, 0xba, 0x17, 0xb6, 0x05, 0xae, 0xce, 0x43, 0xbe, 0x3b, 0xce, 0x6e, 0xea, 0x07, 0xdb, 0xbf, 0x0a, 0x7e, 0xeb, 0xbc, 0xc9, 0x7b, 0x62, 0x3c, 0xf5, 0xe1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c, 0x55, 0xbb, 0x43, 0xca, 0xc7, 0x5a, 0x01, 0x02, 0x81, 0x81, 0x00, 0xab, 0xf4, 0xd5, 0xcf, 0x78, 0x88, 0x82, 0xc2, 0xdd, 0xbc, 0x25, 0xe6, 0xa2, 0xc1, 0xd2, 0x33, 0xdc, 0xef, 0x0a, 0x97, 0x2b, 0xdc, 0x59, 0x6a, 0x86, 0x61, 0x4e, 0xa6, 0xc7, 0x95, 0x99, 0xa6, 0xa6, 0x55, 0x6c, 0x5a, 0x8e, 0x72, 0x25, 0x63, 0xac, 0x52, 0xb9, 0x10, 0x69, 0x83, 0x99, 0xd3, 0x51, 0x6c, 0x1a, 0xb3, 0x83, 0x6a, 0xff, 0x50, 0x58, 0xb7, 0x28, 0x97, 0x13, 0xe2, 0xba, 0x94, 0x5b, 0x89, 0xb4, 0xea, 0xba, 0x31, 0xcd, 0x78, 0xe4, 0x4a, 0x00, 0x36, 0x42, 0x00, 0x62, 0x41, 0xc6, 0x47, 0x46, 0x37, 0xea, 0x6d, 0x50, 0xb4, 0x66, 0x8f, 0x55, 0x0c, 0xc8, 0x99, 0x91, 0xd5, 0xec, 0xd2, 0x40, 0x1c, 0x24, 0x7d, 0x3a, 0xff, 0x74, 0xfa, 0x32, 0x24, 0xe0, 0x11, 0x2b, 0x71, 0xad, 0x7e, 0x14, 0xa0, 0x77, 0x21, 0x68, 0x4f, 0xcc, 0xb6, 0x1b, 0xe8, 0x00, 0x49, 0x13, 0x21, 0x02, 0x81, 0x81, 0x00, 0xb6, 0x18, 0x73, 0x59, 0x2c, 0x4f, 0x92, 0xac, 0xa2, 0x2e, 0x5f, 0xb6, 0xbe, 0x78, 0x5d, 0x47, 0x71, 0x04, 0x92, 0xf0, 0xd7, 0xe8, 0xc5, 0x7a, 0x84, 0x6b, 0xb8, 0xb4, 0x30, 0x1f, 0xd8, 0x0d, 0x58, 0xd0, 0x64, 0x80, 0xa7, 0x21, 0x1a, 0x48, 0x00, 0x37, 0xd6, 0x19, 0x71, 0xbb, 0x91, 0x20, 0x9d, 0xe2, 0xc3, 0xec, 0xdb, 0x36, 0x1c, 0xca, 0x48, 0x7d, 0x03, 0x32, 0x74, 0x1e, 0x65, 0x73, 0x02, 0x90, 0x73, 0xd8, 0x3f, 0xb5, 0x52, 0x35, 0x79, 0x1c, 0xee, 0x93, 0xa3, 0x32, 0x8b, 0xed, 0x89, 0x98, 0xf1, 0x0c, 0xd8, 0x12, 0xf2, 0x89, 0x7f, 0x32, 0x23, 0xec, 0x67, 0x66, 0x52, 0x83, 0x89, 0x99, 0x5e, 0x42, 0x2b, 0x42, 0x4b, 0x84, 0x50, 0x1b, 0x3e, 0x47, 0x6d, 0x74, 0xfb, 0xd1, 0xa6, 0x10, 0x20, 0x6c, 0x6e, 0xbe, 0x44, 0x3f, 0xb9, 0xfe, 0xbc, 0x8d, 0xda, 0xcb, 0xea, 0x8f ]); var keyChain; function encode(){ var identityStorage = new MemoryIdentityStorage(); var privateKeyStorage = new MemoryPrivateKeyStorage(); keyChain = new KeyChain (new IdentityManager(identityStorage, privateKeyStorage), new SelfVerifyPolicyManager(identityStorage)); // Initialize the storage. var keyName = new Name("/testname/DSK-123"); var certificateName = keyName.getSubName(0, keyName.size() - 1).append ("KEY").append(keyName.get(-1)).append("ID-CERT").append("0"); identityStorage.addKey(keyName, KeyType.RSA, new Blob(DEFAULT_RSA_PUBLIC_KEY_DER, false)); privateKeyStorage.setKeyPairForKeyName (keyName, KeyType.RSA, DEFAULT_RSA_PUBLIC_KEY_DER, DEFAULT_RSA_PRIVATE_KEY_DER); var contentname = new Name( document.getElementById('contentname').value ); var content = document.getElementById('content').value; var data = new Data(contentname); data.getMetaInfo().setFreshnessPeriod(5000); data.getMetaInfo().setFinalBlockId(new Name("/%00%09").get(0)); data.setContent(content); keyChain.sign(data, certificateName, function(signeddata){ var output = EncodingUtils.encodeToHexData(signeddata); document.getElementById('result').innerHTML = output; }); } function decode(){ var input = document.getElementById('result').innerHTML; input = input.toUpperCase(); var data = EncodingUtils.decodeHexData(input); if(LOG>3)console.log('DATA PACKET DECODED'); if(LOG>3)console.log(data); var output = EncodingUtils.dataToHtml(data); // Verify with the same KeyChain used to sign. Set the document // element inside the callback so that it receives the result. keyChain.verifyData (data, function() { output+= "<br/>SIGNATURE VALID<br/>"; document.getElementById('result').innerHTML = output; }, function() { output+= "<br/>SIGNATURE INVALID<br/>"; document.getElementById('result').innerHTML = output; }); } </script> </head> <body > <form> Please Enter a Content Name:<br /> <input id="contentname" type="text" name="CONTENTNAME" value="/ndn/abc" /> <br />Please Enter the Content:<br /> <textarea id="content" cols="40" rows="5" name="CONTENT" value="SUCCESS" >SUCCESS!</textarea> </form> <button onclick="encode()">Encode</button> <button onclick="decode()">Decode</button> <p id="result"></p> </body> </html>
13,408
61.078704
102
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-throughput-ws.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <meta charset="UTF-8"> <head> <title>NDN Get File via WebSocket</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> hostip = "localhost"; var face = new Face({port:9696,host:hostip,verify:false}); /////////////////////////////////////////////////////////////////////////////////////////////////////////// /* * Context for calling expressInterest to fetch a big file. */ var ContentContext = function ContentContext(face, T0) { this.T0 = T0; this.face = face; this.totalBlocks = 0; this.firstReceivedSegmentNumber = null; this.firstReceivedData = null; }; ContentContext.prototype.expressInterest = function(name) { var thisContext = this; this.face.expressInterest (name, function(interest, data) { thisContext.onData(interest, data); }, function(interest) { thisContext.onTimeout(interest); }); }; ContentContext.prototype.onTimeout = function(interest) { var T1 = new Date(); document.getElementById('content').innerHTML += "<p>Interest time out.</p>"; document.getElementById('content').innerHTML += "<p>Time elapsed: " + (T1 - this.T0) + " ms including 4s timeout</p>"; document.getElementById('content').innerHTML += "<p>Total number of blocks: " + this.totalBlocks + "</p>"; }; ContentContext.prototype.onData = function(interest, data) { if (data.getContent().isNull()) { console.log("data content is null"); return; } // Use the segmentNumber to load multiple segments. var segmentNumber = data.getName().get(-1).toSegment(); if (this.firstReceivedSegmentNumber == null) { // This is the first call. this.firstReceivedSegmentNumber = segmentNumber; if (segmentNumber != 0) { // Special case: Save this data packet object for later and request segment zero. this.firstReceivedData = data; var componentsForZero = data.getName().components.slice (0, data.getName().size() - 1); componentsForZero.push([0]); this.expressInterest(new Name(componentsForZero)); return; } } // Process received data here... // Count content length //nameStr = escape(data.getName().toUri()); this.totalBlocks++; // Check for the special case if the saved content is for the next segment that we need. if (this.firstReceivedData != null && this.firstReceivedSegmentNumber == segmentNumber + 1) { // Substitute the saved data send its content and keep going. data = this.firstReceivedData; segmentNumber = segmentNumber + 1; // Clear firstReceivedData to save memory. this.firstReceivedData = null; // Process received data here... // Count content length //nameStr = escape(data.getName().toUri()); //document.getElementById('content').innerHTML += "<p>Name string: " + nameStr + "</p>"; //document.getElementById('content').innerHTML += "<p>Content buffer length: " + data.getContent().size() + "</p>"; this.totalBlocks++; } var finalSegmentNumber = null; if (data.getMetaInfo() != null && data.getMetaInfo().getFinalBlockId().getValue().size() > 0) finalSegmentNumber = data.getMetaInfo().getFinalBlockId().toSegment(); if (finalSegmentNumber == null || segmentNumber != finalSegmentNumber) { // Make a name for the next segment and get it. //var segmentNumberPlus1 = NumToArray(segmentNumber + 1); // Make a name for the next segment and get it. var segmentNumberPlus1 = DataUtils.nonNegativeIntToBigEndian(segmentNumber + 1); // Put a 0 byte in front. var nextSegmentNumber = new Uint8Array(segmentNumberPlus1.length + 1); nextSegmentNumber.set(segmentNumberPlus1, 1); var components = data.getName().components.slice (0, data.getName().size() - 1); components.push(nextSegmentNumber); this.expressInterest(new Name(components)); } else { // Final block received. // Record stop time var T1 = new Date(); document.getElementById('content').innerHTML += "<p>Final block received.</p>"; document.getElementById('content').innerHTML += "<p>Time elapsed: " + (T1 - this.T0) + " ms</p>"; document.getElementById('content').innerHTML += "<p>Total number of blocks: " + this.totalBlocks + "</p>"; } }; /* * Convert the big endian Uint8Array to an unsigned int. * Don't check for overflow. */ function ArrayToNum(bytes) { var result = 0; for (var i = 0; i < bytes.length; ++i) { result = result * 10; result += (bytes[i] - 48); } return result; }; /* * Convert the int value to a new big endian Uint8Array and return. * If value is 0 or negative, return Uint8Array(0). */ function NumToArray(value) { value = Math.round(value); if (value <= 0) return new Uint8Array(0); numString = value.toString(); var size = numString.length; var result = new Uint8Array(size); for (i = 0; i < size; i++) { result[i] = numString.charCodeAt(i); } return result; }; function run() { document.getElementById('content').innerHTML += "<p>Started...</p>"; var name = new Name(document.getElementById('interest').value); var context = new ContentContext(face, new Date()); context.expressInterest(name); } </script> </head> <body > <form> Please Enter an Interest:<br /> <input id="interest" type="text" name="INTEREST" size="50" value="/wentao.shang/choir_jail.png" /> </form> <button onclick="run()">Fetch Content</button> <p id="content">Result: <br/></p> </body> </html>
7,246
37.547872
130
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-encode-decode-interest.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Encode/Decode Interest</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function encode() { var interest = new Interest( new Name(document.getElementById('interest').value ) ); interest.setMinSuffixComponents(2); interest.setMaxSuffixComponents(4); interest.setChildSelector(1); interest.setMustBeFresh(false); interest.setInterestLifetimeMilliseconds(30000); interest.setNonce(new Buffer([0x61, 0x62, 0x61, 0x62, 0x61, 0x62])); var pkd = []; for (i = 0; i < 32; ++i) pkd.push(i); interest.getKeyLocator().setType(KeyLocatorType.KEY_LOCATOR_DIGEST); interest.getKeyLocator().setKeyData(new Buffer(pkd)); interest.setExclude(new Exclude()); interest.getExclude().appendComponent(Name.fromEscapedString("abc")); interest.getExclude().appendAny(); var output = EncodingUtils.encodeToHexInterest(interest); document.getElementById('result').innerHTML = output; } function decode() { var input = document.getElementById('result').innerHTML; var interest = EncodingUtils.decodeHexInterest(input); if (LOG>3)console.log('INTEREST DECODED'); if (LOG>3)console.log(interest); /////////////////////////////////////// var output =""; if (interest.getName() != null) output += "Name: " + interest.getName().toUri() + "<br/>"; if (interest.getMinSuffixComponents() != null ) output += "MinSuffixComponents : " + interest.getMinSuffixComponents() + "<br/>"; if (interest.getMaxSuffixComponents() != null ) output += "MaxSuffixComponents : " + interest.getMaxSuffixComponents() + "<br/>"; output += "KeyLocator: "; if (interest.getKeyLocator().getType() >= 0) { if (interest.getKeyLocator().getType() ==KeyLocatorType.KEY_LOCATOR_DIGEST) output += "KeyLocatorDigest: " + interest.getKeyLocator().getKeyData().toHex(); else if (interest.getKeyLocator().getType() == KeyLocatorType.KEYNAME) output += "KeyName: " + interest.getKeyLocator().getKeyName().toUri(); else output += "<unrecognized ndn_KeyLocatorType>"; } else output += "<none>"; output += "<br/>"; if (interest.getChildSelector() != null ) output += "ChildSelector: " + interest.getChildSelector() + "<br/>"; output += "MustBeFresh: " + interest.getMustBeFresh() + "<br/>"; if (interest.getInterestLifetimeMilliseconds() != null ) output += "InterestLifetime (milliseconds): " + interest.getInterestLifetimeMilliseconds() + "<br/>"; if (interest.getNonce().size() > 0) output += "Nonce: " + interest.getNonce().toHex() + "<br/>"; if (interest.getExclude() != null ) output += "Exclude: " + interest.getExclude().toUri() + "<br/>"; document.getElementById('result').innerHTML = output; } </script> </head> <body > <form> Please Enter an Interest:<br /> <input id="interest" type="text" name="INTEREST" value="/ndn/abc" /> </form> <button onclick="encode()">Encode</button> <button onclick="decode()">Decode</button> <p id="result"></p> <!-- p id="result">01d2f2fafdc12e4d2e532e6c6f63616c686f737400fabdc12e4d2e53525600faa563636e6400fa9d4b4559000002d28e310000</p--> </body> </html>
4,796
38.975
136
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-path.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <meta charset="UTF-8"> <head> <title>Get path to Helper.js</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> var face = new Face(); //document.write('Face() object created!'); console.log('Face() object created!'); </script> </head> <body > </body> </html>
1,349
33.615385
78
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-encode-decode-benchmark.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Test Encode/Decode Benchmark</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript" src="test-encode-decode-benchmark.js"></script> <script type="text/javascript"> /** * Call benchmarkEncodeDataSeconds and benchmarkDecodeDataSeconds with appropriate nInterations. Print the * results to console.log. * @param {boolean} useComplex See benchmarkEncodeDataSeconds. * @param {boolean} useCrypto See benchmarkEncodeDataSeconds and benchmarkDecodeDataSeconds. * @param {function} continuation When finished call setTimeout(continuation, 100) so that * the output is shown in the browser before continuing. */ function benchmarkEncodeDecodeData(useComplex, useCrypto, continuation) { var format = "TLV "; // Use nIterationsBeforeYield for crypto to yield and process callbacks accumulated by crypto.subtle. var nIterationsBeforeYield = useCrypto ? 200 : null; var nEncodeIterations = useCrypto ? (UseSubtleCrypto() ? 4000 : 200) : 80000; TestEncodeDecodeBenchmark.benchmarkEncodeDataSeconds (nEncodeIterations, useComplex, useCrypto, function(duration, encoding) { document.getElementById('result').innerHTML += "Encode " + (useComplex ? "complex " : "simple ") + format + " data: Crypto? " + (useCrypto ? "RSA" : "no ") + ", Duration sec, Hz: " + duration + ", " + (nEncodeIterations / duration) + "<br/>"; // Use setTimeout so that the browser will update the display before continuing. setTimeout(function() { var nDecodeIterations = useCrypto ? (UseSubtleCrypto() ? 10000 : 2000) : 80000; TestEncodeDecodeBenchmark.benchmarkDecodeDataSeconds (nDecodeIterations, useCrypto, encoding, function(duration) { document.getElementById('result').innerHTML += "Decode " + (useComplex ? "complex " : "simple ") + format + " data: Crypto? " + (useCrypto ? "RSA" : "no ") + ", Duration sec, Hz: " + duration + ", " + (nDecodeIterations / duration) + "<br/>"; setTimeout(continuation, 100); }, nIterationsBeforeYield); }, 100); }, nIterationsBeforeYield); } function test(){ document.getElementById('result').innerHTML = "Results:<br/>"; benchmarkEncodeDecodeData(false, false, function() { benchmarkEncodeDecodeData(true, false, function() { benchmarkEncodeDecodeData(false, true, function() { benchmarkEncodeDecodeData(true, true, function() { document.getElementById('result').innerHTML += "Finished.<br/>"; }); }); }); }); } </script> </head> <body > <button onclick="test()">Test</button> <p id="result"></p> </body> </html>
3,911
42.466667
127
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-echo-consumer.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2015-2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <!-- This page shows an example of the repo-ng basic insertion protocol, described here: http://redmine.named-data.net/projects/repo-ng/wiki/Basic_Repo_Insertion_Protocol See main() for more details. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Consumer via WebSocket</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function printLine(line) { var result = document.getElementById('result'); result.innerHTML += line + "<br/>"; } var face = null; function onData(interest, data) { printLine("Got data packet with name " + data.getName().toUri()); printLine(data.getContent().buf().toString('binary')); }; function onTimeout(interest) { printLine("Time out for interest " + interest.getName().toUri()); }; function express() { var result = document.getElementById('result'); if (result.innerHTML.toString() == 0) // Initially clear the result. result.innerHTML = ""; if (face == null) { var host = document.getElementById('host').value; // Connect to the forwarder with a WebSocket. face = new Face({host: host}); } var word = document.getElementById('word').value; var name = new Name("/testecho"); name.append(word); printLine("Express name " + name.toUri()); face.expressInterest(name, onData, onTimeout); } </script> </head> <body > If you haven't already, open the <a href="test-publish-async-nfd.html" target="_blank">Publisher Page</a>. Enter a Word to Echo and click Express Interest.<br/><br/> <form> Host:<br/> <input id="host" type="text" size="50" name="HOST" value="localhost" /><br/> Word to Echo:<br/> <input id="word" type="text" size="50" name="WORD" value="hello" /> </form> <br/><button onclick="express()">Express Interest</button> <p id="result"></p> </body> </html>
2,854
30.032609
108
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-encode-decode-fib-entry.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Encode/Decode FibEntry</title> <script type="text/javascript" src="../../contrib/dcodeio/long.min.js"></script> <script type="text/javascript" src="../../contrib/dcodeio/bytebuffer-ab.min.js"></script> <script type="text/javascript" src="../../contrib/dcodeio/protobuf.min.js"></script> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function testEncodeDecodeFibEntry() { var result = document.getElementById('result'); result.innerHTML = ""; var ProtoBuf = dcodeIO.ProtoBuf; var builder = ProtoBuf.loadProtoFile("fib-entry.proto"); var descriptor = builder.lookup("ndn_message.FibEntryMessage"); var FibEntryMessage = descriptor.build(); var message = new FibEntryMessage(); message.fib_entry = new FibEntryMessage.FibEntry(); message.fib_entry.name = new FibEntryMessage.Name(); message.fib_entry.name.add("component", "ndn"); message.fib_entry.name.add("component", "ucla"); var nextHopRecord = new FibEntryMessage.NextHopRecord(); message.fib_entry.add("next_hop_records", nextHopRecord); nextHopRecord.face_id = 16; nextHopRecord.cost = 1; // Encode the Protobuf message object as TLV. var encoding = ProtobufTlv.encode(message, descriptor); var decodedMessage = new FibEntryMessage(); ProtobufTlv.decode(decodedMessage, descriptor, encoding); result.innerHTML += "Re-decoded FibEntry:</br>"; // This should print the same values that we put in message above. var value = ""; for (var i = 0; i < decodedMessage.fib_entry.name.component.length; ++i) value += "/" + decodedMessage.fib_entry.name.component[i].toString("utf8"); value += " nexthops = {"; for (var i = 0; i < decodedMessage.fib_entry.next_hop_records.length; ++i) value += "faceid=" + decodedMessage.fib_entry.next_hop_records[i].face_id + " (cost=" + decodedMessage.fib_entry.next_hop_records[i].cost + ")"; value += " }"; result.innerHTML += value + "</br>"; } </script> </head> <body > <button onclick="testEncodeDecodeFibEntry()">Test</button> <p id="result"></p> </body> </html>
3,180
37.325301
93
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-publish-async-nfd.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2015-2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <!-- This page shows an example of the repo-ng basic insertion protocol, described here: http://redmine.named-data.net/projects/repo-ng/wiki/Basic_Repo_Insertion_Protocol See main() for more details. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Publish via WebSocket</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> var DEFAULT_RSA_PUBLIC_KEY_DER = new Buffer([ 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb8, 0x09, 0xa7, 0x59, 0x82, 0x84, 0xec, 0x4f, 0x06, 0xfa, 0x1c, 0xb2, 0xe1, 0x38, 0x93, 0x53, 0xbb, 0x7d, 0xd4, 0xac, 0x88, 0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77, 0x21, 0x68, 0x4f, 0xcc, 0xb6, 0x1b, 0xe8, 0x00, 0x49, 0x13, 0x21, 0x02, 0x81, 0x81, 0x00, 0xb6, 0x18, 0x73, 0x59, 0x2c, 0x4f, 0x92, 0xac, 0xa2, 0x2e, 0x5f, 0xb6, 0xbe, 0x78, 0x5d, 0x47, 0x71, 0x04, 0x92, 0xf0, 0xd7, 0xe8, 0xc5, 0x7a, 0x84, 0x6b, 0xb8, 0xb4, 0x30, 0x1f, 0xd8, 0x0d, 0x58, 0xd0, 0x64, 0x80, 0xa7, 0x21, 0x1a, 0x48, 0x00, 0x37, 0xd6, 0x19, 0x71, 0xbb, 0x91, 0x20, 0x9d, 0xe2, 0xc3, 0xec, 0xdb, 0x36, 0x1c, 0xca, 0x48, 0x7d, 0x03, 0x32, 0x74, 0x1e, 0x65, 0x73, 0x02, 0x90, 0x73, 0xd8, 0x3f, 0xb5, 0x52, 0x35, 0x79, 0x1c, 0xee, 0x93, 0xa3, 0x32, 0x8b, 0xed, 0x89, 0x98, 0xf1, 0x0c, 0xd8, 0x12, 0xf2, 0x89, 0x7f, 0x32, 0x23, 0xec, 0x67, 0x66, 0x52, 0x83, 0x89, 0x99, 0x5e, 0x42, 0x2b, 0x42, 0x4b, 0x84, 0x50, 0x1b, 0x3e, 0x47, 0x6d, 0x74, 0xfb, 0xd1, 0xa6, 0x10, 0x20, 0x6c, 0x6e, 0xbe, 0x44, 0x3f, 0xb9, 0xfe, 0xbc, 0x8d, 0xda, 0xcb, 0xea, 0x8f ]); function printLine(line) { var result = document.getElementById('result'); result.innerHTML += line + "<br/>"; } var Echo = function Echo(keyChain, certificateName, face) { this.keyChain = keyChain; this.certificateName = certificateName; this.face = face; }; Echo.prototype.onInterest = function (prefix, interest, face, interestFilterId, filter) { // Make and sign a Data packet. var data = new Data(interest.getName()); var content = "Echo " + interest.getName().toUri(); data.setContent(content); // Use KeyChain.sign with the onComplete callback so that it works with Crypto.subtle. this.keyChain.sign(data, this.certificateName, function() { try { printLine("Sent content " + content); face.putData(data); } catch (e) { printLine(e.toString()); } }); }; Echo.prototype.onRegisterFailed = function(prefix) { printLine("Register failed for prefix " + prefix.toUri()); }; function main() { var result = document.getElementById('result'); result.innerHTML = ""; var host = document.getElementById('host').value; // Connect to the forwarder with a WebSocket. var face = new Face({host: host}); // For now, when setting face.setCommandSigningInfo, use a key chain with // a default private key instead of the system default key chain. This // is OK for now because NFD is configured to skip verification, so it // ignores the system default key chain. // On a platform which supports it, it would be better to use the default // KeyChain constructor. var identityStorage = new MemoryIdentityStorage(); var privateKeyStorage = new MemoryPrivateKeyStorage(); var keyChain = new KeyChain (new IdentityManager(identityStorage, privateKeyStorage), new SelfVerifyPolicyManager(identityStorage)); // Initialize the storage. var keyName = new Name("/testname/DSK-123"); var certificateName = keyName.getSubName(0, keyName.size() - 1).append ("KEY").append(keyName.get(-1)).append("ID-CERT").append("0"); identityStorage.addKey(keyName, KeyType.RSA, new Blob(DEFAULT_RSA_PUBLIC_KEY_DER, false)); privateKeyStorage.setKeyPairForKeyName (keyName, KeyType.RSA, DEFAULT_RSA_PUBLIC_KEY_DER, DEFAULT_RSA_PRIVATE_KEY_DER); face.setCommandSigningInfo(keyChain, certificateName); var echo = new Echo(keyChain, certificateName, face); var prefix = new Name("/testecho"); //var prefix = new Name("ndn:/media"); printLine("Register prefix " + prefix.toUri()); face.registerPrefix (prefix, echo.onInterest.bind(echo), echo.onRegisterFailed.bind(echo)); } </script> </head> <body > If you haven't already, open the <a href="test-echo-consumer.html" target="_blank">Consumer Page</a>. Click Register to be ready to publish. Then follow instructions on the Consumer Page.<br/><br/> <form> Host: <input id="host" type="text" size="50" name="HOST" value="localhost" /> </form> <br/><button onclick="main()">Register</button> <p id="result"></p> </body> </html>
13,806
60.09292
103
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/test-name.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2014-2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>NDN Name</title> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript"> function testName() { var result = document.getElementById('result'); result.innerHTML = ""; var comp1 = new Buffer(['.'.charCodeAt(0)]); var comp2 = new Buffer([0x00, 0x01, 0x02, 0x03]); // \u00E9 is e with accent. var entree = "entr\u00E9e"; // When Name constructor is passed an array, each item is a name component represented with Buffer, // typed array, or string (parsed as UTF-8) var name1 = new Name([entree, comp1, comp2]); var name1Uri = name1.toUri(); var name1UriExpected = "/entr%C3%A9e/..../%00%01%02%03"; result.innerHTML += "Name from '" + entree + "', Buffer of '.' and Buffer of 0,1,2,3:<br/>"; if (name1Uri == name1UriExpected) result.innerHTML += "SUCCESS: " + name1Uri + ".<br/>"; else result.innerHTML += "ERROR: got " + name1Uri + ", expected " + name1UriExpected + " .<br/>"; result.innerHTML += "Compare with same Name from '" + entree + "', '.' and Buffer:<br/>"; // Equivalent with name1 var name2 = new Name([entree, ".", comp2]); if (name2.size() != name1.size()) result.innerHTML += "ERROR: Got name with " + name2.size() + " components, expected " + name1.size() + ".<br/>"; else { var allEqual = true; for (var i = 0; i < name1.size(); ++i) { if (!name1.get(i).equals(name2.get(i))) { allEqual = false; result.innerHTML += "ERROR: Compare with " + name2.toUri() + ": Names differ at component at index " + i + ".<br/>"; } } if (allEqual) result.innerHTML += "SUCCESS: Names are equal.<br/>"; } result.innerHTML += "Compare with same Name from URI:<br/>"; // Equivalent with name1; when Name constructor is passed a string, it is treated as a URI var name3 = new Name("/entr%C3%A9e/..../%00%01%02%03"); if (name3.size() != name1.size()) result.innerHTML += "ERROR: Got name with " + name3.size() + " components, expected " + name1.size() + ".<br/>"; else { var allEqual = true; for (var i = 0; i < name1.size(); ++i) { if (!name1.get(i).equals(name3.get(i))) { allEqual = false; result.innerHTML += "ERROR: Names differ at component at index " + i + ".<br/>"; } } if (allEqual) result.innerHTML += "SUCCESS: Names are equal.<br/>"; } result.innerHTML += "Compare with Name prefix of first 2 components:<br/>"; // Returns new Name([entree, "."]) var name4 = name2.getPrefix(2); if (name4.size() != 2) result.innerHTML += "ERROR: Got name with " + name4.size() + " components, expected 2.<br/>"; else { var allEqual = true; for (var i = 0; i < name4.size(); ++i) { if (!name1.get(i).equals(name4.get(i))) { allEqual = false; result.innerHTML += "ERROR: Names differ at component at index " + i + ".<br/>"; } } if (allEqual) result.innerHTML += "SUCCESS: First 2 components are equal: " + name4.toUri() + " .<br/>"; } result.innerHTML += "Check with Name component at index 2:<br/>"; // Returns ArrayBuffer of "%00%01%02%03" var component2Out = name1.get(2).getValue().buf(); if (DataUtils.arraysEqual(component2Out, comp2)) result.innerHTML += "SUCCESS: Components at index 2 are equal.<br/>"; else result.innerHTML += "ERROR: Components at index 2 are different.<br/>"; var name5 = new Name("/localhost/user/folders/files/%00%0F"); result.innerHTML += "Check chaining calls to append() to create Name: " + name5.toUri() + "<br/>"; if (name5.equals(new Name(new Name("/localhost")).append(new Name("/user/folders")).append ("files").appendSegment(15))) result.innerHTML += "SUCCESS: Names are equal.<br/>"; else result.innerHTML += "ERROR: Names are different.<br/>"; } </script> </head> <body > <button onclick="testName()">Test</button> <p id="result"></p> </body> </html>
5,300
38.857143
132
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/repo-ng/basic-insertion.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2015-2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <!-- This page shows an example of the repo-ng basic insertion protocol, described here: http://redmine.named-data.net/projects/repo-ng/wiki/Basic_Repo_Insertion_Protocol See main() for more details. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Repo-ng Basic Insertion</title> <script type="text/javascript" src="../../../contrib/dcodeio/long.min.js"></script> <script type="text/javascript" src="../../../contrib/dcodeio/bytebuffer-ab.min.js"></script> <script type="text/javascript" src="../../../contrib/dcodeio/protobuf.min.js"></script> <script type="text/javascript" src="../../../build/ndn.js"></script> <script type="text/javascript"> var DEFAULT_RSA_PUBLIC_KEY_DER = new Buffer([ 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb8, 0x09, 0xa7, 0x59, 0x82, 0x84, 0xec, 0x4f, 0x06, 0xfa, 0x1c, 0xb2, 0xe1, 0x38, 0x93, 0x53, 0xbb, 0x7d, 0xd4, 0xac, 0x88, 0x1a, 0xf8, 0x25, 0x11, 0xe4, 0xfa,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x1b, 0xe8, 0x00, 0x49, 0x13, 0x21, 0x02, 0x81, 0x81, 0x00, 0xb6, 0x18, 0x73, 0x59, 0x2c, 0x4f, 0x92, 0xac, 0xa2, 0x2e, 0x5f, 0xb6, 0xbe, 0x78, 0x5d, 0x47, 0x71, 0x04, 0x92, 0xf0, 0xd7, 0xe8, 0xc5, 0x7a, 0x84, 0x6b, 0xb8, 0xb4, 0x30, 0x1f, 0xd8, 0x0d, 0x58, 0xd0, 0x64, 0x80, 0xa7, 0x21, 0x1a, 0x48, 0x00, 0x37, 0xd6, 0x19, 0x71, 0xbb, 0x91, 0x20, 0x9d, 0xe2, 0xc3, 0xec, 0xdb, 0x36, 0x1c, 0xca, 0x48, 0x7d, 0x03, 0x32, 0x74, 0x1e, 0x65, 0x73, 0x02, 0x90, 0x73, 0xd8, 0x3f, 0xb5, 0x52, 0x35, 0x79, 0x1c, 0xee, 0x93, 0xa3, 0x32, 0x8b, 0xed, 0x89, 0x98, 0xf1, 0x0c, 0xd8, 0x12, 0xf2, 0x89, 0x7f, 0x32, 0x23, 0xec, 0x67, 0x66, 0x52, 0x83, 0x89, 0x99, 0x5e, 0x42, 0x2b, 0x42, 0x4b, 0x84, 0x50, 0x1b, 0x3e, 0x47, 0x6d, 0x74, 0xfb, 0xd1, 0xa6, 0x10, 0x20, 0x6c, 0x6e, 0xbe, 0x44, 0x3f, 0xb9, 0xfe, 0xbc, 0x8d, 0xda, 0xcb, 0xea, 0x8f ]); function printLine(line) { var result = document.getElementById('result'); result.innerHTML += line + "<br/>"; } var ProtoBuf = dcodeIO.ProtoBuf; /** * Send a command interest for the repo to fetch the given fetchName and insert * it in the repo. * @param {Face} face The Face used to call makeCommandInterest and expressInterest. * @param {Name} repoCommandPrefix The repo command prefix. * @param {Name} fetchName The name to fetch. If startBlockId and endBlockId are * supplied, then the repo will request multiple segments by appending the range * of block IDs (segment numbers). * @param {function} onInsertStarted When the request insert command * successfully returns, this calls onInsertStarted(). * @param {function} onFailed If the command fails for any reason, this prints * an error and calls onFailed(). * @param {number} startBlockId (optional) The starting block ID (segment * number) to fetch. * @param {number} endBlockId (optional) The end block ID (segment number) to fetch. */ function requestInsert (face, repoCommandPrefix, fetchName, onInsertStarted, onFailed, startBlockId, endBlockId) { var builder = ProtoBuf.loadProtoFile("repo-command-parameter.proto"); var descriptor = builder.lookup("ndn_message.RepoCommandParameterMessage"); var RepoCommandParameterMessage = descriptor.build(); var parameter = new RepoCommandParameterMessage(); parameter.repo_command_parameter = new RepoCommandParameterMessage.RepoCommandParameter(); // Add the Name. parameter.repo_command_parameter.name = new RepoCommandParameterMessage.Name(); for (var i = 0; i < fetchName.size(); ++i) parameter.repo_command_parameter.name.add ("component", fetchName.get(i).getValue().buf()); // Add startBlockId and endBlockId if supplied. if (startBlockId != null) parameter.repo_command_parameter.start_block_id = startBlockId; if (endBlockId != null) parameter.repo_command_parameter.end_block_id = endBlockId; // Create the command interest. var interest = new Interest(new Name(repoCommandPrefix).append("insert") .append(new Name.Component(ProtobufTlv.encode(parameter, descriptor)))); console.log(interest.name.toUri()); face.makeCommandInterest(interest); console.log(interest.name.toUri()); // Send the command interest and get the response or timeout. face.expressInterest (interest, function(localInterest, data) { var builder = ProtoBuf.loadProtoFile("repo-command-response.proto"); var descriptor = builder.lookup("ndn_message.RepoCommandResponseMessage"); var RepoCommandResponseMessage = descriptor.build(); var response = new RepoCommandResponseMessage(); try { ProtobufTlv.decode(response, descriptor, data.getContent()); } catch (ex) { printLine("Cannot decode the repo command response " + ex); onFailed(); } if (response.repo_command_response.status_code == 100) onInsertStarted(); else { printLine ("Got repo command error code " + response.repo_command_response.status_code); onFailed(); } }, function(localInterest) { printLine("Insert repo command timeout"); onFailed(); }); } /** * This is an example class to supply the data requested by the repo-ng * insertion process. For you application, you would supply data in a different * way. This sends data packets until it has sent (endBlockId - startBlockId) + 1 * packets. It might be simpler to finish when onInterest has sent the packet * for segment endBlockId, but there is no guarantee that the interests will * arrive in order. Therefore we send packets until the total is sent. * @param {KeyChain} keyChain This calls keyChain.sign. * @param {Name} certificateName The certificateName for keyChain.sign. * @param {number} startBlockId The startBlockId given to requestInsert(). * @param {number} endBlockId The endBlockId given to requestInsert(). * @param {function} onFinished When the final segment has been sent, this calls * onFinished(). */ var ProduceSegments = function ProduceSegments (keyChain, certificateName, startBlockId, endBlockId, onFinished) { this.keyChain = keyChain; this.certificateName = certificateName; this.startBlockId = startBlockId; this.endBlockId = endBlockId; this.nSegmentsSent = 0; this.onFinished = onFinished; }; ProduceSegments.prototype.onInterest = function (prefix, interest, face, interestFilterId, filter) { printLine("Got interest " + interest.toUri()); // Make and sign a Data packet with the interest name. var data = new Data(interest.name); var content = "Data packet " + interest.name.toUri(); data.setContent(new Blob(content)); this.keyChain.sign(data, this.certificateName); face.putData(data); printLine("Sent data packet " + data.getName().toUri()); this.nSegmentsSent += 1; if (this.nSegmentsSent >= (this.endBlockId - this.startBlockId) + 1) // We sent the final segment. this.onFinished(); }; /** * Call requestInsert and register a prefix so that ProduceSegments will answer * interests from the repo to send the data packets. This assumes that repo-ng * is already running (e.g. `sudo ndn-repo-ng`). */ function main() { var result = document.getElementById('result'); result.innerHTML = ""; //var repoCommandPrefix = new Name("/example/repo/1"); var repoCommandPrefix = new Name("/localhost/movies"); //var repoDataPrefix = new Name("/example/data/1"); var repoDataPrefix = new Name("/media"); var nowMilliseconds = new Date().getTime(); var fetchPrefix = new Name(repoDataPrefix).append("testinsert").appendVersion (nowMilliseconds); // Connect to the local forwarder with a WebSocket. var face = new Face({host: "localhost"}); console.log("Host: " + face.connectionInfo.toString()); // For now, when setting face.setCommandSigningInfo, use a key chain with // a default private key instead of the system default key chain. This // is OK for now because NFD is configured to skip verification, so it // ignores the system default key chain. // On a platform which supports it, it would be better to use the default // KeyChain constructor. var identityStorage = new MemoryIdentityStorage(); var privateKeyStorage = new MemoryPrivateKeyStorage(); var keyChain = new KeyChain (new IdentityManager(identityStorage, privateKeyStorage), new SelfVerifyPolicyManager(identityStorage)); // Initialize the storage. var keyName = new Name("/testname/DSK-123"); var certificateName = keyName.getSubName(0, keyName.size() - 1).append ("KEY").append(keyName.get(-1)).append("ID-CERT").append("0"); identityStorage.addKey(keyName, KeyType.RSA, new Blob(DEFAULT_RSA_PUBLIC_KEY_DER, false)); privateKeyStorage.setKeyPairForKeyName (keyName, KeyType.RSA, DEFAULT_RSA_PUBLIC_KEY_DER, DEFAULT_RSA_PRIVATE_KEY_DER); face.setCommandSigningInfo(keyChain, certificateName); // Register the prefix and send the repo insert command at the same time. var startBlockId = 0; var endBlockId = 1; var produceSegments = new ProduceSegments (keyChain, certificateName, startBlockId, endBlockId, function() { printLine("All data was inserted."); }); printLine("Register prefix " + fetchPrefix.toUri()); face.registerPrefix (fetchPrefix, produceSegments.onInterest.bind(produceSegments), function(prefix) { printLine("Register failed for prefix " + prefix.toUri()); }); requestInsert (face, repoCommandPrefix, fetchPrefix, function() { printLine("Insert started for " + fetchPrefix.toUri()); }, function() { /* Already printed the error. */ }, startBlockId, endBlockId); } </script> </head> <body > <button onclick="main()">Test Basic Insertion</button> <p id="result"></p> </body> </html>
18,989
54.526316
99
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/browser/repo-ng/watched-insertion.html
<?xml version = "1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <!-- * Copyright (C) 2015-2016 Regents of the University of California. * @author: Jeff Thompson <jefft0@remap.ucla.edu> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <!-- This page shows an example of the repo-ng watched prefix insertion protocol, described here: http://redmine.named-data.net/projects/repo-ng/wiki/Watched_Prefix_Insertion_Protocol See main() for more details. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Repo-ng Watched Insertion</title> <script type="text/javascript" src="../../../contrib/dcodeio/long.min.js"></script> <script type="text/javascript" src="../../../contrib/dcodeio/bytebuffer-ab.min.js"></script> <script type="text/javascript" src="../../../contrib/dcodeio/protobuf.min.js"></script> <script type="text/javascript" src="../../../build/ndn.js"></script> <script type="text/javascript"> var DEFAULT_RSA_PUBLIC_KEY_DER = new Buffer([ 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb8, 0x09, 0xa7, 0x59, 0x82, 0x84, 0xec, 0x4f, 0x06, 0xfa, 0x1c, 0xb2, 0xe1, 0x38, 0x93, 0x53, 0xbb, 0x7d, 0xd4, 0xac, 0x88, 0x1a, 0xf8, 0x25, 0x11, 0xe4, 0xfa, 0x1d, 0x61, 0x24, 0x5b, 0x82, 0xca, 0xcd, 0x72, 0xce, 0xdb, 0x66, 0xb5, 0x8d, 0x54, 0xbd, 0xfb, 0x23, 0xfd, 0xe8, 0x8e, 0xaf, 0xa7, 0xb3, 0x79, 0xbe, 0x94, 0xb5, 0xb7, 0xba, 0x17, 0xb6, 0x05, 0xae, 0xce, 0x43, 0xbe, 0x3b, 0xce, 0x6e, 0xea, 0x07, 0xdb, 0xbf, 0x0a, 0x7e, 0xeb, 0xbc, 0xc9, 0x7b, 0x62, 0x3c, 0xf5, 0xe1, 0xce, 0xe1, 0xd9, 0x8d, 0x9c, 0xfe, 0x1f, 0xc7, 0xf8, 0xfb, 0x59, 0xc0, 0x94, 0x0b, 0x2c, 0xd9, 0x7d, 0xbc, 0x96, 0xeb, 0xb8, 0x79, 0x22, 0x8a, 0x2e, 0xa0, 0x12, 0x1d, 0x42, 0x07, 0xb6, 0x5d, 0xdb, 0xe1, 0xf6, 0xb1, 0x5d, 0x7b, 0x1f, 0x54, 0x52, 0x1c, 0xa3, 0x11, 0x9b, 0xf9, 0xeb, 0xbe, 0xb3, 0x95, 0xca, 0xa5, 0x87, 0x3f, 0x31, 0x18, 0x1a, 0xc9, 0x99, 0x01, 0xec, 0xaa, 0x90, 0xfd, 0x8a, 0x36, 0x35, 0x5e, 0x12, 0x81, 0xbe, 0x84, 0x88, 0xa1, 0x0d, 0x19, 0x2a, 0x4a, 0x66, 0xc1, 0x59, 0x3c, 0x41, 0x83, 0x3d, 0x3d, 0xb8, 0xd4, 0xab, 0x34, 0x90, 0x06, 0x3e, 0x1a, 0x61, 0x74, 0xbe, 0x04, 0xf5, 0x7a, 0x69, 0x1b, 0x9d, 0x56, 0xfc, 0x83, 0xb7, 0x60, 0xc1, 0x5e, 0x9d, 0x85, 0x34, 0xfd, 0x02, 0x1a, 0xba, 0x2c, 0x09, 0x72, 0xa7, 0x4a, 0x5e, 0x18, 0xbf, 0xc0, 0x58, 0xa7, 0x49, 0x34, 0x46, 0x61, 0x59, 0x0e, 0xe2, 0x6e, 0x9e, 0xd2, 0xdb, 0xfd, 0x72, 0x2f, 0x3c, 0x47, 0xcc, 0x5f, 0x99, 0x62, 0xee, 0x0d, 0xf3, 0x1f, 0x30, 0x25, 0x20, 0x92, 0x15, 0x4b, 0x04, 0xfe, 0x15, 0x19, 0x1d, 0xdc, 0x7e, 0x5c, 0x10, 0x21, 0x52, 0x21, 0x91, 0x54, 0x60, 0x8b, 0x92, 0x41, 0x02, 0x03, 0x01, 0x00, 0x01 ]); var DEFAULT_RSA_PRIVATE_KEY_DER = new Buffer([ 0x30, 0x82, 0x04, 0xa5, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb8, 0x09, 0x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x88, 0x82, 0xc2, 0xdd, 0xbc, 0x25, 0xe6, 0xa2, 0xc1, 0xd2, 0x33, 0xdc, 0xef, 0x0a, 0x97, 0x2b, 0xdc, 0x59, 0x6a, 0x86, 0x61, 0x4e, 0xa6, 0xc7, 0x95, 0x99, 0xa6, 0xa6, 0x55, 0x6c, 0x5a, 0x8e, 0x72, 0x25, 0x63, 0xac, 0x52, 0xb9, 0x10, 0x69, 0x83, 0x99, 0xd3, 0x51, 0x6c, 0x1a, 0xb3, 0x83, 0x6a, 0xff, 0x50, 0x58, 0xb7, 0x28, 0x97, 0x13, 0xe2, 0xba, 0x94, 0x5b, 0x89, 0xb4, 0xea, 0xba, 0x31, 0xcd, 0x78, 0xe4, 0x4a, 0x00, 0x36, 0x42, 0x00, 0x62, 0x41, 0xc6, 0x47, 0x46, 0x37, 0xea, 0x6d, 0x50, 0xb4, 0x66, 0x8f, 0x55, 0x0c, 0xc8, 0x99, 0x91, 0xd5, 0xec, 0xd2, 0x40, 0x1c, 0x24, 0x7d, 0x3a, 0xff, 0x74, 0xfa, 0x32, 0x24, 0xe0, 0x11, 0x2b, 0x71, 0xad, 0x7e, 0x14, 0xa0, 0x77, 0x21, 0x68, 0x4f, 0xcc, 0xb6, 0x1b, 0xe8, 0x00, 0x49, 0x13, 0x21, 0x02, 0x81, 0x81, 0x00, 0xb6, 0x18, 0x73, 0x59, 0x2c, 0x4f, 0x92, 0xac, 0xa2, 0x2e, 0x5f, 0xb6, 0xbe, 0x78, 0x5d, 0x47, 0x71, 0x04, 0x92, 0xf0, 0xd7, 0xe8, 0xc5, 0x7a, 0x84, 0x6b, 0xb8, 0xb4, 0x30, 0x1f, 0xd8, 0x0d, 0x58, 0xd0, 0x64, 0x80, 0xa7, 0x21, 0x1a, 0x48, 0x00, 0x37, 0xd6, 0x19, 0x71, 0xbb, 0x91, 0x20, 0x9d, 0xe2, 0xc3, 0xec, 0xdb, 0x36, 0x1c, 0xca, 0x48, 0x7d, 0x03, 0x32, 0x74, 0x1e, 0x65, 0x73, 0x02, 0x90, 0x73, 0xd8, 0x3f, 0xb5, 0x52, 0x35, 0x79, 0x1c, 0xee, 0x93, 0xa3, 0x32, 0x8b, 0xed, 0x89, 0x98, 0xf1, 0x0c, 0xd8, 0x12, 0xf2, 0x89, 0x7f, 0x32, 0x23, 0xec, 0x67, 0x66, 0x52, 0x83, 0x89, 0x99, 0x5e, 0x42, 0x2b, 0x42, 0x4b, 0x84, 0x50, 0x1b, 0x3e, 0x47, 0x6d, 0x74, 0xfb, 0xd1, 0xa6, 0x10, 0x20, 0x6c, 0x6e, 0xbe, 0x44, 0x3f, 0xb9, 0xfe, 0xbc, 0x8d, 0xda, 0xcb, 0xea, 0x8f ]); function printLine(line) { var result = document.getElementById('result'); result.innerHTML += line + "<br/>"; } var ProtoBuf = dcodeIO.ProtoBuf; /** * Send a command interest for the repo to start watching the given watchPrefix. * @param {Face} face The Face used to call makeCommandInterest and * expressInterest. * @param {Name} repoCommandPrefix The repo command prefix. * @param {Name} watchPrefix The prefix that the repo will watch. * @param {function} onRepoWatchStarted When the start watch command * successfully returns, this calls onRepoWatchStarted(). * @param {function} onFailed If the command fails for any reason, this prints * an error and calls onFailed(). */ function startRepoWatch (face, repoCommandPrefix, watchPrefix, onRepoWatchStarted, onFailed) { var builder = ProtoBuf.loadProtoFile("repo-command-parameter.proto"); var descriptor = builder.lookup("ndn_message.RepoCommandParameterMessage"); var RepoCommandParameterMessage = descriptor.build(); var parameter = new RepoCommandParameterMessage(); parameter.repo_command_parameter = new RepoCommandParameterMessage.RepoCommandParameter(); // Add the Name. parameter.repo_command_parameter.name = new RepoCommandParameterMessage.Name(); for (var i = 0; i < watchPrefix.size(); ++i) parameter.repo_command_parameter.name.add ("component", watchPrefix.get(i).getValue().buf()); // Create the command interest. var interest = new Interest(new Name(repoCommandPrefix).append("watch") .append("start") .append(new Name.Component(ProtobufTlv.encode(parameter, descriptor)))); face.makeCommandInterest(interest); // Send the command interest and get the response or timeout. face.expressInterest (interest, function(localInterest, data) { var builder = ProtoBuf.loadProtoFile("repo-command-response.proto"); var descriptor = builder.lookup("ndn_message.RepoCommandResponseMessage"); var RepoCommandResponseMessage = descriptor.build(); var response = new RepoCommandResponseMessage(); try { ProtobufTlv.decode(response, descriptor, data.getContent()); } catch (ex) { printLine("Cannot decode the repo command response " + ex); onFailed(); } if (response.repo_command_response.status_code == 100) onRepoWatchStarted(); else { printLine ("Got repo command error code " + response.repo_command_response.status_code); onFailed(); } }, function(localInterest) { printLine("Start repo watch command timeout"); onFailed(); }); } /** * Send a command interest for the repo to stop watching the given watchPrefix. * @param {Face} face The Face used to call makeCommandInterest and * expressInterest. * @param {Name} repoCommandPrefix The repo command prefix. * @param {Name} watchPrefix The prefix that the repo will stop watching. * @param {function} onRepoWatchStopped When the stop watch command * successfully returns, this calls onRepoWatchStopped(). * @param {function} onFailed If the command fails for any reason, this prints * an error and calls onFailed(). */ function stopRepoWatch (face, repoCommandPrefix, watchPrefix, onRepoWatchStopped, onFailed) { var builder = ProtoBuf.loadProtoFile("repo-command-parameter.proto"); var descriptor = builder.lookup("ndn_message.RepoCommandParameterMessage"); var RepoCommandParameterMessage = descriptor.build(); var parameter = new RepoCommandParameterMessage(); parameter.repo_command_parameter = new RepoCommandParameterMessage.RepoCommandParameter(); // Add the Name. parameter.repo_command_parameter.name = new RepoCommandParameterMessage.Name(); for (var i = 0; i < watchPrefix.size(); ++i) parameter.repo_command_parameter.name.add ("component", watchPrefix.get(i).getValue().buf()); // Create the command interest. var interest = new Interest(new Name(repoCommandPrefix).append("watch") .append("stop") .append(new Name.Component(ProtobufTlv.encode(parameter, descriptor)))); face.makeCommandInterest(interest); // Send the command interest and get the response or timeout. face.expressInterest (interest, function(localInterest, data) { var builder = ProtoBuf.loadProtoFile("repo-command-response.proto"); var descriptor = builder.lookup("ndn_message.RepoCommandResponseMessage"); var RepoCommandResponseMessage = descriptor.build(); var response = new RepoCommandResponseMessage(); try { ProtobufTlv.decode(response, descriptor, data.getContent()); } catch (ex) { printLine("Cannot decode the repo command response " + ex); onFailed(); } if (response.repo_command_response.status_code == 101) onRepoWatchStopped(); else { printLine ("Got repo command error code " + response.repo_command_response.status_code); onFailed(); } }, function(localInterest) { printLine("Stop repo watch command timeout"); onFailed(); }); } /** * This is an example class to supply the data requested by the repo-ng * watched prefix process. For you application, you would supply data in a * different way. Repo-ng sends interests for the watchPrefix given to * startRepoWatch(). (The interest also has Exclude selectors but for * simplicity we ignore them and assume that the exclude values increase along * with the segment numbers that we send.) This sends data packets where the * name has the prefix plus increasing segment numbers up to a maximum. * @param {KeyChain} keyChain This calls keyChain.sign. * @param {Name} certificateName The certificateName for keyChain.sign. * @param {function} onFinished When the final segment has been sent, this calls * onFinished(). */ var SendSegments = function SendSegments(keyChain, certificateName, onFinished) { this.keyChain = keyChain; this.certificateName = certificateName; this.onFinished = onFinished; this.segment = -1; }; /** * Append the next segment number to the prefix and send a new data packet. If * the last packet is sent, then call this.onFinished(). */ SendSegments.prototype.onInterest = function (prefix, interest, face, interestFilterId, filter) { var maxSegment = 2; if (this.segment >= maxSegment) // We have already called this.onFinished(). return; printLine("Got interest " + interest.toUri()); // Make and sign a Data packet for the segment. this.segment += 1; var data = new Data(new Name(prefix).appendSegment(this.segment)); var content = "Segment number " + this.segment; data.setContent(content); this.keyChain.sign(data, this.certificateName); face.putData(data); printLine("Sent data packet " + data.name.toUri()); if (this.segment >= maxSegment) // We sent the final data packet. this.onFinished(); }; /** * Call startRepoWatch and register a prefix so that SendSegments will answer * interests from the repo to send data packets for the watched prefix. When * all the data is sent (or an error), call stopRepoWatch. This assumes that * repo-ng is already running (e.g. `sudo ndn-repo-ng`). */ function main() { var result = document.getElementById('result'); result.innerHTML = ""; //var repoCommandPrefix = new Name("/example/repo/1"); var repoCommandPrefix = new Name("/localhost/movies"); //var repoDataPrefix = new Name("/example/data/1"); var repoDataPrefix = new Name("/media"); var nowMilliseconds = new Date().getTime(); var watchPrefix = new Name(repoDataPrefix).append("testwatch").appendVersion (nowMilliseconds); // Connect to the local forwarder with a WebSocket. var face = new Face({host: "localhost"}); console.log("Host: " + face.connectionInfo.toString()); // For now, when setting face.setCommandSigningInfo, use a key chain with // a default private key instead of the system default key chain. This // is OK for now because NFD is configured to skip verification, so it // ignores the system default key chain. // On a platform which supports it, it would be better to use the default // KeyChain constructor. var identityStorage = new MemoryIdentityStorage(); var privateKeyStorage = new MemoryPrivateKeyStorage(); var keyChain = new KeyChain (new IdentityManager(identityStorage, privateKeyStorage), new SelfVerifyPolicyManager(identityStorage)); // Initialize the storage. var keyName = new Name("/testname/DSK-123"); var certificateName = keyName.getSubName(0, keyName.size() - 1).append ("KEY").append(keyName.get(-1)).append("ID-CERT").append("0"); identityStorage.addKey(keyName, KeyType.RSA, new Blob(DEFAULT_RSA_PUBLIC_KEY_DER, false)); privateKeyStorage.setKeyPairForKeyName (keyName, KeyType.RSA, DEFAULT_RSA_PUBLIC_KEY_DER, DEFAULT_RSA_PRIVATE_KEY_DER); face.setCommandSigningInfo(keyChain, certificateName); // Register the prefix and start the repo watch at the same time. var sendSegments = new SendSegments (keyChain, certificateName, function() { stopRepoWatchAndQuit(face, repoCommandPrefix, watchPrefix); }); printLine("Register prefix " + watchPrefix.toUri()); face.registerPrefix (watchPrefix, sendSegments.onInterest.bind(sendSegments), function(prefix) { printLine("Register failed for prefix " + prefix.toUri()); }); startRepoWatch (face, repoCommandPrefix, watchPrefix, function() { printLine("Watch started for " + watchPrefix.toUri()); }, function() { printLine("startRepoWatch failed."); stopRepoWatchAndQuit(face, repoCommandPrefix, watchPrefix); }); } /** * Call stopRepoWatch and stop the script. */ function stopRepoWatchAndQuit(face, repoCommandPrefix, watchPrefix) { stopRepoWatch (face, repoCommandPrefix, watchPrefix, function() { printLine("Watch stopped for " + watchPrefix.toUri()); }, function() { printLine("stopRepoWatch failed."); }); } </script> </head> <body > <button onclick="main()">Test Watched Insertion</button> <p id="result"></p> </body> </html>
21,287
50.669903
99
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/examples/ndnping/ndn-ping.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <!-- * Copyright (C) 2013-2016 Regents of the University of California. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * A copy of the GNU Lesser General Public License is in the file COPYING. --> <html> <head> <title>NDN Ping</title> <!-- ndn.js is a concatented version of the library, built in /build --> <script type="text/javascript" src="../../build/ndn.js"></script> <script type="text/javascript" src="ndn-ping.js"></script> </head> <body> <h1>NDN Ping example</h1> Using ping responder on NDN testbed, which responds to Interests in <em> /&lt;topo-prefix&gt;/ping/&lt;random-number&gt;</em>. <h2>NDN Testbed Status</h2> <p>Testbed content ping results retrieved using <a href="http://github.com/named-data/ndn-js">NDN-JS</a>, a javascript client library for NDN.</p> <p>Websocket host: <span id="host"></span></p> <table border="0" width="50%" id="pingreport" style="margin-left:20px"> </table> <p>&nbsp;</p> </body> </html>
1,689
32.137255
148
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/ndn-protocol/make-ndn-protocol.sh
#!/bin/sh cd modules; ./make-ndn-js.jsm.sh; cd .. ; zip -r ../ndn-protocol.xpi .
81
26.333333
70
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/ndn-protocol/modules/make-ndn-js.jsm.sh
#!/bin/sh cat ndn-js-header.txt ../../build/ndn.min.js ../../js/transport/xpcom-transport.js ../../js/encoding/mime-types.js > ndn-js.jsm
138
45.333333
127
sh
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/ndn-js/wsproxy/README.md
wsproxy ======= WebSocket proxy server between NDN javascript stack and ndnd. NOTE - this is legacy; there is a cpp-based wsproxy that has no nodejs dependency. https://github.com/named-data/wsproxy-cpp for new installs, use that instead ! meanwhile, instructions below for node-js version. This proxy runs on top of 'node.js'. 'ws' and 'node-getopt' packages are required. It listens for WebSocket connection request on port number 9696. Once it receives a incoming connection, it issues a TCP connection to the specified 'ndnd' router (port number 6363). It then translates packet frames from WebSocket to pure TCP byte streams and vice versa. Installation guide: 1) node.js: go to http://nodejs.org/ to download and install node.js; 2) ws package: use command 'npm install ws' or go to https://github.com/einaros/ws for more information; 3) node-getopt package: use command 'npm install node-getopt' or go to https://npmjs.org/package/node-getopt for more information. To run the proxy, simply use the command 'node wsproxy-tcp.js' or 'node wsproxy-udp.js'. To specify remote ndnd router's hostname or ip address, use option '-c x.x.x.x'. Default is 'localhost'. To specify the port number of the remote ndnd, use option '-n xxxx'. Default is 6363. To specify the port number on which the proxy will listen, use option '-p xxxx'. Default is 9696. To specify maximum number of concurrent clients, use option '-m N'. Default is 40. To specify the level of log info display, use option '-L x'. x=0 means no output; x=1 will log connection startup and close; x=2 will log contents of all messages that flow across the proxy. Default is 1. Example: to setup UDP connection to ndnd router 192.168.1.51 with max client number 50 and log level 2, use the command: node wsproxy-udp.js -c 192.168.1.51 -m 50 -L 2 Acknowledgement: this code is extended from Junxiao's WebSocket proxy implementation (https://gist.github.com/3835425).
1,949
45.428571
354
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/index.html
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>Samples players for dash.js</title> </head> <body> <img src="https://cloud.githubusercontent.com/assets/2762250/7824984/985c3e76-03bc-11e5-807b-1402bde4fe56.png" width="300"> <p/> dash.js is a framework which enables the creation of many different MSE/EME players. This page provides a starting point to examine all the various samples available. Many samples ship with this code base, others are hosted elsewhere. <p/> <strong>Local examples </strong> available in the /samples/ folder. They are described according to the subfolder name in which they are located: <table style="width:1000px"> <tr><td colspan="2">/dash-if-reference-player</td></tr> <tr><td style="width:80px"></td><td><a href="dash-if-reference-player/index.html">index.html</a> - The DASH IF Reference player. The <a href="http://dashif.org">DASH Industry Forum</a> is a non-profit industry forum formed to catalyze the adoption of MPEG-DASH. They define common versions of DASH which other standards bodies (such as DVB and HbbTV) then formalize. This player is intended to provide a reference implementation. Note the player is just a UI on top of the same framework used in all these samples. In using dash.js you are inheriting much of the latest thinking of the DASH ecosystem.</td></tr> <tr><td style="width:80px"></td><td><a href="dash-if-reference-player/eme.html">eme.html</a> - a version of the DASH IF Reference player optimized for debugging EME applications. </td></tr> <tr><td colspan="2">/basic-page-embed</td></tr> <tr><td style="width:80px"></td><td><a href="getting-started-basic-embed/auto-load-single-video-src.html">auto-load-single-video-src.html</a> - the simplest means of using a dash.js player in a web page. The mpd src is specified within the @src attribute of the video element. The "auto-load" refers to the fact that this page calls the Dash.createAll() method onLoad in order to automatically convert all video elements of class 'dashjs-player' in to a functioning DASH player.</td></tr> <tr><td style="width:80px"></td><td><a href="getting-started-basic-embed/auto-load-single-video.html">auto-load-single-video.html</a> - the mpd source is specified within the child Source element of the video element. Note that the Source@type attribute must be set to "application/dash+xml" in order for it to be automatically used. </td></tr> <tr><td style="width:80px"></td><td><a href="getting-started-basic-embed/auto-load-single-video-with-context-and-source.html">auto-load-single-video-with-context-and-source.html</a> - while the Dash.CreateAll() method is handy for automated instantiation within a page, the Dash.create() method takes three optional parameters to give you more control. This example illustrates calling Dash.create() in four different ways. The first simply specifies a target video element with a child source element. The second specifies a target video element with a src attribute. The third specifies the video element and a dynamically generated source object. The fourth specifies the video element, a source object and a custom DashContext object. </td></tr> <tr><td style="width:80px"></td><td><a href="getting-started-basic-embed/auto-load-single-video-with-reference.html">auto-load-single-video-with-reference.html</a> - this example shows how to auto-embed the player while still obtaining a reference to the MediaPlayer instance. This is useful for calling its public API, which the example illustrates by tracing out the players buffer length. </td></tr> <tr><td style="width:80px"></td><td><a href="getting-started-basic-embed/auto-load-multi-video.html">auto-load-multi-video.html</a> - this example shows how to auto-embed multiple instances of dash.js players in a page. To make it more difficult, one of the available video elements specifies a non-DASH source. </td></tr> <tr><td style="width:80px"></td><td><a href="getting-started-basic-embed/manual-load-single-video.html">manual-load-single-video.html</a> - for the fullest embed control, go back to basics. This example shows how to instantiate and initialize a dash.js player without using any of the Dash.create() methods. Consider this the baseline embed example. </td></tr> <tr><td colspan="2">/ad-insertion</td></tr> <tr><td style="width:80px"></td><td><a href="ad-insertion/index.html">index.html</a> - Demonstration of different implementation approaches for advert insertion, specifically inband, inline and X-Link onLoad. Provided by Fraunhofer Fokus. </td></tr> <tr><td colspan="2">/captioning</td></tr> <tr><td style="width:80px"></td><td><a href="captioning/caption_vtt.html">caption_vtt.html</a> - example showing how content with VTT captions can be played back by the dash.js player. First captions appear at the 15s mark. </td></tr> <tr><td style="width:80px"></td><td><a href="captioning/multi-track-captions.html">multi-track-captions.html</a> - example showing content with multiple timed text tracks</td></tr> <tr><td style="width:80px"></td><td><a href="captioning/ttml-ebutt-sample.html">ttml-ebutt-sample.html</a> - example showing content with TTML EBU timed text tracks</td></tr> <tr><td colspan="2">/chromecast</td></tr> <tr><td style="width:80px"></td><td><a href="chromecast/index.html">index.html</a> - features both receiver and sender examples of chromecast integration. </td></tr> </table> <p/> <strong>Remote examples </strong> hosted on website and by contributors around the world. <table style="width:1000px"> <tr><td style="width:80px"></td><td><a href="http://mediapm.edgesuite.net/dash/public/support-player/current/index.html">Akamai debug player</a> - written on top of dash.js, this player is used by Akamai for reference playback and debugging of its customer's streams. It features a flexible dynamic charting solution, real-time filtering of the debug traces and a layout that adjusts for debugging on mobile devices as well as laptops/desktops.</td></tr> </table> </body> </html>
6,081
137.227273
754
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/captioning/ttml-ebutt-sample.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Multiple Language EBU Timed Text Sample</title> <meta name="description" content="" /> <link rel="stylesheet" href="../../contrib/akamai/controlbar/controlbar.css"> <script src="../../contrib/akamai/controlbar/ControlBar.js"></script> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> /* TEST CONTENT. http://vm2.dashif.org/dash/vod/testpic_2s/multi_subs.mpd http://vm2.dashif.org/dash/vod/testpic_2s/stpp_two_regions_multi_color.mpd http://vm2.dashif.org/livesimg//testpic_2s/multi_subs.mpd http://vm2.dashif.org/livesimg//testpic_2s/stpp_two_regions_multi_color.mpd */ var CAPTION_URL = "http://vm2.dashif.org/dash/vod/testpic_2s/multi_subs.mpd", videoElement, player; function startVideo() { var url = CAPTION_URL, TTMLRenderingDiv; videoElement = document.querySelector(".videoContainer video"); TTMLRenderingDiv = document.querySelector("#ttml-rendering-div"); player = dashjs.MediaPlayer().create(); player.initialize(videoElement, url, true); player.attachTTMLRenderingDiv(TTMLRenderingDiv); controlbar = new ControlBar(player); // Checkout ControlBar.js for more info on how to target/add text tracks to UI controlbar.initialize(); } </script> <style> video { width: 640px; height: 360px; } .videoContainer{ width: 640px; } </style> <body onload="startVideo()"> <div class="videoContainer"> <video preload="auto" autoplay="true" > </video> <div id="ttml-rendering-div"></div> <div id="videoController" class="video-controller unselectable"> <div id="playPauseBtn" class="btn-play-pause" title="Play/Pause"> <span id="iconPlayPause" class="icon-play"></span> </div> <span id="videoTime" class="time-display">00:00:00</span> <div id="fullscreenBtn" class="btn-fullscreen" title="Fullscreen"> <span class="icon-fullscreen-enter"></span> </div> <input type="range" id="volumebar" class="volumebar" value="1" min="0" max="1" step=".01" /> <div id="muteBtn" class="btn-mute" title="Mute"> <span id="iconMute" class="icon-mute-off"></span> </div> <div id="captionBtn" class="btn-caption" title="Closed Caption"> <span class="icon-caption"></span> </div> <span id="videoDuration" class="duration-display">00:00:00</span> <div class="seekContainer"> <input type="range" id="seekbar" value="0" class="seekbar" min="0" step="0.01"/> </div> </div> </div> </body> </html>
3,323
37.206897
127
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/captioning/multi-track-captions.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Multiple Language Timed Text Sample</title> <meta name="description" content="" /> <link rel="stylesheet" href="../../contrib/akamai/controlbar/controlbar.css"> <script src="../../contrib/akamai/controlbar/ControlBar.js"></script> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> var EXTERNAL_CAPTION_URL = "http://dash.edgesuite.net/dash264/TestCases/4b/qualcomm/1/ED_OnDemand_5SecSeg_Subtitles.mpd", // need to manually seek to get stream to start... issue with MPD but only sample with multi adaptations for external sidecar caption text xml FRAGMENTED_CAPTION_URL = "http://vm2.dashif.org/dash/vod/testpic_2s/multi_subs.mpd", videoElement, controlbar, player; function startVideo() { var url = FRAGMENTED_CAPTION_URL; videoElement = document.querySelector(".videoContainer video"); player = dashjs.MediaPlayer().create(); player.initialize(videoElement, url, true); controlbar = new ControlBar(player); // Checkout ControlBar.js for more info on how to target/add text tracks to UI controlbar.initialize(); } </script> <style> video { width: 640px; height: 360px; } .videoContainer{ width: 640px; } </style> <body onload="startVideo()"> <div class="videoContainer"> <video preload="auto" autoplay="true" > </video> <div id="videoController" class="video-controller unselectable"> <div id="playPauseBtn" class="btn-play-pause" title="Play/Pause"> <span id="iconPlayPause" class="icon-play"></span> </div> <span id="videoTime" class="time-display">00:00:00</span> <div id="fullscreenBtn" class="btn-fullscreen" title="Fullscreen"> <span class="icon-fullscreen-enter"></span> </div> <input type="range" id="volumebar" class="volumebar" value="1" min="0" max="1" step=".01" /> <div id="muteBtn" class="btn-mute" title="Mute"> <span id="iconMute" class="icon-mute-off"></span> </div> <div id="captionBtn" class="btn-caption" title="Closed Caption"> <span class="icon-caption"></span> </div> <span id="videoDuration" class="duration-display">00:00:00</span> <div class="seekContainer"> <input type="range" id="seekbar" value="0" class="seekbar" min="0" step="0.01"/> </div> </div> </div> </body> </html>
3,076
39.486842
272
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/captioning/caption_vtt.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>WebVTT Dash Demo</title> <meta name="description" content="" /> <link rel="icon" type="image/x-icon" href="http://dashif.org/wp-content/uploads/2014/12/dashif.ico" /> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> function startVideo() { var url = "http://dash.edgesuite.net/akamai/test/caption_test/ElephantsDream/elephants_dream_480p_heaac5_1.mpd", video = document.querySelector(".dash-video-player video"), player; player = dashjs.MediaPlayer({}).create(); player.initialize(video, url, true); } </script> <style> video { width: 640px; height: 360px; } </style> <body onload="startVideo()"> <div class="dash-video-player"> <video controls="true"></video> </div> </body> </html>
1,226
31.289474
124
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/modules/README.md
# dash.js Module Samples These samples give examples of how the dash.js library can be consumed in different module loaders. Each directory contains a standalone package with a build setup to run with `npm run build`. The result file will be placed in `out/out.js`. ## WebPack with Babel Loader If you are using [WebPack](https://webpack.github.io/) with the [Babel Loader](https://github.com/babel/babel-loader) and the [ES2015 Preset](https://babeljs.io/docs/plugins/preset-es2015/) you can consume the dash.js modules directly from source. To see an example of this check out the files in the `webpack` directory.
620
55.454545
129
md
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/inline.html
<!DOCTYPE html> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <head> <title>Fraunhofer Fokus - Ad Insertion Sample</title> <script src="../../dist/dash.all.min.js"></script> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fokus.png" class="img-responsive"></a></div> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fame.png" class="img-responsive "></a></div> </div> <div class="row"> <div class="col-md-4"> <h4>Post-Roll Ad-Insertion with DASH + W3C MediaSource Extensions + Inline Event MPD Reload</h4> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Working principle</h3> </div> <div class="panel-body"> <ol> <li>The server provides an MPD containing an InlineEventStream element on Period Level. The schmeIdUri and the value of the Eventstream are set according to ISO/IEC 23009-1 5.10.4.1.<br> <pre>&lt;EventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"&gt; &lt;Event presentationTime="5" id="1"/&gt; &lt;EventStream&gt;</pre> Additionally one segment contains an EMSG Box with the same schemeIdUri and the same value. </li> <li>During the playback the Client parses the inline event and schedules the MPD Reload.</li> <li>The new MPD contains an additional period with ad content, which will be played after 20 seconds </li> </ol> <img src="img/event_wf.png" class="img-responsive"> </div> </div> </div> <div class="col-md-8"> <video controls="true" id="vid" width="640" height="480"></video> </div> </div> <div class="row"> <div class="col-md-2"><p><a href="index.html">Back to selection</a></p></div> </div> </div> <script> (function () { $.get("http://se-mashup.fokus.fraunhofer.de:8080/getSession", function (data) { var url = "http://se-mashup.fokus.fraunhofer.de:8080/dash/assets/adinsertion-samples/events/inline/dash.mpd?sid=" + data.sessionID; var player = dashjs.MediaPlayer().create(); player.initialize(document.querySelector("#vid"), url, true); }) })(); </script> </body> </html>
3,144
45.940299
139
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/scte.html
<!DOCTYPE html> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <head> <title>Fraunhofer Fokus - Ad Insertion Sample</title> <script src="../../dist/dash.all.min.js"></script> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fokus.png" class="img-responsive"></a></div> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fame.png" class="img-responsive "></a></div> </div> <div class="row"> <div class="col-md-4"> <h4>App based ad insertion based on SCTE35 Inband events</h4> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Working principle</h3> </div> <div class="panel-body"> <p>During the playback of the main content, the DASH client transfers the SCTE35 inband events to an application that is registered for SCTE35 events. The application contacts the ad decision server through an interface like VAST in order to get the URL to an MPD that contains the ad content. This results in two different manifest files, one for the main content and one for the ad content. Hence the use of multiple periods is not required. When it is time to play the ad the app pauses the playback of the main content and starts the ad content on a second DASH client. After the ad is finished the client resumes the playback of the main content. Since two different DASH clients are involved, the playback typically also requires two video elements.</p> <p>This demo uses the DASH-IF DASH Live simulator and triggers an ad every two minutes with a duration of one minute. </p> <p><h4>Instructions</h4> <ul> <li> Please turn off your ad blocker if the ad is not shown correctly</li> <li> On mobile devices the playback may have to be started manually</li> </ul> </p> </div> </div> </div> <div class="col-md-8"> <video controls="true" id="vid" width="640" height="480"></video> <video controls id="vidAd" width="640" height="480" style=" display:none;"></video> </div> </div> <div class="row"> <div class="col-md-2"><p><a href="index.html">Back to selection</a></p></div> </div> </div> <script src="js/scte.js"></script> </body> </html>
3,315
51.634921
119
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/inband.html
<!DOCTYPE html> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <head> <title>Fraunhofer Fokus - Ad Insertion Sample</title> <script src="../../dist/dash.all.debug.js"></script> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fokus.png" class="img-responsive"></a></div> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fame.png" class="img-responsive "></a></div> </div> <div class="row"> <div class="col-md-4"> <h4>Post-Roll Ad-Insertion with DASH + W3C MediaSource Extensions + Inband Event MPD Reload</h4> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Working principle</h3> </div> <div class="panel-body"> <ol> <li>The server provides an MPD containing an InbandEventStream element on Period Level. The schmeIdUri and the value of the Eventstream are set according to ISO/IEC 23009-1 5.10.4.1.<br> <pre>&lt;InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/&gt;</pre> Additionally one segment contains an EMSG Box with the same schemeIdUri and the same value. </li> <li>During the playback the Client parses the EMSG Box, removes it from the segment and schedules the MPD Reload. </li> <li>The new MPD contains an additional period with ad content, which will be played after 20 seconds </li> </ol> <img src="img/event_wf.png" class="img-responsive"> </div> </div> </div> <div class="col-md-8"> <video controls="true" id="vid" width="640" height="480"></video> </div> </div> <div class="row"> <div class="col-md-2"><p><a href="index.html">Back to selection</a></p></div> </div> </div> <script> (function () { $.get("http://se-mashup.fokus.fraunhofer.de:8080/getSession", function (data) { var url = "http://se-mashup.fokus.fraunhofer.de:8080/dash/assets/adinsertion-samples/events/inband/dash.mpd?sid=" + data.sessionID; var player = dashjs.MediaPlayer().create(); player.initialize(document.querySelector("#vid"), url, true); }) })(); </script> </body> </html></title> </head> <body> </body> </html>
3,235
44.577465
139
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/xlink.html
<!DOCTYPE html> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <html lang="en"> <head> <meta charset="utf-8"/> <title>Dash JavaScript Player</title> <meta name="description" content=""/> <link rel="icon" type="image/x-icon" href="http://dashif.org/wp-content/uploads/2014/12/dashif.ico"/> <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no"> <link href="style.css" rel="stylesheet" type="text/css"/> <script src="../../dist/dash.all.debug.js"></script> <head> <title>Fraunhofer Fokus - Ad Insertion Sample</title> <script src="../../dist/dash.all.min.js"></script> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fokus.png" class="img-responsive"></a></div> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fame.png" class="img-responsive "></a></div> </div> <div class="row"> <div class="col-md-5"> <h4>XLink sample page</h4> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Working principle</h3> </div> <div class="panel-body"> Remote elements are elements that are not fully contained inside the manifest and can be resolved via XML Linking Language (XLink). Only a subset of the XLink specification is needed for DASH. In order to use XLink, two attributes namely “xlink:href” and “xlink:actuate” have to be included inside an element. While the former is used to specify an URL to the remote content, the latter defines the resolution time. This page gives an overview of different XLink resolution procedures with the xlink:actuate attribute set to "onLoad". To start a demo please click on a testcase. <div class="table-responsive"> <table class="table table-condensed"> <thead> <tr> <th>Testcase</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td class="tdcursor" id="xlink-two-per">Two periods</td> <td>Resolve two onLoad periods into two periods. <pre>&lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; &lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt;</pre> </td> </tr> <tr> <td class="tdcursor" id="xlink-three-per">Three periods</td> <td>Resolve three onLoad periods into three periods. <pre> &lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; &lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; &lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; </pre> </td> </tr> <tr> <td class="tdcursor" id="xlink-two-of-one">One period into two periods</td> <td>Resolve one onLoad period into two periods. <pre> &lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; </pre> </td> </tr> <tr> <td class="tdcursor" id="xlink-three-of-two">Two periods into three periods</td> <td>Resolve two onLoad periods into three periods. <pre> &lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; &lt;Period xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; </pre> </td> </tr> <tr> <td class="tdcursor" id="xlink-one-as">One adaptation</td> <td>Resolve one AdaptationSet into one AdaptationSet. <pre> &lt;Period&gt; &lt;AdaptationSet xlink:href="http://someurl" xlink:actuate="onLoad"&gt; &lt;Period/&gt; </pre> </td> </tr> <tr> <td class="tdcursor" id="xlink-one-ases">One adaptation one eventstream</td> <td>Resolve one AdapatationSet and one EventStream.<pre> &lt;Period&gt; &lt;AdaptationSet xlink:href="http://someurl" xlink:actuate="onLoad"&gt; &lt;EventStream xlink:href="http://someurl" xlink:actuate="onLoad"/&gt; &lt;Period/&gt; </pre> </td> </tr> </tbody> </table> </div> </div> </div> </div> <div class="col-md-7"> <video controls="true" id="vid" width="640" height="480"></video> </div> </div> <div class="row"> <div class="col-md-2"><p><a href="index.html">Back to selection</a></p></div> </div> </div> <script> (function () { var player = dashjs.MediaPlayer().create(); player.initialize(document.querySelector("#vid")); document.getElementById('xlink-two-per').addEventListener('click', function () { player.attachSource("http://dash.edgesuite.net/fokus/adinsertion-samples/xlink/twoperiods.mpd"); }); document.getElementById('xlink-three-per').addEventListener('click', function () { player.attachSource('http://dash.edgesuite.net/fokus/adinsertion-samples/xlink/threeperiods.mpd'); }); document.getElementById('xlink-two-of-one').addEventListener('click', function () { player.attachSource('http://dash.edgesuite.net/fokus/adinsertion-samples/xlink/twoperiods_of_one.mpd'); }); document.getElementById('xlink-three-of-two').addEventListener('click', function () { player.attachSource('http://dash.edgesuite.net/fokus/adinsertion-samples/xlink/threeperiods_of_two.mpd'); }); document.getElementById('xlink-one-as').addEventListener('click', function () { player.attachSource('http://dash.edgesuite.net/fokus/adinsertion-samples/xlink/singleas.mpd'); }); document.getElementById('xlink-one-ases').addEventListener('click', function () { player.attachSource('http://dash.edgesuite.net/fokus/adinsertion-samples/xlink/singleases.mpd'); }); })(); </script> </body> </html>
7,521
46.910828
119
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/index.html
<!DOCTYPE html> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <head> <title>Fraunhofer Fokus - Ad Insertion Sample</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fokus.png" class="img-responsive"></a></div> <div class="col-md-2"><a href="https://www.fokus.fraunhofer.de/go/fame"><img src="img/fame.png" class="img-responsive "></a></div> </div> <div class="row"> <div class="col-md-6"><h3>Ad Insertion Samples</h3></div> </div> <div class="row"> <div class="col-md-6"> <p>Demonstration of different implementation approaches for advert insertion using MPEG-DASH and W3C MediaSourceExtensions, based on the DASH-IF reference client. To start a sample please click on the description below.</p> <div class="list-group"> <a href="inband.html" class="list-group-item"> <h4 class="list-group-item-heading">Server side ad insertion - Inband MPD reload</h4> <p class="list-group-item-text">A sample application that uses inband Dash events to trigger an MPD reload.</p> </a> </div> <div class="list-group"> <a href="inline.html" class="list-group-item"> <h4 class="list-group-item-heading">Server side ad insertion - Inline MPD reload</h4> <p class="list-group-item-text">A sample application that uses inline Dash events to trigger an MPD reload.</p> </a> </div> <div class="list-group"> <a href="xlink.html" class="list-group-item"> <h4 class="list-group-item-heading">Server side ad insertion - XLink remote elements</h4> <p class="list-group-item-text">A sample application that uses XLink attributes to resolve the ad content.</p> </a> </div> <div class="list-group"> <a href="scte.html" class="list-group-item"> <h4 class="list-group-item-heading">App based ad insertion - Inband SCTE35 events</h4> <p class="list-group-item-text">A sample application that uses inband SCTE35 events to perform app based ad insertion.</p> </a> </div> <p> Samples were tested successfully in Chrome, Microsoft Edge. </p> Contact and further information about Fraunhofer FOKUS activities regarding DASH: <a href="http://www.fokus.fraunhofer.de/go/famium">http://www.fokus.fraunhofer.de/go/famium</a> </p> <p> More about FAME - Future Applications and Media: <a href="http://www.fokus.fraunhofer.de/go/fame">http://www.fokus.fraunhofer.de/go/fame</a> </p> </div> </div> </div> </body> </html>
3,554
46.4
119
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/style.css
html { margin: 0; padding: 0; background-color : #294f6b; } #pageContent { width : 1280px; height : 720px; position : absolute; top : 0px; left : 0px; background-image: url("images/121122_famium_inforaph_02_fwe.png"); background-image: url("images/background.png"); background-position : 0px 0px; background-repeat : no-repeat; } body { font-family: arial, helvetica, sans-serif; color: #666; } a { text-decoration: none; /*color: #0174A7;*/ color: #59b4d4; } a:hover { text-decoration: underline; } #videoContainer { position : absolute; left: 560px; top : 110px; } #outerChartdiv { /* background : #182f3f;*/ height:110px; width:600px; padding : 0px; color: white; margin-top : -5px; margin-bottom: 37px; } .dygraph-axis-label { color : white; } #chartdiv { height:120px; width:580px; } #btDown { position : relative; width : 116px; height: 68px; display: block; background-image: url("images/bitrate minus_passiv.png"); float: left; } #btDown:hover { background-image: url("images/bitrate minus_aktiv.png"); } #btUp { margin-left: 15px; width : 116px; height: 68px; display: block; float: left; background-image: url("images/bitrate plus_passiv.png"); } #btUp:hover { background-image: url("images/bitrate plus_aktiv.png"); } p { padding : 0; margin : 0; margin-bottom : 15px; } #info_area { position : absolute; top : 110px; left: 50px; color: #eee; } .big { font-size: 24px; } .xlink-item { cursor:pointer; color:#59b4d4; } pre {display: block; padding: 9.5px; margin: 0 0 10px; font-size: 10px; line-height: 1.428571429; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; }
1,940
14.780488
70
css
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/css/bootstrap.min.css
/*! * Bootstrap v3.3.6 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} /*# sourceMappingURL=bootstrap.min.css.map */
121,260
20,209.166667
121,049
css
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/ad-insertion/css/main.css
body { background-color : #294f6b; color:white; font-size: 14px; } a { color: #59b4d4; } a:hover { color: lightgrey; } .panel { color:black; } .xlink-item { cursor: pointer; color: #337ab7; } .tdcursor { cursor:pointer; color: #337ab7; }
281
9.846154
31
css
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/getting-started-basic-embed/auto-load-single-video.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Auto-player instantiation example, single videoElement</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <style> video { width: 640px; height: 360px; } </style> <body> <div> <video autoplay preload="none" controls="true"> <source src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" type="application/dash+xml"/> </video> </div> </body> </html>
824
29.555556
119
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/getting-started-basic-embed/listening-to-events.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Events example</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> var player,firstLoad = true; function init() { player = dashjs.MediaPlayer().create(); player.getDebug().setLogToBrowserConsole(false); } function showEvent(e) { log("EVENT RECEIVED: " + e.type); // We double process in order to pretty-print. Only two levels of object properties are exposed. for (var name in e) { if (typeof e[name] != 'object') { log(" " + name + ": " + e[name]); } } for (name in e) { if (typeof e[name] == 'object' ) { log(" " + name + ":"); for (name2 in e[name]) { log(" " + name2 + ": " + JSON.stringify(e[name][name2])); } } } } function log(msg) { msg = msg.length > 90 ? msg.substring(0, 90) + "..." : msg; // to avoid wrapping with large objects var tracePanel = document.getElementById("trace"); tracePanel.innerHTML += msg + "\n"; tracePanel.scrollTop = tracePanel.scrollHeight; console.log(msg); } function setListener(eventName) { player.on(dashjs.MediaPlayer.events[eventName],showEvent); var element = document.createElement("input"); element.type = "button"; element.id = eventName; element.value = "Remove " + eventName; element.onclick = function() { player.off(dashjs.MediaPlayer.events[eventName],showEvent); document.getElementById("eventHolder").removeChild(element); }; document.getElementById("eventHolder").appendChild(element); } function load(button) { // Add your own URL in here if you wish to epxlore events with other content. var url = "http://rdmedia.bbc.co.uk/dash/ondemand/testcard/1/client_manifest-events.mpd"; if (!firstLoad) { player.attachSource(url); } else { firstLoad = false; button.value = "RELOAD PLAYER"; player.initialize(document.querySelector("video"), url, true); } document.getElementById("trace").innerHTML = ""; } </script> <style> video { width: 640px; height: 360px; } textarea { width: 500px; height:360px; font-size: 10px; } input, select { background-color: orange; } </style> <body onload="init()"> <div> This sample allows you to explore the various external events that are accessible from MediaPlayer. Events can be dynamically added and removed. <br/> Choose the events you would like to monitor before starting playback: <select id="availableEvents" onChange="setListener(this.options[this.selectedIndex].text)"> <option selected disabled>Select an event ..</option> <option>BUFFER_EMPTY</option> <option>BUFFER_LOADED</option> <option>CAN_PLAY</option> <option>ERROR</option> <option>LOG</option> <option>MANIFEST_LOADED</option> <option>METRIC_ADDED</option> <option>METRIC_CHANGED</option> <option>METRIC_UPDATED</option> <option>METRICS_CHANGED</option> <option>PERIOD_SWITCH_COMPLETED</option> <option>PERIOD_SWITCH_STARTED</option> <option>PLAYBACK_ENDED</option> <option>PLAYBACK_ERROR</option> <option>PLAYBACK_METADATA_LOADED</option> <option>PLAYBACK_PAUSED</option> <option>PLAYBACK_PLAYING</option> <option>PLAYBACK_PROGRESS</option> <option>PLAYBACK_RATE_CHANGED</option> <option>PLAYBACK_SEEKED</option> <option>PLAYBACK_SEEKING</option> <option>PLAYBACK_STARTED</option> <option>PLAYBACK_TIME_UPDATED</option> <option>STREAM_INITIALIZED</option> <option>TEXT_TRACK_ADDED</option> <option>TEXT_TRACKS_ADDED</option> </select> <p/> <input type="button" value="LOAD PLAYER" onclick="load(this)"/> </div> <div> <video controls="true"> </video> <textarea id="trace" placeholder="Trapped events will be displayed here"></textarea> <p/> <span id="eventHolder">Events actively being listened to are shown below. Remove the listener by clicking on the event button.<br/></span> </div> </body> </html>
5,350
35.401361
158
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/getting-started-basic-embed/auto-load-single-video-src.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Auto-player instantiation example, single videoElement, using src attribute</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <style> video { width: 640px; height: 360px; } </style> <body> <div> <video data-dashjs-player autoplay src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" controls="true"/> </div> </body> </html>
775
30.04
130
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/getting-started-basic-embed/auto-load-single-video-with-reference.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Auto-player instantiation example, showing how to obtain a reference to the MediaPlayer</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> var player; function init() { player = dashjs.MediaPlayerFactory.create(document.querySelector(".dashjs-player")); setInterval(updateStats,500) } function updateStats() { document.querySelector("#stats").innerHTML = "Buffer level " + player.getBufferLength() + "s"; } </script> <style> video { width: 640px; height: 360px; } </style> </head> <body onload="init()"> <div> <video class="dashjs-player" autoplay controls> <source src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" type="application/dash+xml"/> </video> </div> <div> <span id="stats"/> </div> </body> </html>
1,334
28.666667
119
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/getting-started-basic-embed/manual-load-single-video.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Manual-player instantiation example</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> function init() { var video, player, url = "http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd"; video = document.querySelector("video"); player = dashjs.MediaPlayer().create(); player.initialize(video, url, true); } </script> <style> video { width: 640px; height: 360px; } </style> <body onload="init()"> <div> <video controls="true"> </video> </div> </body> </html>
1,028
26.078947
118
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/getting-started-basic-embed/auto-load-multi-video.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Auto-player instantiation example</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <style> video { width: 320px; height: 180px; } </style> <body> <div> <video autoplay controls> <source src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" type="application/dash+xml"/> </video> <br/>This is a dash.js player that should autostart<p/> </div> <div> <video autoplay controls="true"> <source src="http://mediapm.edgesuite.net/ovp/content/test/video/spacealonehd_sounas_640_300.mp4" type="video/mp4"/> </video> <br/>This is a standard mp4 (non-dash)<p/> </div> <div> <video poster="http://mediapm.edgesuite.net/will/dash/temp/poster.png" controls="true"> <source src="http://dash.edgesuite.net/digitalprimates/fraunhofer/480p_video/heaac_2_0_with_video/Sintel/sintel_480p_heaac2_0.mpd" type="application/dash+xml"/> </video> <br/>This is a dash.js player that should not autostart<p/> </div> <div> <video data-dashjs-player autoplay src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" controls="true"> </video> <br/>This is a dash.js player that where the manifest is defined via the src attribute of the video element. </div> </body> </html>
1,832
39.733333
176
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/getting-started-basic-embed/auto-load-single-video-with-context-and-source.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Auto-player instantiation example, single videoElement, supplying context and source</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> function init() { var player, video, source, context; // Example specifying only the video element, where the video element has a child source element video = document.querySelector("#video1"); player = dashjs.MediaPlayerFactory.create(video); // Example specifying only the video element, where the video element has a src attribute video = document.querySelector("#video2"); player = dashjs.MediaPlayerFactory.create(video); //Example adding video and source video = document.querySelector("#video3"); source = document.createElement("source"); source.src = "http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd"; source.type = "application/dash+xml"; player = dashjs.MediaPlayerFactory.create(video, source); //Example adding video, source and context video = document.querySelector("#video4"); source = document.createElement("source"); source.src = "http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd"; source.type = "application/dash+xml"; context = {} player = dashjs.MediaPlayerFactory.create(video, source, context); } </script> <style> video { width: 320px; height: 180px; } </style> <body onload="init()"> <div> <video id="video1" autoplay controls="true"> <source src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" type="application/dash+xml"/> </video> <p/> <video id="video2" autoplay src="http://dash.edgesuite.net/envivio/EnvivioDash3/manifest.mpd" controls="true"/> <p/> <video id="video3" autoplay controls="true"> </video> <p/> <video id="video4" autoplay controls="true"> </video> </div> </body> </html>
2,585
37.597015
123
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/live-streaming/live-delay-comparison-custom-manifest.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Live delay example</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> var player,firstLoad = true; function init() { setInterval( function() { if (player && player.isReady()) { var d = new Date(); var seconds = d.getSeconds(); document.querySelector("#sec").innerHTML = ( seconds < 10 ? "0" : "" ) + seconds; var minutes = d.getMinutes(); document.querySelector("#min").innerHTML = ( minutes < 10 ? "0" : "" ) + minutes; document.querySelector("#videoDelay").innerHTML = Math.round((d.getTime()/1000) - Number(player.timeAsUTC())); document.querySelector("#videoBuffer").innerHTML = player.getBufferLength()+ "s"; } },1000); } function load(button) { if (!firstLoad) { player.reset(); } firstLoad = false; var url = document.getElementById("manifest").value; player = dashjs.MediaPlayer().create(); player.getDebug().setLogToBrowserConsole(false); switch (document.querySelector('input[name="delay"]:checked').value) { case "segments": player.setLiveDelayFragmentCount(document.querySelector("#delayInFragments").value); break; case "time": player.setLiveDelay(document.querySelector("#delayInSeconds").value); break; } player.initialize(document.querySelector("video"), url, true); } function delaySelect(obj) { switch (obj.value) { case "default": document.querySelector("#fragmentsEntry").style.display = "none"; document.querySelector("#secondsEntry").style.display = "none"; break; case "segments": document.querySelector("#fragmentsEntry").style.display = "inline"; document.querySelector("#secondsEntry").style.display = "none"; break; case "time": document.querySelector("#fragmentsEntry").style.display = "none"; document.querySelector("#secondsEntry").style.display = "inline"; break; } } </script> <style> video { width: 640px; height: 360px; } #manifest { width:300px; } #loadButton { background-color: orange; } .clock { color:#000; font-size: 40pt } #fragmentsEntry,#secondsEntry { position:relative; display: none; width:50px; } #delayInFragments,#delayInSeconds { width:50px; } </style> <body onload="init()"> This sample allows you to explore the two MediaPlayer APIS which control live delay - setLiveDelay and setLiveDelayFragmentCount.<br/> The first takes the desired delay in seconds. The second takes the delay in terms of fragment count. If you use both together, setLiveDelay <br/> will take priority. If you set neither, the default delay of 4 segment durations will be used. Note that using either method will not result in the <br/> offset exactly matching the requested setings. The final achieved delay is a function of the segment duration, when the stream is requested <br/>with respect to the segment boundaries, as well as the amount of data the source buffers need to begin decoding. <p/> Enter the URL to a live (dynamic) stream manifest : <input id="manifest" type="text" value="http://vm2.dashif.org/livesim/testpic_2s/Manifest.mpd"/><br/> <form> Set the live delay at stream start-up using one of the three possible methods:<br/> <input type="radio" onclick="delaySelect(this)" name="delay" value="default" checked> Default<br/> <input type="radio" onclick="delaySelect(this)" name="delay" value="segments"> Fragment Count<br/> <div id="fragmentsEntry"> Enter the desired value for setLiveDelayFragmentCount in number of fragments <input id="delayInFragments" type="text"/> <br/> </div> <input type="radio" onclick="delaySelect(this)" name="delay" value="time"> Time in seconds<br/> <div id="secondsEntry"> Enter the desired value for setLiveDelay in seconds <input id="delayInSeconds" type="text"/><br/> </div> <p/> <input id="loadButton" type="button" value="LOAD PLAYER" onclick="load(this)"/> <p/> </form> <div> <video controls="true"> </video> <p/> Playhead seconds behind live: <span id="videoDelay"></span><br/> Buffer length: <span id="videoBuffer"></span> <div>Wall clock time <div class="clock"> <span id="min"> </span>:<span id="sec"></span> </div> </div> </div> </body> </html>
5,422
40.396947
178
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/live-streaming/live-delay-comparison-using-setLiveDelay.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Live delay comparison using setLiveDelay</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> function init() { var player1,player2,player3,player4,player5,player6, video; var MPD_2S_SEGMENTS = "http://vm2.dashif.org/livesim/testpic_2s/Manifest.mpd"; var MPD_6S_SEGMENTS = "http://vm2.dashif.org/livesim/testpic_6s/Manifest.mpd"; video = document.querySelector("#video1"); player1 = dashjs.MediaPlayer().create(); player1.initialize(video,MPD_2S_SEGMENTS ,true); player1.setLiveDelay(2); video = document.querySelector("#video2"); player2 = dashjs.MediaPlayer().create(); player2.initialize(video,MPD_2S_SEGMENTS ,true); player2.setLiveDelay(4); video = document.querySelector("#video3"); player3 = dashjs.MediaPlayer().create(); player3.initialize(video,MPD_2S_SEGMENTS ,true); player3.setLiveDelay(8); video = document.querySelector("#video4"); player4 = dashjs.MediaPlayer().create(); player4.initialize(video,MPD_6S_SEGMENTS ,true); player4.setLiveDelay(6); video = document.querySelector("#video5"); player5 = dashjs.MediaPlayer().create(); player5.initialize(video,MPD_6S_SEGMENTS ,true); player5.setLiveDelay(12); video = document.querySelector("#video6"); player6 = dashjs.MediaPlayer().create(); player6.initialize(video,MPD_6S_SEGMENTS ,true); player6.setLiveDelay(24); setInterval( function() { var d = new Date(); var seconds = d.getSeconds(); document.querySelector("#sec").innerHTML = ( seconds < 10 ? "0" : "" ) + seconds; var minutes = d.getMinutes(); document.querySelector("#min").innerHTML = ( minutes < 10 ? "0" : "" ) + minutes; for (var i=1;i < 7;i++) { var p = eval("player"+i); document.querySelector("#video" + i + "delay").innerHTML = Math.round((d.getTime()/1000) - Number(p.timeAsUTC())); document.querySelector("#video" + i + "buffer").innerHTML = p.getBufferLength()+ "s"; } },1000); } </script> <style> table { border-spacing: 10px; } video { width: 320px; height: 180px; } .clock { border:1px solid #333; color:#000; font-size: 60pt} </style> </head> <body onload="init()"> This sample illustrates the combined effects of segment duration and the "<strong>setLiveDelay</strong>" MediaPlayer method on the latency of live stream playback. The upper layer of videos are all playing a live stream with 2s segment duration, with setLiveDelay values of 2s, 4s, and 8s. The lower layer use 6s segment duration, with setLiveDelay values of 6s, 12s, and 24s. Lowest latency is achieved with shorter segments and with a lower live delay value. Higher stability/robustness is achieved with a higher live delay which allows a larger forward buffer. <table> <tr><td> 2s segment, 2s target latency<br/> <video id="video1" controls="true"> </video><br/> Seconds behind live: <span id="video1delay"></span><br/> Buffer length: <span id="video1buffer"></span> </td><td> 2s segment, 4s target latency<br/> <video id="video2" controls="true"> </video><br/> Seconds behind live: <span id="video2delay"></span><br/> Buffer length: <span id="video2buffer"></span> </td><td> 2s segment, 8s target latency<br/> <video id="video3" controls="true"> </video><br/> Seconds behind live: <span id="video3delay"></span><br/> Buffer length: <span id="video3buffer"></span> </td> <td>Wall clock time <div class="clock"> <span id="min"> </span>:<span id="sec"></span> </div> </td></tr> <tr><td> 6s segment, 6s target latency<br/> <video id="video4" controls="true"> </video><br/> Seconds behind live: <span id="video4delay"></span><br/> Buffer length: <span id="video4buffer"></span> </td><td> 6s segment, 12s target latency<br/> <video id="video5" controls="true"> </video><br/> Seconds behind live: <span id="video5delay"></span><br/> Buffer length: <span id="video5buffer"></span> </td><td> 6s segment, 24s target latency<br/> <video id="video6" controls="true"> </video><br/> Seconds behind live: <span id="video6delay"></span><br/> Buffer length: <span id="video6buffer"></span> </td></tr> </table> </body> </html>
5,917
43.164179
236
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/live-streaming/live-delay-comparison-using-fragmentCount.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title>Live delay comparison using setLiveDelayFragmentCount</title> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <script> function init() { var player1,player2,player3,player4,player5,player6, video; var MPD_2S_SEGMENTS = "http://vm2.dashif.org/livesim/testpic_2s/Manifest.mpd"; var MPD_6S_SEGMENTS = "http://vm2.dashif.org/livesim/testpic_6s/Manifest.mpd"; video = document.querySelector("#video1"); player1 = dashjs.MediaPlayer().create(); player1.initialize(video,MPD_2S_SEGMENTS ,true); player1.setLiveDelayFragmentCount(0); video = document.querySelector("#video2"); player2 = dashjs.MediaPlayer().create(); player2.initialize(video,MPD_2S_SEGMENTS ,true); player2.setLiveDelayFragmentCount(2); video = document.querySelector("#video3"); player3 = dashjs.MediaPlayer().create(); player3.initialize(video,MPD_2S_SEGMENTS ,true); player3.setLiveDelayFragmentCount(4); video = document.querySelector("#video4"); player4 = dashjs.MediaPlayer().create(); player4.initialize(video,MPD_6S_SEGMENTS ,true); player4.setLiveDelayFragmentCount(0); video = document.querySelector("#video5"); player5 = dashjs.MediaPlayer().create(); player5.initialize(video,MPD_6S_SEGMENTS ,true); player5.setLiveDelayFragmentCount(2); video = document.querySelector("#video6"); player6 = dashjs.MediaPlayer().create(); player6.initialize(video,MPD_6S_SEGMENTS ,true); player6.setLiveDelayFragmentCount(4); setInterval( function() { var d = new Date(); var seconds = d.getSeconds(); document.querySelector("#sec").innerHTML = ( seconds < 10 ? "0" : "" ) + seconds; var minutes = d.getMinutes(); document.querySelector("#min").innerHTML = ( minutes < 10 ? "0" : "" ) + minutes; for (var i=1;i < 7;i++) { var p = eval("player"+i); document.querySelector("#video" + i + "delay").innerHTML = Math.round((d.getTime()/1000) - Number(p.timeAsUTC())); document.querySelector("#video" + i + "buffer").innerHTML = p.getBufferLength()+ "s"; } },1000); } </script> <style> table { border-spacing: 10px; } video { width: 320px; height: 180px; } .clock { border:1px solid #333; color:#000; font-size: 60pt} </style> </head> <body onload="init()"> This sample illustrates the combined effects of segment duration and the "<strong>setLiveDelayFragmentCount</strong>" MediaPlayer method on the latency of live stream playback. The upper layer of videos are all playing a live stream with 2s segment duration. The lower layer use 6s segment duration. For each stream, the playback position behind live is varied between 0, 2 and 4 segments. Note that the default value for dash.js is 4 segments, which is a trade off between stability and latency. Lowest latency is achieved with shorter segments and with a lower liveDelayFragmentCount. Higher stability/robustness is achieved with a higher liveDelayFragmentCount. <table> <tr><td> 2s segment, 0 segments behind live<br/> <video id="video1" controls="true"> </video><br/> Seconds behind live: <span id="video1delay"></span><br/> Buffer length: <span id="video1buffer"></span> </td><td> 2s segment, 2 segments behind live<br/> <video id="video2" controls="true"> </video><br/> Seconds behind live: <span id="video2delay"></span><br/> Buffer length: <span id="video2buffer"></span> </td><td> 2s segment, 4 segments behind live (default)<br/> <video id="video3" controls="true"> </video><br/> Seconds behind live: <span id="video3delay"></span><br/> Buffer length: <span id="video3buffer"></span> </td> <td>Wall clock time <div class="clock"> <span id="min"> </span>:<span id="sec"></span> </div> </td></tr> <tr><td> 6s segment, 0 segments behind live<br/> <video id="video4" controls="true"> </video><br/> Seconds behind live: <span id="video4delay"></span><br/> Buffer length: <span id="video4buffer"></span> </td><td> 6s segment, 2 segments behind live<br/> <video id="video5" controls="true"> </video><br/> Seconds behind live: <span id="video5delay"></span><br/> Buffer length: <span id="video5buffer"></span> </td><td> 6s segment, 4 segments behind live (default)<br/> <video id="video6" controls="true"> </video><br/> Seconds behind live: <span id="video6delay"></span><br/> Buffer length: <span id="video6buffer"></span> </td></tr> </table> </body> </html>
6,171
44.718519
180
html
cba-pipeline-public
cba-pipeline-public-master/containernet/ndn-containers/dash.js/samples/dash-if-reference-player/index.html
<!DOCTYPE html> <html ng-app="DashPlayer" lang="en"> <head> <meta charset="utf-8"/> <title>Dash JavaScript Player</title> <meta name="description" content="" /> <link rel="icon" type="image/x-icon" href="http://dashif.org/wp-content/uploads/2014/12/dashif.ico" /> <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no"> <link rel="stylesheet" href="app/lib/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="app/lib/bootstrap/css/bootstrap-glyphicons.css"> <link rel="stylesheet" href="app/lib/angular.treeview/css/angular.treeview.css"> <link rel="stylesheet" href="app/css/main.css"> <link rel="stylesheet" href="../../contrib/akamai/controlbar/controlbar.css"> <!-- http://jquery.com/ --> <script src="app/lib/jquery/jquery-1.10.2.min.js"></script> <!-- http://angularjs.org/ --> <script src="app/lib/angular/angular.min.js"></script> <script src="app/lib/angular/angular-resource.min.js"></script> <!-- http://getbootstrap.com/ --> <script src="app/lib/bootstrap/js/bootstrap.min.js"></script> <!-- https://github.com/madebyhiro/codem-isoboxer --> <!--<script src="../../externals/iso_boxer.min.js"></script>--> <!-- http://bannister.us/weblog/2007/06/09/simple-base64-encodedecode-javascript/ --> <!--<script src="../../externals/base64.js"></script>--> <!-- Misc Libs --> <!--<script src="../../externals/xml2json.js"></script>--> <!--<script src="../../externals/objectiron.js"></script>--> <!-- http://www.flotcharts.org/ --> <script src="app/lib/flot/jquery.flot.js"></script> <!-- https://github.com/eu81273/angular.treeview --> <script src="app/lib/angular.treeview/angular.treeview.min.js"></script> <script src="../../dist/dash.all.debug.js"></script> <!--dash.all.min.js should be used in production over dash.all.debug.js Debug files are not compressed or obfuscated making the file size much larger compared with dash.all.min.js--> <!--<script src="../../dist/dash.all.min.js"></script>--> <!-- App --> <script src="app/metrics.js"></script> <script src="../../contrib/akamai/controlbar/ControlBar.js"></script> <script src="app/main.js"></script> </head> <body ng-controller="DashController"> <div class="modal fade" id="streamModal"> <div class="modal-dialog"> <div class="list-group modal-list"> <a ng-repeat="item in availableStreams" href="#" class="list-group-item" ng-click="setStream(item)" data-dismiss="modal"> {{item.name}} </a> </div> </div> </div> <div class="container"> <div class="row title-header"> <a href="http://dashif.org/" target="_blank"><img class="image" src="app/img/if.png"/></a> <span id="big-title">Reference Client</span> <span>{{version}}</span> <div class="github"> <iframe id="star-button" src="http://ghbtns.com/github-btn.html?user=Dash-Industry-Forum&repo=dash.js&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" allowTransparency="true" class="hidden-xs github-button"> </iframe> <iframe id="fork-button" src="http://ghbtns.com/github-btn.html?user=Dash-Industry-Forum&repo=dash.js&type=fork&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" allowTransparency="true github-button"> </iframe> </div> </div> <div class="row"> <div class="input-group"> <div class="input-group-btn"> <a role="button" data-toggle="dropdown" class="btn btn-primary" data-target="#" href="/page.html"> Sample Streams <span class="caret"></span> </a> <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu"> <li class="dropdown-submenu" ng-if="item.submenu" ng-repeat="item in availableStreams"> <a tabindex="-1" href="#">{{item.name}}</a> <ul class="dropdown-menu"> <li ng-repeat="subitem in item.submenu"> <a ng-click="setStream(subitem)">{{subitem.name}}</a> </li> </ul> </li> </ul> </div> <input type="text" class="form-control" placeholder="Enter your manifest URL here" ng-model="selectedItem.url"> <span class="input-group-btn"> <button class="btn btn-primary" type="button" ng-click="doLoad()">Load</button> </span> </div> </div> <div class="row"> <div class="dash-video-player col-md-9"> <div id="videoContainer"> <video controls="true"></video> <div id="video-caption"></div> <div id="videoController" class="video-controller unselectable"> <div id="playPauseBtn" class="btn-play-pause" title="Play/Pause"> <span id="iconPlayPause" class="icon-play"></span> </div> <span id="videoTime" class="time-display">00:00:00</span> <div id="fullscreenBtn" class="btn-fullscreen" title="Fullscreen"> <span class="icon-fullscreen-enter"></span> </div> <input type="range" id="volumebar" class="volumebar" value="1" min="0" max="1" step=".01" /> <div id="muteBtn" class="btn-mute" title="Mute"> <span id="iconMute" class="icon-mute-off"></span> </div> <div id="captionBtn" class="btn-caption" title="Closed Caption"> <span class="icon-caption"></span> </div> <span id="videoDuration" class="duration-display">00:00:00</span> <div class="seekContainer"> <input type="range" id="seekbar" value="0" class="seekbar" min="0" step="0.01"/> </div> </div> </div> </div> <div class="col-md-3"> <div class="panel"> <div class="panel-heading panel-top"> <span class="panel-title">ABR</span> <div class="btn-group"> <button type="button" class="btn btn-default" ng-class="{active:abrEnabled == false}" ng-click="setAbrEnabled(false)"> <span>Off</span> </button> <button type="button" class="btn btn-default active" ng-class="{active:abrEnabled == true}" ng-click="setAbrEnabled(true)"> <span>On</span> </button> </div> </div> <div class="panel-heading panel-top"> <span class="panel-title">Save settings</span> <div class="btn-group"> <button type="button" class="btn btn-default" ng-class="{active:mediaSettingsCacheEnabled == false}" ng-click="setMediaSettingsCacheEnabled(false)"> <span>Off</span> </button> <button type="button" class="btn btn-default active" ng-class="{active:mediaSettingsCacheEnabled == true}" ng-click="setMediaSettingsCacheEnabled(true)"> <span>On</span> </button> </div> </div> <div class="panel-heading panel-top"> <span class="panel-title">Use BOLA</span> <div class="btn-group"> <button type="button" class="btn btn-default active" ng-class="{active:bolaEnabled == false}" ng-click="setBolaEnabled(false)"> <span>Off</span> </button> <button type="button" class="btn btn-default" ng-class="{active:bolaEnabled == true}" ng-click="setBolaEnabled(true)"> <span>On</span> </button> </div> </div> </div> <div class="panel"> <div class="panel-heading panel-top"> <span class="panel-title">Video</span> <div class="btn-group"> <button type="button" class="btn btn-default" ng-click="abrDown('video')"> <span class="glyphicon glyphicon-minus"></span> </button> <button type="button" class="btn btn-default" ng-click="abrUp('video')"> <span class="glyphicon glyphicon-plus"></span> </button> </div> </div> <div class="panel-body panel-stats"> <p class="text-warning">{{videoBitrate}} kbps</p> <p class="text-primary">Rep Index: <span class="text-success">{{videoIndex}}</span><span class="text-warning">{{videoPendingIndex}}</span>/<span class="text-success">{{videoMaxIndex}}</span></p> <p class="text-primary">Buffer Length: <span class="text-success">{{videoBufferLength}}</span></p> <p class="text-primary">Latency: <span class="text-success">last {{videoRatioCount}} segments</span></p> <p class="text-success" title="[low] < [average] < [high]">{{videoLatency}}</p> <p class="text-primary">Download: <span class="text-success">last {{videoRatioCount}} segments</span></p> <p class="text-success" title="[low] < [average] < [high]">{{videoDownload}}</p> <p class="text-primary">Ratio: <span class="text-success">last {{videoRatioCount}} segments</span></p> <p class="text-success" title="[low] < [average] < [high]">{{videoRatio}}</p> <p class="text-primary">Dropped Frames: <span class="text-success">{{videoDroppedFrames}}</span></p> </div> <ul class="nav nav-tabs"> <li class="dropdown"> <a href="#" id="videoTracksDropdown" class="dropdown-toggle" data-toggle="dropdown">Tracks <b class="caret"></b></a> <ul class="dropdown-menu" role="menu"> <li ng-repeat="track in availableTracks.video" ng-click="switchTrack(track, 'video')"> <a>lang: {{track.lang || "undefined"}}, viewpoint: {{track.viewpoint || "undefined"}}, roles: {{track.roles || "undefined"}}</a> </li> </ul> </li> <li class="dropdown"> <a href="#" id="videoTrackSwitchModeDropdown" class="dropdown-toggle" data-toggle="dropdown">Track switch mode<b class="caret"></b></a> <ul class="dropdown-menu" role="menu"> <li ng-click="changeTrackSwitchMode('alwaysReplace', 'video')"><a>always replace</a></li> <li ng-click="changeTrackSwitchMode('neverReplace', 'video')"><a>never replace</a></li> </ul> </li> <input type="text" class="form-control" placeholder="initial role, e.g. 'alternate'" ng-model="initialSettings.video"> </ul> </div> <div class="panel"> <div class="panel-heading panel-top"> <span class="panel-title">Audio</span> <div class="btn-group"> <button type="button" class="btn btn-default" ng-click="abrDown('audio')"> <span class="glyphicon glyphicon-minus"></span> </button> <button type="button" class="btn btn-default" ng-click="abrUp('audio')"> <span class="glyphicon glyphicon-plus"></span> </button> </div> </div> <div class="panel-body panel-stats"> <p class="text-warning">{{audioBitrate}} kbps</p> <p class="text-primary">Rep Index: <span class="text-success">{{audioIndex}}</span><span class="text-warning">{{audioPendingIndex}}</span>/<span class="text-success">{{audioMaxIndex}}</span></p> <p class="text-primary">Buffer Length: <span class="text-success">{{audioBufferLength}}</span></p> <p class="text-primary">Latency: <span class="text-success">last {{audioLatencyCount}} segments</span></p> <p class="text-success" title="[low] < [average] < [high]">{{audioLatency}}</p> <p class="text-primary">Download: <span class="text-success">last {{audioDownloadCount}} segments</span></p> <p class="text-success" title="[low] < [average] < [high]">{{audioDownload}}</p> <p class="text-primary">Ratio: <span class="text-success">last {{audioRatioCount}} segments</span></p> <p class="text-success" title="[low] < [average] < [high]">{{audioRatio}}</p> </div> <ul class="nav nav-tabs"> <li class="dropdown"> <a href="#" id="audioTracksDropdown" class="dropdown-toggle" data-toggle="dropdown">Tracks <b class="caret"></b></a> <ul class="dropdown-menu" role="menu"> <li ng-repeat="track in availableTracks.audio" ng-click="switchTrack(track, 'audio')"> <a>lang: {{track.lang || "undefined"}}, viewpoint: {{track.viewpoint || "undefined"}}, roles: {{track.roles || "undefined"}}</a> </li> </ul> </li> <li class="dropdown"> <a href="#" id="audioTrackSwitchModeDropdown" class="dropdown-toggle" data-toggle="dropdown">Track switch mode<b class="caret"></b></a> <ul class="dropdown-menu" role="menu"> <li ng-click="changeTrackSwitchMode('alwaysReplace', 'audio')"><a>always replace</a></li> <li ng-click="changeTrackSwitchMode('neverReplace', 'audio')"><a>never replace</a></li> </ul> </li> <input type="text" class="form-control" placeholder="initial lang, e.g. 'en'" ng-model="initialSettings.audio"> </ul> </div> </div> </div> <div class="row"> <div class="panel"> <div class="panel-heading panel-top"> <span class="panel-title">Charts</span> <div class="btn-group"> <button type="button" class="btn btn-default" ng-class="{active:showCharts == false}" ng-click="setCharts(false)"> Hide </button> <button type="button" class="btn btn-default" ng-class="{active:showCharts == true}" ng-click="setCharts(true)"> Show </button> </div> </div> <div ng-switch on="showCharts"> <div class="panel-body panel-stats" ng-switch-when="true"> <ul class="nav nav-tabs"> <li><a href="#bufferLevel" data-toggle="tab" ng-click="setBufferLevelChart(true)">Buffer level</a></li> <li><a href="#manifestInfo" data-toggle="tab">Manifest update info</a></li> </ul> <div id="chartTabContent" class="tab-content"> <div class="tab-pane" id="bufferLevel" ng-class="{active:showBufferLevel == true}"> <div ng-switch on="showBufferLevel"> <div class="panel-body panel-stats" ng-switch-when="true"> <chart ng-model="bufferData"></chart> </div> </div> </div> <div class="tab-pane" id="manifestInfo"> <div> <div ng-repeat="info in manifestUpdateInfo" class="manifest-info-box manifest-info-item"> <div class="manifest-info-content" header="Manifest type"><span class="text-success">{{info.type}}</span></div><br/> <div class="manifest-info-content" header="Request time (delta)"><span class="text-success">{{info.requestTime}}</span><span class="text-warning"> {{info.requestTimeDelta}}</span></div><br/> <div class="manifest-info-content" header="Fetch time (delta)"><span class="text-success">{{info.fetchTime}}</span><span class="text-warning"> {{info.fetchTimeDelta}}</span></div><br/> <div class="manifest-info-content" header="Availability start time (delta)"><span class="text-success">{{info.availabilityStartTime}}</span><span class="text-warning"> {{info.availabilityStartTimeDelta}}</span></div><br/> <div class="manifest-info-content" header="Presentation start time (delta)"><span class="text-success">{{info.presentationStartTime}}</span><span class="text-warning"> {{info.presentationStartTimeDelta}}</span></div><br/> <div class="manifest-info-content" header="Client time offset (delta)"><span class="text-success">{{info.clientTimeOffset}}</span><span class="text-warning"> {{info.clientTimeOffsetDelta}}</span></div><br/> <div class="manifest-info-content" header="Current time (delta)"><span class="text-success">{{info.currentTime}}</span><span class="text-warning"> {{info.currentTimeDelta}}</span></div><br/> <div class="manifest-info-content" header="Latency (delta)"><span class="text-success">{{info.latency}}</span><span class="text-warning"> {{info.latencyDelta}}</span></div><br/> <div class="repeat-container" ng-repeat="stream in info.streamInfo"> <div class="manifest-info-content" header="Period"><span class="text-success">{{stream.index}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Id"><span class="text-success">{{stream.id}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Start"><span class="text-success">{{stream.start}}</span><span class="text-warning"> {{stream.startDelta}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Duration"><span class="text-success">{{stream.duration}}</span><span class="text-warning"> {{stream.durationDelta}}</span></div><br/> <div class="repeat-container" ng-repeat="range in info.buffered"> <div class="manifest-info-content" header="Buffered"><span class="text-success"></span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Start"><span class="text-success">{{range.start}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="End"><span class="text-success">{{range.end}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Size"><span class="text-success">{{range.size}}</span></div><br/> </div> <div class="repeat-container" ng-repeat="track in info.trackInfo" ng-show="track.streamIndex == stream.index"> <div class="manifest-info-content" header="Representation"><span class="text-success">{{track.index}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Id"><span class="text-success">{{track.id}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Stream type"><span class="text-success">{{track.mediaType}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Presentation time offset"><span class="text-success">{{track.presentationTimeOffset}}</span><span class="text-warning"> {{track.presentationTimeOffsetDelta}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Start number"><span class="text-success">{{track.startNumber}}</span><span class="text-warning"> {{track.startNumberDelta}}</span></div><br/> <div class="manifest-info-content manifest-nested-info" header="Segment info type"><span class="text-success">{{track.fragmentInfoType}}</span></div><br/> </div> </div> </div> <span ng-show="manifestUpdateInfo == undefined">No data available</span> </div> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="panel"> <div class="panel-heading panel-top"> <span class="panel-title">Debug</span> <div class="btn-group"> <button type="button" class="btn btn-default" ng-class="{active:showDebug == false}" ng-click="setDebug(false)"> Hide </button> <button type="button" class="btn btn-default" ng-class="{active:showDebug == true}" ng-click="setDebug(true)"> Show </button> </div> </div> <div ng-switch on="showDebug"> <div class="panel-body panel-stats" ng-switch-when="true"> <ul class="nav nav-tabs"> <li class="dropdown"> <a href="#" id="metricsDropdown" class="dropdown-toggle" data-toggle="dropdown">Metrics <b class="caret"></b></a> <ul class="dropdown-menu" role="menu" aria-labelledby="metricsDropdown"> <li><a href="#video-metrics" tabindex="-1" data-toggle="tab">Video</a></li> <li><a href="#audio-metrics" tabindex="-1" data-toggle="tab">Audio</a></li> <li><a href="#stream-metrics" tabindex="-1" data-toggle="tab">Stream</a></li> </ul> </li> <li><a href="#requests" data-toggle="tab">Requests</a></li> <li><a href="#notes" data-toggle="tab">Release Notes</a></li> </ul> <div id="debugTabContent" class="tab-content"> <div class="tab-pane" id="video-metrics"> <button type="button" class="btn btn-default" ng-click="getVideoTreeMetrics()"> Video - Update </button> <div class="tree" data-angular-treeview="true" data-tree-model="videoMetrics" data-node-label="text" data-node-children="items"> </div> </div> <div class="tab-pane" id="audio-metrics"> <button type="button" class="btn btn-default" ng-click="getAudioTreeMetrics()"> Audio - Update </button> <div class="tree" data-angular-treeview="true" data-tree-model="audioMetrics" data-node-label="text" data-node-children="items"> </div> </div> <div class="tab-pane" id="stream-metrics"> <button type="button" class="btn btn-default" ng-click="getStreamTreeMetrics()"> Stream - Update </button> <div class="tree" data-angular-treeview="true" data-tree-model="streamMetrics" data-node-label="text" data-node-children="items"> </div> </div> <div class="tab-pane" id="requests"> <div class="video-requests col-md-4"> <div>Loading Requests (Video)</div> <ul ng-repeat = "request in videoRequestsQueue.loadingRequests"> <li>{{request.startTime}}</li> </ul> <div>Executed Requests (Video)</div> <ul ng-repeat = "request in videoRequestsQueue.executedRequests"> <li>{{request.startTime}}</li> </ul> </div> <div class="audio-requests col-md-4"> <div>Loading Requests (Audio)</div> <ul ng-repeat = "request in audioRequestsQueue.loadingRequests"> <li>{{request.startTime}}</li> </ul> <div>Executed Requests (Audio)</div> <ul ng-repeat = "request in audioRequestsQueue.executedRequests"> <li>{{request.startTime}}</li> </ul> </div> <div class="buffered-ranges col-md-4"> <div>Buffered Ranges (Video + Audio)</div> <ul ng-repeat = "bufferedRange in bufferedRanges"> <li>{{bufferedRange}}</li> </ul> </div> </div> <div class="tab-pane" id="notes"> <div ng-repeat="note in releaseNotes" class="note-box"> <span><b>{{note.title}}</b></span><br/> <span ng-repeat="text in note.items"> {{text}}<br/> </span> </div> </div> </div> </div> </div> </div> </div> </div> <div class="footer-area"> <div class="container"> <div class="row"> <div class="compat-box col-md-5"> <h3>Compatibility Notes:</h3> <ul class="list-group"> <li class="list-group-item"><a href="https://github.com/Dash-Industry-Forum/dash.js">This project can be forked on GitHub.</a></li> <li class="list-group-item">Use your browser's JavaScript console to view detailed information about stream playback.</li> <li class="list-group-item"><a href="../getting-started-basic-embed/auto-load-single-video.html">See a base implementation here.</a></li> <li class="list-group-item">A browser that supports MSE (Media Source Extensions) is required.</li> <li class="list-group-item">As of 2/1/2015 supported on the following browsers: Desktop Chrome, Desktop Internet Explorer 11 under WIn8.1, Mobile Chrome for Android and Safari on Mac Yosemite</li> <li class="list-group-item">Use the most up-to-date version of your browser for the best compatibility.</li> </ul> </div> <div class="col-md-3"> <h3 class="footer-text">Player Libraries:</h3> <a ng-repeat="item in playerLibraries" class="footer-text" href="{{item.link}}" target="_blank"> {{item.name}} </a> <h3 class="footer-text">Showcase Libraries:</h3> <a ng-repeat="item in showcaseLibraries" class="footer-text" href="{{item.link}}" target="_blank"> {{item.name}} </a> </div> <div class="col-md-4"> <h3 class="footer-text">Contributors:</h3> <a ng-repeat="item in contributors" class="footer-text" href="{{item.link}}" target="_blank"> <img ng-show="hasLogo(item)" ng-src="{{item.logo}}" alt="{{item.link}}"/> <span class="contributor" ng-show="!hasLogo(item)">{{item.name}}</span> </a> </div> </div> </div> </div> </body> </html>
34,328
59.651943
287
html