Esempio n. 1
0
    def run(self):
        """Run server
        """
        # Configure logging
        output.set_mode(self.debug)

        # Create yapc base
        server = core.core()
        ofconn = ofcomm.ofserver(server, self.port)

        # Debugger/Profiler
        # ofcount = ofdbg.of_msg_count(server)

        # OpenFlow Parser
        ofparse = ofevents.parser(server)
        # Switch-host binding
        swhost = switchhost.mac2sw_binding(server)
        # Flow switch
        fsw = fswitch.learningswitch(server, ofconn.connections, self.fpr)
        if self.fpr:
            pfr = ofdbg.show_flow_removed(server)
        # Drop unhandled flows
        fp = default.floodpkt(server, ofconn.connections)

        server.run()

        sys.exit(0)
Esempio n. 2
0
    def run(self):
        server = core.core()
        ofconn = ofcomm.ofserver(server)
        jsonconn = jsoncomm.jsonserver(server, file=self.sock, 
                                       forcebind=self.forcejson)
        ujson = udpjson.jsonudpserver(server, self.port)

        #OpenFlow Parser
        ofparse = ofevents.parser(server)
        #COIN main sever, maintaining connection
        coinserver = coinbr.bridge(server, ofconn.connections, 
                                   jsonconn.connections)

        #Network status
        sw = switches.dp_features(server)

        #OVS fabric manager
        ovs = coinovs.switch(server, jsonconn.connections)
        coinserver.switch = ovs

        #Flow management
        trafh = coinbr.traffic_handler(server, ofconn.connections, coinserver)

        #Add interfaces
        coinserver.setup(self.interfaces)

        server.order_handler(ofevents.features_reply.name,
                             sw, coinserver)
        server.order_cleanup(ofconn, ovs)

        server.run()
        sys.exit(0)
Esempio n. 3
0
    def run(self):
        """Run server
        """
        #Create yapc base
        server = core.core()
        ofconn = ofcomm.ofserver(server)
        jsonconn = jsoncomm.jsonserver(server, file=self.sock, 
                                       forcebind=self.forcejson)

        #Debug/Profiling
        #ofmsg = ofdbg.of_msg_count(server)

        #OpenFlow Parser
        ofparse = ofevents.parser(server)
        #COIN main server, maintaining connections
        coinserver = coinnat.nat(server, ofconn.connections,
                                 jsonconn.connections)
        coin_info = coini.core(server)

        #Information components
        bwm = ns.coin_intf_bandwidth(coin_info)

        #Network status
        sw = switches.dp_features(server)
        swhost = switchhost.mac2sw_binding(server)

        #OVS fabric manager
        ovs = coinovs.switch(server, jsonconn.connections)
        coinserver.switch = ovs

        #Flow management
        arph = coinnat.arp_handler(server, ofconn.connections)
        iph = coinnat.ip_handler(server, ofconn.connections, coinserver)

        #Add interfaces
        coinserver.setup(self.interfaces)

        server.order_handler(ofevents.features_reply.name,
                             sw, coinserver)
        server.order_cleanup(ofconn, ovs)

        coin_info.start()
        server.run()       
        sys.exit(0)
Esempio n. 4
0
import openwifi.globals as owglobal
import openwifi.authenticate as owauth
import openwifi.logger as owlog
import sys
import time

output.set_mode("DBG")
mcutil.memcache_mode = mcutil.MEMCACHE_MODE["LOCAL"]
web.config.debug=False

server = yapc.core()
webcleanup = owweb.cleanup(server)
owglobal.server = server
ofconn = ofcomm.ofserver(server)
jsonconn = jsoncomm.jsonserver(server)
ofparse = ofevents.parser(server)
swconfig = swstate.dp_config(server, ofconn.connections)
swconfig.default_miss_send_len = 65535
swhost = switchhost.mac2sw_binding(server)
owredirect = owauth.redirect(server, ofconn.connections)
owfilter = owauth.filter(server, ofconn.connections)
fsw = fswitch.learningswitch(server, ofconn.connections, True)
fp = default.floodpkt(server, ofconn.connections)
#pfr = ofdbg.show_flow_removed(server)
db = sqlite.SqliteDB(server, "openwifi.sqlite", jsonconn.connections)
fl = oflog.flowlogger(server, db)
al = owlog.authlogger(server, db)
db.start()

fb.init(105259509564192)
Esempio n. 5
0
import openwifi.googlewebpage as howweb
import openwifi.globals as owglobal
import openwifi.authenticate as owauth
import openwifi.logger as owlog
import sys
import time

output.set_mode("DBG")
mcutil.memcache_mode = mcutil.MEMCACHE_MODE["LOCAL"]
web.config.debug=False

server = yapc.core()
webcleanup = owweb.cleanup(server)
owglobal.server = server
ofconn = ofcomm.ofserver(server)
ofparse = ofevents.parser(server)
swconfig = swstate.dp_config(server, ofconn.connections)
swconfig.default_miss_send_len = 65535
swhost = switchhost.mac2sw_binding(server)
owredirect = owauth.redirect(server, ofconn.connections)
fsw = fswitch.learningswitch(server, ofconn.connections, True)
fp = default.floodpkt(server, ofconn.connections)
#pfr = ofdbg.show_flow_removed(server)
db = sqlite.SqliteDB(server, "openwifi.sqlite")
fl = oflog.flowlogger(server, db)
al = owlog.authlogger(server, db)
db.start()

webapp = web.application(howweb.urls, globals())
session = web.session.Session(webapp, 
                              web.session.DiskStore('sessions'),