diff --git a/README b/README deleted file mode 100644 index ee77184eb..000000000 --- a/README +++ /dev/null @@ -1,36 +0,0 @@ -POX is a networking software platform written in Python - -POX started life as an OpenFlow controller, but can now also function -as an OpenFlow switch, and can be useful for writing networking software -in general. - -POX officially requires Python 2.7 (though much of it will work fine -fine with Python 2.6), and should run under Linux, Mac OS, and Windows. -(And just about anywhere else -- we've run it on Android phones, -under FreeBSD, Haiku, and elsewhere. All you need is Python!) -You can place a pypy distribution alongside pox.py (in a directory -named "pypy"), and POX will run with pypy (this can be a significant -performance boost!). - -POX currently communicates with OpenFlow 1.0 switches and includes -special support for the Open vSwitch/Nicira extensions. - -pox.py boots up POX. It takes a list of module names on the command line, -locates the modules, calls their launch() function (if it exists), and -then transitions to the "up" state. - -Modules are looked for everywhere that Python normally looks, plus the -"pox" and "ext" directories. Thus, you can do the following: - - ./pox.py forwarding.l2_learning - -You can pass options to the modules by specifying options after the module -name. These are passed to the module's launch() funcion. For example, -to set the address or port of the controller, invoke as follows: - - ./pox.py openflow.of_01 --address=10.1.1.1 --port=6634 - -pox.py also supports a few command line options of its own which should -be given first: - --verbose print stack traces for initialization exceptions - --no-openflow don't start the openflow module automatically diff --git a/README.md b/README.md new file mode 100644 index 000000000..44977a24a --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# POX + +POX is a networking software platform written in Python. + +POX started life as an OpenFlow controller, but can now also function as an OpenFlow switch, and can be useful for writing networking software in general. + +This POX version requires Python 3+, and should run under Linux, Mac OS, and Windows. +(And just about anywhere else -- we've run it on Android phones, under FreeBSD, Haiku, and elsewhere. All you need is Python!) +You can place a pypy distribution alongside pox.py (in a directory named "pypy"), and POX will run with pypy (this can be a significant performance boost!). + +POX currently communicates with OpenFlow 1.0 switches and includes special support for the Open vSwitch/Nicira extensions. + +## Running POX + +pox.py boots up POX. It takes a list of module names on the command line, locates the modules, calls their `launch()` function (if it exists), and then transitions to the "up" state. + +There are two ways to start pox.py: +```sh +# You can manually run the script via the interpreter of your choice (e.g. python3): +# Note that python2/python2.6/python2.7 are not supported anymore +python3 pox.py [pox-options..] [modules..] [module-options..] + +# Otherwise, you can let POX select the Python interpreter to use (trying, in order: pypy, python3 or python) +# This might *not* work properly depending on your machine +./pox.py [pox-options..] [modules..] [module-options..] +``` + +### POX options +pox.py supports a few command line options of its own which should be given before specifying the modules: + - `--verbose` print stack traces for initialization exceptions + - `--no-openflow` don't start the openflow module automatically + + +### Modules +Modules are looked for everywhere that Python normally looks, plus the "pox" and "ext" directories. Thus, you can do the following: + +```sh +python3 pox.py forwarding.l2_learning +``` + +You can pass options to the modules by specifying options after the module name. These are passed to the module's `launch()` function. +For example, to set the address or port of the controller, invoke as follows: + +```sh +python3 pox.py openflow.of_01 --address=10.1.1.1 --port=6634 +``` + + diff --git a/pox.py b/pox.py index 05ac03d78..bf0f0f365 100755 --- a/pox.py +++ b/pox.py @@ -14,10 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# If you have PyPy 1.6+ in a directory called pypy alongside pox.py, we +# If you have PyPy in a directory called pypy alongside pox.py, we # use it. -# Otherwise, we try to use a Python interpreter called python2.7, which -# is a good idea if you're using Python from MacPorts, for example. # We fall back to just "python" and hope that works. ''''true @@ -33,16 +31,8 @@ exec pypy/bin/pypy $OPT "$0" $FLG "$@" fi -if type python2.7 > /dev/null 2> /dev/null; then - exec python2.7 $OPT "$0" $FLG "$@" -fi - -if type python2.6 > /dev/null 2> /dev/null; then - exec python2.6 $OPT "$0" $FLG "$@" -fi - -if type python2 > /dev/null 2> /dev/null; then - exec python2 $OPT "$0" $FLG "$@" +if type python3 > /dev/null 2> /dev/null; then + exec python3 $OPT "$0" $FLG "$@" fi exec python $OPT "$0" $FLG "$@" diff --git a/pox/boot.py b/pox/boot.py index a8e32db76..b9ea774bd 100755 --- a/pox/boot.py +++ b/pox/boot.py @@ -34,13 +34,10 @@ exec pypy/bin/pypy $OPT "$0" $FLG "$@" fi -if type python2.7 > /dev/null; then - exec python2.7 $OPT "$0" $FLG "$@" -fi exec python $OPT "$0" $FLG "$@" ''' -from __future__ import print_function + import logging import logging.config @@ -214,7 +211,7 @@ def _do_launch (argv, skip_startup=False): if getattr(f, '_pox_eval_args', False): import ast - for k,v in params.items(): + for k,v in list(params.items()): if isinstance(v, str): try: params[k] = ast.literal_eval(v) @@ -272,7 +269,7 @@ def _do_launch (argv, skip_startup=False): code = f.__code__ argcount = code.co_argcount argnames = code.co_varnames[:argcount] - defaults = list((f.func_defaults) or []) + defaults = list((f.__defaults__) or []) defaults = [EMPTY] * (argcount - len(defaults)) + defaults args = {} for n, a in enumerate(argnames): @@ -290,7 +287,7 @@ def _do_launch (argv, skip_startup=False): doc = f.__doc__.split("\n") #TODO: only strip the same leading space as was on the first # line - doc = map(str.strip, doc) + doc = list(map(str.strip, doc)) print('',("\n ".join(doc)).strip()) #print(params) @@ -304,15 +301,15 @@ def _do_launch (argv, skip_startup=False): "Active")) print(" {0:25} {0:25} {0:25}".format("-" * 15)) - for k,v in args.iteritems(): + for k,v in args.items(): print(" {0:25} {1:25} {2:25}".format(k,str(v[0]), str(v[1] if v[1] is not EMPTY else v[0]))) if len(params): print("This component does not have a parameter named " - + "'{0}'.".format(params.keys()[0])) + + "'{0}'.".format(list(params.keys())[0])) return False - missing = [k for k,x in args.iteritems() + missing = [k for k,x in args.items() if x[1] is EMPTY and x[0] is EMPTY] if len(missing): print("You must specify a value for the '{0}' " @@ -323,7 +320,7 @@ def _do_launch (argv, skip_startup=False): else: # Error is inside the function raise - elif len(params) > 0 or launch is not "launch": + elif len(params) > 0 or launch != "launch": print("Module %s has no %s(), but it was specified or passed " \ "arguments" % (name, launch)) return False @@ -354,7 +351,7 @@ def set (self, given_name, value): return True def process_options (self, options): - for k,v in options.iteritems(): + for k,v in options.items(): if self.set(k, v) is False: # Bad option! sys.exit(1) diff --git a/pox/config/gvar.py b/pox/config/gvar.py index 0217d5732..11f6ec4b5 100644 --- a/pox/config/gvar.py +++ b/pox/config/gvar.py @@ -25,5 +25,5 @@ gvariables = {} def launch (__INSTANCE__=None, **kw): - for k,v in kw.items(): + for k,v in list(kw.items()): gvariables[k] = v diff --git a/pox/config/var.py b/pox/config/var.py index ae03ef08d..244600681 100644 --- a/pox/config/var.py +++ b/pox/config/var.py @@ -25,5 +25,5 @@ variables = {} def launch (__INSTANCE__=None, **kw): - for k,v in kw.items(): + for k,v in list(kw.items()): variables[k] = v diff --git a/pox/core.py b/pox/core.py index db415fa38..cba9950ac 100644 --- a/pox/core.py +++ b/pox/core.py @@ -20,7 +20,7 @@ class (an instance of which is available as pox.core.core). (up and down events), etc. """ -from __future__ import print_function + # Set up initial log state import logging @@ -371,12 +371,11 @@ def goUp (self): vers = '.'.join(platform.python_version().split(".")[:2]) except: vers = 'an unknown version' - if vers != "2.7": + if float(vers) >= 3: l = logging.getLogger("version") if not l.isEnabledFor(logging.WARNING): l.setLevel(logging.WARNING) - l.warn("POX requires Python 2.7. You're running %s.", vers) - l.warn("If you run into problems, try using Python 2.7 or PyPy.") + l.warn("Support for Python 3 is experimental.") self.starting_up = False self.raiseEvent(GoingUpEvent()) @@ -483,7 +482,7 @@ def call_when_ready (self, callback, components=[], name=None, args=(), if callback is None: callback = lambda:None callback.__name__ = "" - if isinstance(components, basestring): + if isinstance(components, str): components = [components] elif isinstance(components, set): components = list(components) @@ -577,7 +576,7 @@ def _handle_topology_SwitchJoin (self, ...): """ if components is None: components = set() - elif isinstance(components, basestring): + elif isinstance(components, str): components = set([components]) else: components = set(components) @@ -591,7 +590,7 @@ def _handle_topology_SwitchJoin (self, ...): if None in listen_args: # This means add it to all... args = listen_args.pop(None) - for k,v in args.iteritems(): + for k,v in args.items(): for c in components: if c not in listen_args: listen_args[c] = {} diff --git a/pox/datapaths/hub.py b/pox/datapaths/hub.py index 926428fcc..390c16142 100644 --- a/pox/datapaths/hub.py +++ b/pox/datapaths/hub.py @@ -24,7 +24,7 @@ """ from pox.core import core -from Queue import Queue +from queue import Queue import pox.lib.packet as pkt from pox.lib.interfaceio import PCapInterface diff --git a/pox/datapaths/pcap_switch.py b/pox/datapaths/pcap_switch.py index ce19f5c9b..beeec619e 100644 --- a/pox/datapaths/pcap_switch.py +++ b/pox/datapaths/pcap_switch.py @@ -50,7 +50,7 @@ from pox.datapaths.switch import SoftwareSwitchBase, OFConnection from pox.datapaths.switch import ExpireMixin import pox.lib.pxpcap as pxpcap -from Queue import Queue +from queue import Queue from threading import Thread import pox.openflow.libopenflow_01 as of from pox.lib.packet import ethernet @@ -98,7 +98,7 @@ def get_sw (arg, fail=True): if event.first == "add-port": ra(1,2) if len(event.args) == 1 and len(_switches) == 1: - sw = _switches[_switches.keys()[0]] + sw = _switches[list(_switches.keys())[0]] p = args[0] else: ra(2) @@ -108,8 +108,8 @@ def get_sw (arg, fail=True): elif event.first == "del-port": ra(1,2) if len(event.args) == 1: - for sw in _switches.values(): - for p in sw.ports.values(): + for sw in list(_switches.values()): + for p in list(sw.ports.values()): if p.name == event.args[0]: sw.remove_interface(event.args[0]) return @@ -119,9 +119,9 @@ def get_sw (arg, fail=True): elif event.first == "show": ra(0) s = [] - for sw in _switches.values(): + for sw in list(_switches.values()): s.append("Switch %s" % (sw.name,)) - for no,p in sw.ports.iteritems(): + for no,p in sw.ports.items(): stats = sw.port_stats[no] s.append(" %3s %-16s rx:%-20s tx:%-20s" % (no, p.name, "%s (%s)" % (stats.rx_packets,stats.rx_bytes), @@ -134,7 +134,7 @@ def get_sw (arg, fail=True): if len(args) == 1: sw = get_sw(args[0]) s = [] - for switch in _switches.values(): + for switch in list(_switches.values()): if sw is None or switch is sw: s.append("== " + switch.name + " ==") for entry in switch.table.entries: @@ -145,7 +145,7 @@ def get_sw (arg, fail=True): # Wire a virtual port to a channel: wire-port [sw] port channel ra(2,3) if len(event.args) == 2 and len(_switches) == 1: - sw = _switches[_switches.keys()[0]] + sw = _switches[list(_switches.keys())[0]] p = args[0] c = args[1] else: @@ -153,7 +153,7 @@ def get_sw (arg, fail=True): sw = get_sw(args[0]) p = args[1] c = args[2] - for port in sw.ports.values(): + for port in list(sw.ports.values()): if port.name == p: px = sw.px.get(port.port_no) if not isinstance(px, VirtualPort): @@ -166,13 +166,13 @@ def get_sw (arg, fail=True): # Unhook the virtual port: unwire-port [sw] port ra(1,2) if len(event.args) == 1 and len(_switches) == 1: - sw = _switches[_switches.keys()[0]] + sw = _switches[list(_switches.keys())[0]] p = args[0] else: ra(2) sw = get_sw(args[0]) p = args[1] - for port in sw.ports.values(): + for port in list(sw.ports.values()): if port.name == p: px = sw.px.get(port.port_no) if not isinstance(px, VirtualPort): @@ -197,7 +197,7 @@ def get_sw (arg, fail=True): for y,z in zip(x[::2],x[1::2]): data.append(int(y+z,16)) data = "".join(chr(x) for x in data) - for port in sw.ports.values(): + for port in list(sw.ports.values()): if port.name == p: px = sw.px.get(port.port_no) sw._pcap_rx(px, data, 0, 0, len(data)) @@ -231,11 +231,11 @@ def get_sw (arg, fail=True): if k not in kvs: raise RuntimeError("Unknown option '%s'" % (k,)) kvs[k] = (kvs[k][0],kvs[k][0](v)) - kvs = {k:v[1] for k,v in kvs.items()} + kvs = {k:v[1] for k,v in list(kvs.items())} ra(2,3) pad = (kvs['p'] * kvs['s'])[:kvs['s']] if len(args) == 2 and len(_switches) == 1: - sw = _switches[_switches.keys()[0]] + sw = _switches[list(_switches.keys())[0]] mac,ip = args else: ra(3) @@ -245,7 +245,7 @@ def get_sw (arg, fail=True): ip = IPAddr(ip) srcport = kvs['port'] - for p in sw.ports.values(): + for p in list(sw.ports.values()): if srcport == "" or p.name == srcport: echo = pkt.echo() echo.payload = pad @@ -304,7 +304,7 @@ def launch (address = '127.0.0.1', port = 6633, max_retry_delay = 16, # We can reuse the exiting one else: # Create one... - import ctl + from . import ctl ctl.server(ctl_port) core.ctld.addListenerByName("CommandEvent", _do_ctl) @@ -442,7 +442,7 @@ def __init__ (self, **kw): self.log.setLevel(log_level) - for px in self.px.itervalues(): + for px in self.px.values(): px.start() self.t.start() @@ -490,7 +490,7 @@ def add_interface (self, name, port_no=-1, on_error=None, start=False, if dev.get('addrs',{}).get('AF_INET') != None: on_error("Device %s has an IP address -- ignoring", name) return - for no,p in self.px.iteritems(): + for no,p in self.px.items(): if p.device == name: on_error("Device %s already added", name) @@ -524,8 +524,8 @@ def add_interface (self, name, port_no=-1, on_error=None, start=False, return px def remove_interface (self, name_or_num): - if isinstance(name_or_num, basestring): - for no,p in self.px.iteritems(): + if isinstance(name_or_num, str): + for no,p in self.px.items(): if p.device == name_or_num: self.remove_interface(no) return diff --git a/pox/datapaths/switch.py b/pox/datapaths/switch.py index 3b7967730..5d2096d0e 100644 --- a/pox/datapaths/switch.py +++ b/pox/datapaths/switch.py @@ -135,7 +135,7 @@ def __init__ (self, dpid, name=None, ports=4, miss_send_len=128, # Set up handlers for incoming OpenFlow messages # That is, self.ofp_handlers[OFPT_FOO] = self._rx_foo self.ofp_handlers = {} - for value,name in ofp_type_map.iteritems(): + for value,name in ofp_type_map.items(): name = name.split("OFPT_",1)[-1].lower() h = getattr(self, "_rx_" + name, None) if not h: continue @@ -146,7 +146,7 @@ def __init__ (self, dpid, name=None, ports=4, miss_send_len=128, # That is, self.action_handlers[OFPAT_FOO] = self._action_foo #TODO: Refactor this with above self.action_handlers = {} - for value,name in ofp_action_type_map.iteritems(): + for value,name in ofp_action_type_map.items(): name = name.split("OFPAT_",1)[-1].lower() h = getattr(self, "_action_" + name, None) if not h: continue @@ -157,7 +157,7 @@ def __init__ (self, dpid, name=None, ports=4, miss_send_len=128, # That is, self.stats_handlers[OFPST_FOO] = self._stats_foo #TODO: Refactor this with above self.stats_handlers = {} - for value,name in ofp_stats_type_map.iteritems(): + for value,name in ofp_stats_type_map.items(): name = name.split("OFPST_",1)[-1].lower() h = getattr(self, "_stats_" + name, None) if not h: continue @@ -167,7 +167,7 @@ def __init__ (self, dpid, name=None, ports=4, miss_send_len=128, # That is, self.flow_mod_handlers[OFPFC_FOO] = self._flow_mod_foo #TODO: Refactor this with above self.flow_mod_handlers = {} - for name,value in ofp_flow_mod_command_rev_map.iteritems(): + for name,value in ofp_flow_mod_command_rev_map.items(): name = name.split("OFPFC_",1)[-1].lower() h = getattr(self, "_flow_mod_" + name, None) if not h: continue @@ -286,7 +286,7 @@ def _rx_features_request (self, ofp, connection): n_tables = 1, capabilities = self.features.capability_bits, actions = self.features.action_bits, - ports = self.ports.values()) + ports = list(self.ports.values())) self.send(msg) def _rx_flow_mod (self, ofp, connection): @@ -443,7 +443,7 @@ def send_port_status (self, port, reason): reason is one of OFPPR_xxx """ assert assert_type("port", port, ofp_phy_port, none_ok=False) - assert reason in ofp_port_reason_rev_map.values() + assert reason in list(ofp_port_reason_rev_map.values()) msg = ofp_port_status(desc=port, reason=reason) self.send(msg) @@ -661,12 +661,12 @@ def real_send (port_no, allow_in_port=False): elif out_port == OFPP_IN_PORT: real_send(in_port, allow_in_port=True) elif out_port == OFPP_FLOOD: - for no,port in self.ports.iteritems(): + for no,port in self.ports.items(): if no == in_port: continue if port.config & OFPPC_NO_FLOOD: continue real_send(port) elif out_port == OFPP_ALL: - for no,port in self.ports.iteritems(): + for no,port in self.ports.items(): if no == in_port: continue real_send(port) elif out_port == OFPP_CONTROLLER: @@ -1002,7 +1002,7 @@ def _stats_table (self, ofp, connection): def _stats_port (self, ofp, connection): req = ofp.body if req.port_no == OFPP_NONE: - return self.port_stats.values() + return list(self.port_stats.values()) else: return self.port_stats[req.port_no] @@ -1264,14 +1264,14 @@ class SwitchFeatures (object): """ def __init__ (self, **kw): self._cap_info = {} - for val,name in ofp_capabilities_map.iteritems(): + for val,name in ofp_capabilities_map.items(): name = name[5:].lower() # strip OFPC_ name = "cap_" + name setattr(self, name, False) self._cap_info[name] = val self._act_info = {} - for val,name in ofp_action_type_map.iteritems(): + for val,name in ofp_action_type_map.items(): name = name[6:].lower() # strip OFPAT_ name = "act_" + name setattr(self, name, False) @@ -1293,7 +1293,7 @@ def capability_bits (self): Value used in features reply """ return sum( (v if getattr(self, k) else 0) - for k,v in self._cap_info.iteritems() ) + for k,v in self._cap_info.items() ) @property def action_bits (self): @@ -1301,7 +1301,7 @@ def action_bits (self): Value used in features reply """ return sum( (1< time.time()} + self.outstanding_arps.items() if v > time.time()} # Check if we've already ARPed recently if (dpid,dstaddr) in self.outstanding_arps: diff --git a/pox/forwarding/topo_proactive.py b/pox/forwarding/topo_proactive.py index 826633967..79c9b6f5b 100644 --- a/pox/forwarding/topo_proactive.py +++ b/pox/forwarding/topo_proactive.py @@ -69,13 +69,13 @@ def dump (): a = path_map[i][j][0] #a = adjacency[i][j] if a is None: a = "*" - print a, - print + print(a, end=' ') + print() - sws = switches_by_dpid.values() + sws = list(switches_by_dpid.values()) path_map.clear() for k in sws: - for j,port in adjacency[k].iteritems(): + for j,port in adjacency[k].items(): if port is None: continue path_map[k][j] = (1,None) path_map[k][k] = (0,None) # distance, intermediate @@ -207,7 +207,7 @@ def send_table (self): core.openflow_discovery.install_flow(self.connection) src = self - for dst in switches_by_dpid.itervalues(): + for dst in switches_by_dpid.values(): if dst is src: continue p = _get_path(src, dst) if p is None: continue @@ -234,7 +234,7 @@ def send_table (self): self.connection.send(msg) """ - for ip,mac in self.ip_to_mac.iteritems(): + for ip,mac in self.ip_to_mac.items(): self._send_rewrite_rule(ip, mac) flood_ports = [] @@ -316,7 +316,7 @@ def connect (self, connection): # Disable flooding con = connection log.debug("Disabling flooding for %i ports", len(con.ports)) - for p in con.ports.itervalues(): + for p in con.ports.values(): if p.port_no >= of.OFPP_MAX: continue pm = of.ofp_port_mod(port_no=p.port_no, hw_addr=p.hw_addr, @@ -423,7 +423,7 @@ def flip (link): # path that may have been broken. #NOTE: This could be radically improved! (e.g., not *ALL* paths break) clear = of.ofp_flow_mod(command=of.OFPFC_DELETE) - for sw in switches_by_dpid.itervalues(): + for sw in switches_by_dpid.values(): if sw.connection is None: continue sw.connection.send(clear) path_map.clear() @@ -454,7 +454,7 @@ def flip (link): adjacency[sw1][sw2] = l.port1 adjacency[sw2][sw1] = l.port2 - for sw in switches_by_dpid.itervalues(): + for sw in switches_by_dpid.values(): sw.send_table() diff --git a/pox/help.py b/pox/help.py index 026c62d9b..9f8ee2740 100644 --- a/pox/help.py +++ b/pox/help.py @@ -16,7 +16,7 @@ Attempts to give help on other components """ -from __future__ import print_function + import pox.boot as boot import inspect import sys @@ -32,7 +32,7 @@ def _show_args (f,name): argnames,varargs,kws,defaults = inspect.getargspec(f) argcount = len(argnames) - defaults = list((f.func_defaults) or []) + defaults = list((f.__defaults__) or []) defaults = [EMPTY] * (argcount - len(defaults)) + defaults args = {} @@ -55,7 +55,7 @@ def _show_args (f,name): out.append(" {0:25} {1:25}".format("Name", "Default")) out.append(" {0:25} {0:25}".format("-" * 15)) - for k,v in args.iteritems(): + for k,v in args.items(): k = k.replace("_","-") out.append(" {0:25} {1:25}".format(k,str(v[0]))) @@ -98,8 +98,8 @@ def launch (no_args = False, short = False, **kw): "Showing help for help instead.") kw = {'help':True} - component = kw.keys()[0] - launcher = kw.values()[0] + component = list(kw.keys())[0] + launcher = list(kw.values())[0] if component == 'help': # Special case! diff --git a/pox/host_tracker/__init__.py b/pox/host_tracker/__init__.py index 0126757f3..dfdad45e7 100644 --- a/pox/host_tracker/__init__.py +++ b/pox/host_tracker/__init__.py @@ -20,14 +20,14 @@ """ from pox.core import core -import host_tracker +from . import host_tracker log = core.getLogger() import logging log.setLevel(logging.INFO) from pox.lib.addresses import EthAddr def launch (src_mac = None, no_flow = False, **kw): - for k, v in kw.iteritems(): + for k, v in kw.items(): if k in host_tracker.timeoutSec: host_tracker.timeoutSec[k] = int(v) log.debug("Changing timer parameter: %s = %s",k,v) diff --git a/pox/host_tracker/host_tracker.py b/pox/host_tracker/host_tracker.py index f7fd60c72..441ef438f 100644 --- a/pox/host_tracker/host_tracker.py +++ b/pox/host_tracker/host_tracker.py @@ -392,9 +392,9 @@ def _check_timeouts (self): """ Checks for timed out entries """ - for macEntry in self.entryByMAC.values(): + for macEntry in list(self.entryByMAC.values()): entryPinged = False - for ip_addr, ipEntry in macEntry.ipAddrs.items(): + for ip_addr, ipEntry in list(macEntry.ipAddrs.items()): if ipEntry.expired(): if ipEntry.pings.failed(): del macEntry.ipAddrs[ip_addr] @@ -408,7 +408,7 @@ def _check_timeouts (self): log.info("Entry %s expired", str(macEntry)) # sanity check: there should be no IP addresses left if len(macEntry.ipAddrs) > 0: - for ip in macEntry.ipAddrs.keys(): + for ip in list(macEntry.ipAddrs.keys()): log.warning("Entry %s expired but still had IP address %s", str(macEntry), str(ip_addr) ) del macEntry.ipAddrs[ip_addr] diff --git a/pox/info/debug_deadlock.py b/pox/info/debug_deadlock.py index 64395b5ce..440d172d6 100644 --- a/pox/info/debug_deadlock.py +++ b/pox/info/debug_deadlock.py @@ -35,10 +35,10 @@ def _trace_thread_proc (): frames = sys._current_frames() for key in frames: frame = frames[key] - print inspect.getframeinfo(frame) + print(inspect.getframeinfo(frame)) outer_frames = inspect.getouterframes(frame) for i in range(0, len(outer_frames)): - print " " + str(inspect.getframeinfo(outer_frames[i][0])) + print(" " + str(inspect.getframeinfo(outer_frames[i][0]))) time.sleep(5) except: diff --git a/pox/info/packet_dump.py b/pox/info/packet_dump.py index dd9e3c65f..3eb3bbd8d 100644 --- a/pox/info/packet_dump.py +++ b/pox/info/packet_dump.py @@ -58,7 +58,7 @@ def _handle_PacketIn (event): else: p = packet while p: - if isinstance(p, basestring): + if isinstance(p, str): msg += "[%s bytes]" % (len(p),) break msg += "[%s]" % (p.__class__.__name__,) @@ -77,12 +77,12 @@ def launch (verbose = False, max_length = 110, full_packets = True, _verbose = verbose _max_length = max_length force_show = (show is True) or (hide is False and show is False) - if isinstance(hide, basestring): + if isinstance(hide, str): hide = hide.replace(',', ' ').replace('|', ' ') hide = set([p.lower() for p in hide.split()]) else: hide = set() - if isinstance(show, basestring): + if isinstance(show, str): show = show.replace(',', ' ').replace('|', ' ') show = set([p.lower() for p in show.split()]) else: diff --git a/pox/info/recoco_spy.py b/pox/info/recoco_spy.py index ddade0524..57ca68ecd 100644 --- a/pox/info/recoco_spy.py +++ b/pox/info/recoco_spy.py @@ -39,7 +39,7 @@ def _tf (frame, event, arg): elif event == 'return': _frames.pop() elif event == 'c_call': - print "c_call" + print("c_call") _frames.append((frame,arg)) elif event == 'c_exception': _frames.pop() @@ -61,7 +61,7 @@ def _trace_thread_proc (): count = 0 sf = f while sf is not None: - if sf.f_code == pox.lib.recoco.Scheduler.cycle.im_func.func_code: + if sf.f_code == pox.lib.recoco.Scheduler.cycle.__func__.__code__: stopAt = sf break count += 1 diff --git a/pox/info/switch_info.py b/pox/info/switch_info.py index 34fb8db1d..e65d4879f 100644 --- a/pox/info/switch_info.py +++ b/pox/info/switch_info.py @@ -36,7 +36,7 @@ def fmt (v): dpid = dpid_to_str(desc.connection.dpid) ofp = desc.ofp.body s = [] - ports = [(p.port_no,p.name) for p in desc.connection.ports.values()] + ports = [(p.port_no,p.name) for p in list(desc.connection.ports.values())] ports.sort() ports = " ".join(p[1] for p in ports) #if len(ports) > len(dpid)+12: diff --git a/pox/lib/addresses.py b/pox/lib/addresses.py index 96688945d..629054403 100644 --- a/pox/lib/addresses.py +++ b/pox/lib/addresses.py @@ -16,17 +16,10 @@ Classes and utilities for addresses of various types. """ -from __future__ import print_function + import struct import socket -# Slightly tested attempt at Python 3 friendliness -import sys -if 'long' not in sys.modules['__builtin__'].__dict__: - long = int - - - _eth_oui_to_name = {} # OUI (3 bytes) -> name def _load_oui_names (): @@ -40,7 +33,7 @@ def _load_oui_names (): filename = os.path.join(os.path.dirname(inspect.stack()[0][1]), 'oui.txt') f = None try: - f = open(filename) + f = open(filename, encoding = "utf-8") for line in f.readlines(): if len(line) < 1: continue @@ -50,7 +43,7 @@ def _load_oui_names (): if not '-' in split[0]: continue # grab 3-byte OUI - oui = b''.join(chr(int(x,16)) for x in split[0].split('-')) + oui = b''.join(chr(int(x,16)).encode('latin-1') for x in split[0].split('-')) # strip off (hex) identifer and keep rest of name end = ' '.join(split[1:]).strip() end = end.split('\t') @@ -79,27 +72,29 @@ def __init__ (self, addr): Understands Ethernet address is various forms. Hex strings, raw byte strings, etc. """ - if isinstance(addr, bytes) or isinstance(addr, basestring): + if isinstance(addr, str): + addr = addr.encode('latin-1') + if isinstance(addr, bytes): if len(addr) == 6: # raw pass elif len(addr) == 17 or len(addr) == 12 or addr.count(':') == 5: # hex if len(addr) == 17: - if addr[2::3] != ':::::' and addr[2::3] != '-----': + if addr[2::3] != b':::::' and addr[2::3] != b'-----': raise RuntimeError("Bad format for ethernet address") # Address of form xx:xx:xx:xx:xx:xx # Pick out the hex digits only - addr = ''.join((addr[x*3:x*3+2] for x in xrange(0,6))) + addr = b''.join((addr[x*3:x*3+2] for x in range(0,6))) elif len(addr) == 12: pass else: # Assume it's hex digits but they may not all be in two-digit # groupings (e.g., xx:x:x:xx:x:x). This actually comes up. - addr = ''.join(["%02x" % (int(x,16),) for x in addr.split(":")]) + addr = b''.join(["%02x" % (int(x,16),) for x in addr.split(":")]) # We should now have 12 hex digits (xxxxxxxxxxxx). # Convert to 6 raw bytes. - addr = b''.join((chr(int(addr[x*2:x*2+2], 16)) for x in range(0,6))) + addr = b''.join((chr(int(addr[x*2:x*2+2], 16)).encode('latin-1') for x in range(0,6))) else: raise RuntimeError("Expected ethernet address string to be 6 raw " "bytes or some hex") @@ -107,11 +102,11 @@ def __init__ (self, addr): elif isinstance(addr, EthAddr): self._value = addr.toRaw() elif isinstance(addr, (list,tuple,bytearray)): - self._value = b''.join( (chr(x) for x in addr) ) + self._value = b''.join( (chr(x).encode('latin-1') for x in addr) ) elif (hasattr(addr, '__len__') and len(addr) == 6 and hasattr(addr, '__iter__')): # Pretty much same as above case, but for sequences we don't know. - self._value = b''.join( (chr(x) for x in addr) ) + self._value = b''.join( (chr(x).encode('latin-1') for x in addr) ) elif addr is None: self._value = b'\x00' * 6 else: @@ -126,12 +121,12 @@ def isBridgeFiltered (self): have a destination MAC address within this range are not relayed by bridges conforming to IEEE 802.1D """ - return ((ord(self._value[0]) == 0x01) - and (ord(self._value[1]) == 0x80) - and (ord(self._value[2]) == 0xC2) - and (ord(self._value[3]) == 0x00) - and (ord(self._value[4]) == 0x00) - and (ord(self._value[5]) <= 0x0F)) + return ((self._value[0] == 0x01) + and (self._value[1] == 0x80) + and (self._value[2] == 0xC2) + and (self._value[3] == 0x00) + and (self._value[4] == 0x00) + and (self._value[5] <= 0x0F)) @property def is_bridge_filtered (self): @@ -147,7 +142,7 @@ def isLocal (self): """ Returns True if this is a locally-administered (non-global) address. """ - return True if (ord(self._value[0]) & 2) else False + return True if (self._value[0] & 2) else False @property def is_local (self): @@ -161,7 +156,7 @@ def isMulticast (self): """ Returns True if this is a multicast address. """ - return True if (ord(self._value[0]) & 1) else False + return True if (self._value[0] & 1) else False @property def is_multicast (self): @@ -189,7 +184,7 @@ def to_tuple (self): Returns a 6-entry long tuple where each entry is the numeric value of the corresponding byte of the address. """ - return tuple((ord(x) for x in self._value)) + return tuple((x for x in self._value)) def toStr (self, separator = ':', resolveNames = False): return self.to_str(separator, resolveNames) @@ -206,26 +201,66 @@ def to_str (self, separator = ':', resolve_names = False): # Don't even bother for local (though it should never match and OUI!) name = _eth_oui_to_name.get(self._value[:3]) if name: - rest = separator.join('%02x' % (ord(x),) for x in self._value[3:]) + rest = separator.join('%02x' % (x,) for x in self._value[3:]) return name + separator + rest - return separator.join(('%02x' % (ord(x),) for x in self._value)) + return separator.join(('%02x' % (x,) for x in self._value)) def __str__ (self): return self.toStr() - def __cmp__ (self, other): - #TODO: Revisit this and other __cmp__ in Python 3.4 + # Deprecated (python2), left for reference + # def __cmp__ (self, other): + # try: + # if type(other) == EthAddr: + # other = other._value + # elif type(other) == bytes: + # pass + # else: + # other = EthAddr(other)._value + # return cmp(self._value, other) + # except: + # return -cmp(other, self) + + + def __eq__(self, other): + # Changed behaviour from original __cmp__ (see above, check if regression issues occur): + # always compare two EthAddr try: - if type(other) == EthAddr: - other = other._value - elif type(other) == bytes: - pass - else: - other = EthAddr(other)._value - return cmp(self._value, other) + if not isinstance(other, EthAddr): + other = EthAddr(other) + return self._value == other._value + except: + return other.__eq__(self) + + def __ne__(self, other): + try: + if not isinstance(other, EthAddr): + other = EthAddr(other) + return self._value != other._value + except: + return other.__ne__(self) + + def __lt__(self, other): + try: + if not isinstance(other, EthAddr): + other = EthAddr(other) + return self._value < other._value except: - return -cmp(other, self) + # reversed order + return other.__gt__(self) + + def __gt__(self, other): + try: + if not isinstance(other, EthAddr): + other = EthAddr(other) + return self._value > other._value + except: + # reversed order + return other.__lt__(self) + + + def __hash__ (self): return self._value.__hash__() @@ -264,7 +299,7 @@ def __init__ (self, addr, networkOrder = False): """ # Always stores as a signed network-order int - if isinstance(addr, (basestring, bytes, bytearray)): + if isinstance(addr, (str, bytes, bytearray)): if len(addr) != 4: # dotted quad self._value = struct.unpack('i', socket.inet_aton(addr))[0] @@ -272,7 +307,7 @@ def __init__ (self, addr, networkOrder = False): self._value = struct.unpack('i', addr)[0] elif isinstance(addr, IPAddr): self._value = addr._value - elif isinstance(addr, int) or isinstance(addr, long): + elif isinstance(addr, int) or isinstance(addr, int): addr = addr & 0xffFFffFF # unsigned long self._value = struct.unpack("!i", struct.pack(('!' if networkOrder else '') + "I", addr))[0] @@ -394,14 +429,39 @@ def multicast_ethernet_address (self): def __str__ (self): return self.toStr() - def __cmp__ (self, other): - if other is None: return 1 + def __eq__(self, other): + try: + if not isinstance(other, IPAddr): + other = IPAddr(other) + return self.toUnsigned() == other.toUnsigned() + except: + return other.__eq__(self) + + def __ne__(self, other): + try: + if not isinstance(other, IPAddr): + other = IPAddr(other) + return self.toUnsigned() != other.toUnsigned() + except: + return other.__ne__(self) + + def __lt__(self, other): + try: + if not isinstance(other, IPAddr): + other = IPAddr(other) + return self.toUnsigned() < other.toUnsigned() + except: + # reversed order + return other.__gt__(self) + + def __gt__(self, other): try: if not isinstance(other, IPAddr): other = IPAddr(other) - return cmp(self.toUnsigned(), other.toUnsigned()) + return self.toUnsigned() > other.toUnsigned() except: - return -other.__cmp__(self) + # reversed order + return other.__lt__(self) def __hash__ (self): return self._value.__hash__() @@ -442,8 +502,8 @@ def from_num (cls, num): Factory that creates an IPAddr6 from a large integer """ o = b'' - for i in xrange(16): - o = chr(num & 0xff) + o + for i in range(16): + o = chr(num & 0xff).encode('latin-1') + o num >>= 8 return cls.from_raw(o) @@ -471,7 +531,7 @@ def __init__ (self, addr = None, raw = False, network_order = False): if addr is None: # Should we even allow this? It's a weird case. self._value = self.UNDEFINED._value - elif isinstance(addr, unicode) or (isinstance(addr, bytes) and not raw): + elif isinstance(addr, str) or (isinstance(addr, bytes) and not raw): # A textual IPv6 representation ip4part = None if '.' in addr: @@ -562,7 +622,7 @@ def to_ipv4 (self, check_ipv4 = True): def num (self): o = 0 for b in self._value: - o = (o << 8) | ord(b) + o = (o << 8) | b return o @property @@ -605,7 +665,7 @@ def netmask_to_cidr (dq): of network bits. e.g., 255.255.255.0 -> 24 Raise exception if subnet mask is not CIDR-compatible. """ - if isinstance(dq, basestring): + if isinstance(dq, str): dq = IPAddr6(dq) v = dq.num c = 0 @@ -697,8 +757,8 @@ def to_str (self, zero_drop = True, section_drop = True, ipv4 = None): by passing ipv4=True; this probably only makes sense if .is_ipv4_compatible (or .is_ipv4_mapped, of course). """ - o = [ord(lo) | (ord(hi)<<8) for hi,lo in - (self._value[i:i+2] for i in xrange(0,16,2))] + o = [lo | (hi<<8) for hi,lo in + (self._value[i:i+2] for i in range(0,16,2))] if (ipv4 is None and self.is_ipv4_mapped) or ipv4: ip4part = o[-2:] @@ -744,14 +804,39 @@ def fmt (n): def __str__ (self): return self.to_str() - def __cmp__ (self, other): - if other is None: return 1 + def __eq__(self, other): + try: + if not isinstance(other, type(self)): + other = type(self)(other) + return self._value == other._value + except: + return other.__eq__(self) + + def __ne__(self, other): + try: + if not isinstance(other, type(self)): + other = type(self)(other) + return self._value != other._value + except: + return other.__ne__(self) + + def __lt__(self, other): + try: + if not isinstance(other, type(self)): + other = type(self)(other) + return self._value < other._value + except: + # reversed order + return other.__gt__(self) + + def __gt__(self, other): try: if not isinstance(other, type(self)): other = type(self)(other) - return cmp(self._value, other._value) + return self._value > other._value except: - return -cmp(other,self) + # reversed order + return other.__lt__(self) def __hash__ (self): return self._value.__hash__() @@ -771,7 +856,7 @@ def set_mac (self, eth): e = list(EthAddr(eth).toTuple()) e[0] ^= 2 e[3:3] = [0xff,0xfe] - e = ''.join(chr(b) for b in e) + e = b''.join(chr(b).encode('latin-1') for b in e) return IPAddr6.from_raw(self._value[:8]+e) @@ -792,7 +877,7 @@ def netmask_to_cidr (dq): of network bits. e.g., 255.255.255.0 -> 24 Raise exception if subnet mask is not CIDR-compatible. """ - if isinstance(dq, basestring): + if isinstance(dq, str): dq = IPAddr(dq) v = dq.toUnsigned(networkOrder=False) c = 0 diff --git a/pox/lib/config_eval.py b/pox/lib/config_eval.py index 34cc588cb..0adec3421 100755 --- a/pox/lib/config_eval.py +++ b/pox/lib/config_eval.py @@ -380,7 +380,7 @@ def do_toplevel (): continue elif ignore_commas and maybe(","): continue - elif len(result) and isinstance(result[-1], (str,unicode)): + elif len(result) and isinstance(result[-1], str): # This string extension might end with whitespace or the end of # the string. We try one way and if it fails, try again the # other way. @@ -427,16 +427,16 @@ def eval_one (text, *args, **kw): functions = dict(add=lambda a,b: a+b, num=lambda:42) import sys for arg in sys.argv[1:]: - print arg + print(arg) try: r = eval_dict(arg, functions=functions) - print "DICT:", r + print("DICT:", r) except: pass try: r = eval_list(arg, functions=functions) - print "LIST:", r + print("LIST:", r) except: raise pass - print + print() diff --git a/pox/lib/epoll_select.py b/pox/lib/epoll_select.py index 045c1e3ac..52477b576 100644 --- a/pox/lib/epoll_select.py +++ b/pox/lib/epoll_select.py @@ -80,7 +80,7 @@ def modify_table(current_obj_list, old_fd_set, op): # you should, anyway # now execute the modify ops on the epoll object - for (fd, mask) in modify.iteritems(): + for (fd, mask) in modify.items(): if fd in self.registered: if mask == 0: self.epoll.unregister(fd) diff --git a/pox/lib/graph/graph.py b/pox/lib/graph/graph.py index 455540442..beb8f657e 100644 --- a/pox/lib/graph/graph.py +++ b/pox/lib/graph/graph.py @@ -184,7 +184,7 @@ def __init__ (_self, *arg, **kw): ao = Literal(v) _self._arg.append(ao) _self._kw = {} - for k,v in kw.iteritems(): + for k,v in kw.items(): ao = None if isinstance(v, Operator): ao = v @@ -197,7 +197,7 @@ def __call__ (self, n, li): for arg in self._arg: arglist.append(arg(n,li)) kws = {} - for k,v in self._kw.iteritems(): + for k,v in self._kw.items(): kws[k] = v(n) func = arglist.pop(0) return func(*arglist, **kws) @@ -386,7 +386,7 @@ def __init__ (self, left, right): self._optional = optional def _apply (self, l, r): - return l in r.values() + return l in list(r.values()) class In (BinaryOp): def _apply (self, l, r): @@ -474,7 +474,7 @@ def link (self, np1, np2): _ = np1[0] except: # portless (hacky) - for free in xrange(1000): + for free in range(1000): if free not in np1.ports: np1 = (np1,free) break @@ -482,7 +482,7 @@ def link (self, np1, np2): _ = np2[0] except: # portless (hacky) - for free in xrange(1000): + for free in range(1000): if free not in np2.ports: np2 = (np2,free) break @@ -579,7 +579,7 @@ def has_link (self, query1=None, query2=()): def _test_node (self, n, args=(), kw={}, link=None): #TODO: Should use a special value for unspecified n2 - for k,v in kw.iteritems(): + for k,v in kw.items(): if k == "is_a": if not isinstance(n,v): return False elif k == "type": @@ -679,28 +679,28 @@ def __repr__ (self): g.link((n1,0),(n2,0)) g.link((n1,1),(n3,0)) - print g.find(is_a=Node1) - print g.find(is_a=Node2) - print g.find(type=Node1) - print g.find(type=Node3) - print g.find_links() - print "=== NEIGHBORS ===" - print g.neighbors(n1) - print g.find_port(n1, n2) - print g.connected(n1, n3) - print g.ports_for_node(n3) + print(g.find(is_a=Node1)) + print(g.find(is_a=Node2)) + print(g.find(type=Node1)) + print(g.find(type=Node3)) + print(g.find_links()) + print("=== NEIGHBORS ===") + print(g.neighbors(n1)) + print(g.find_port(n1, n2)) + print(g.connected(n1, n3)) + print(g.ports_for_node(n3)) - print [(n, x[0], x[1][0], x[1][1]) for n in g.find(is_a=Node1) for x in g.ports_for_node(n).iteritems() ] + print([(n, x[0], x[1][0], x[1][1]) for n in g.find(is_a=Node1) for x in g.ports_for_node(n).items() ]) g.disconnect_nodes(n1, n3) - print g.find_links() + print(g.find_links()) g.link((n2, 1), (n3, 1)) g.link((n1,1), (n3, 0)) g.link((n1,0), (n2, 0)) - print g.find_links() + print(g.find_links()) g.disconnect_node(n3) - print g.find_links() + print(g.find_links()) import code code.interact(local=locals()) diff --git a/pox/lib/graph/minigraph.py b/pox/lib/graph/minigraph.py index d87566bb3..b9736842d 100644 --- a/pox/lib/graph/minigraph.py +++ b/pox/lib/graph/minigraph.py @@ -40,8 +40,8 @@ def __init__ (self): def nodes (self, data = False): if not data: - return self._nodes.keys() - return self._nodes.items() + return list(self._nodes.keys()) + return list(self._nodes.items()) def edges (self, nbunch = None, data = False, keys = False): def fix (a,b): @@ -53,8 +53,8 @@ def fix (a,b): edges = {} - for e1,otherEnd in self._edges.iteritems(): - for e2,rest in otherEnd.iteritems(): + for e1,otherEnd in self._edges.items(): + for e2,rest in otherEnd.items(): if nbunch is not None: if e1 not in nbunch: continue if len(nbunch) > 1 and e2 not in nbunch: continue @@ -65,8 +65,8 @@ def fix (a,b): edges[e] = rest r = [] - for nodes,edgelist in edges.iteritems(): - for k,d in edgelist.iteritems(): + for nodes,edgelist in edges.items(): + for k,d in edgelist.items(): if data and keys: r.append((nodes[0],nodes[1],k,d)) # Is the order right? elif data: @@ -94,7 +94,7 @@ def add_node (self, node, **attr): self._nodes[node] = attr def remove_node (self, node): - others = self._edges[node].keys() + others = list(self._edges[node].keys()) del self._edges[node] for other in others: if other == node: continue @@ -127,7 +127,7 @@ def add_edges_from (self, edges, **attr): def remove_edge (self, node1, node2, key=None): if key is None: - key = self._edges[node1][node2].keys()[0] # First one is fine + key = list(self._edges[node1][node2].keys())[0] # First one is fine del self._edges[node1][node2][key] del self._edges[node2][node1][key] @@ -139,9 +139,9 @@ def add_path (self, nodes, **attr): def __getitem__ (self, node): o = {} - for k0,v0 in self._edges[node].iteritems(): + for k0,v0 in self._edges[node].items(): if k0 not in o: o[k0] = {} - for k1,v1 in v0.iteritems(): + for k1,v1 in v0.items(): if k1 not in o[k0]: o[k0][k1] = {} o[k0][k1] = v1 diff --git a/pox/lib/interfaceio/__init__.py b/pox/lib/interfaceio/__init__.py index 879d7b087..c47bf0ead 100644 --- a/pox/lib/interfaceio/__init__.py +++ b/pox/lib/interfaceio/__init__.py @@ -22,7 +22,7 @@ """ from pox.lib.pxpcap import PCap -from Queue import Queue +from queue import Queue from pox.lib.revent import Event, EventMixin from pox.lib.ioworker.io_loop import ReadLoop from pox.core import core @@ -429,7 +429,7 @@ def _add_del_route (self, network, gateway=None, dev=(), metric=0, if isinstance(network, tuple): addr,mask = network addr = str(addr) - if isinstance(mask, (int,long)): + if isinstance(mask, int): mask = cidr_to_netmask(mask) mask = str(mask) network = "%s/%s" % (addr,mask) @@ -568,7 +568,7 @@ def _pcap_cb (self, obj, data, sec, usec, length): def _queue_read (self): anything = False - for _ in xrange(10): # as most X at once + for _ in range(10): # as most X at once try: data = self._q.get(False) self._q.task_done() diff --git a/pox/lib/ioworker/__init__.py b/pox/lib/ioworker/__init__.py index 17c3351fc..05ec3405b 100644 --- a/pox/lib/ioworker/__init__.py +++ b/pox/lib/ioworker/__init__.py @@ -52,8 +52,8 @@ class IOWorker (object): """ def __init__(self): super(IOWorker,self).__init__() - self.send_buf = b"" - self.receive_buf = b"" + self.send_buf = b'' + self.receive_buf = b'' self.closed = False self._custom_rx_handler = None @@ -88,7 +88,8 @@ def _try_connect (self, loop): self._connecting = False try: self.socket.recv(0) - except socket.error as (s_errno, strerror): + except socket.error as xxx_todo_changeme1: + (s_errno, strerror) = xxx_todo_changeme1.args if s_errno == errno.EAGAIN or s_errno == 10035: # 10035=WSAEWOULDBLOCK # On Linux, this seems to mean we're connected. # I think this is right for the Windows case too. @@ -114,7 +115,8 @@ def _do_recv (self, loop): loop._workers.discard(self) else: self._push_receive_data(data) - except socket.error as (s_errno, strerror): + except socket.error as xxx_todo_changeme2: + (s_errno, strerror) = xxx_todo_changeme2.args if s_errno == errno.ENOENT: # SSL library does this sometimes log.error("Socket %s: ENOENT", str(self)) @@ -133,7 +135,8 @@ def _do_send (self, loop): self._consume_send_buf(l) if self._shutdown_send and len(self.send_buf) == 0: self.socket.shutdown(socket.SHUT_WR) - except socket.error as (s_errno, strerror): + except socket.error as xxx_todo_changeme3: + (s_errno, strerror) = xxx_todo_changeme3.args if s_errno != errno.EAGAIN: log.error("Socket %s error %i during send: %s", str(self), s_errno, strerror) @@ -297,7 +300,8 @@ def send_fast (self, data): if l == len(self.send_buf): return data = data[l] - except socket.error as (s_errno, strerror): + except socket.error as xxx_todo_changeme: + (s_errno, strerror) = xxx_todo_changeme.args if s_errno != errno.EAGAIN: log.error("Socket error: " + strerror) self.close() diff --git a/pox/lib/mock_socket.py b/pox/lib/mock_socket.py index 649676f84..a53438055 100644 --- a/pox/lib/mock_socket.py +++ b/pox/lib/mock_socket.py @@ -101,7 +101,7 @@ class MessageChannel (object): """ def __init__ (self): # Single element queue - self.buffer = "" + self.buffer = b'' self.on_data = None self.on_data_running = False self.pending_on_datas = 0 diff --git a/pox/lib/oui.txt b/pox/lib/oui.txt index 31118a336..51248b88b 100644 --- a/pox/lib/oui.txt +++ b/pox/lib/oui.txt @@ -4395,7 +4395,7 @@ company_id Organization 00-02-A2 (hex) Hilscher GmbH 0002A2 (base 16) Hilscher GmbH - Rheinstrae 15 + Rheinstra�e 15 65795 Hattersheim GERMANY GERMANY @@ -9858,7 +9858,7 @@ company_id Organization 00-05-ED (hex) Technikum Joanneum GmbH 0005ED (base 16) Technikum Joanneum GmbH - Alte Poststrae 149 + Alte Poststra�e 149 8020 Graz AUSTRIA @@ -10544,8 +10544,8 @@ company_id Organization Pittsburgh PA 15205-1333 UNITED STATES -00-06-58 (hex) Helmut Fischer GmbH Institut fr Elektronik und Messtechnik -000658 (base 16) Helmut Fischer GmbH Institut fr Elektronik und Messtechnik +00-06-58 (hex) Helmut Fischer GmbH Institut f�r Elektronik und Messtechnik +000658 (base 16) Helmut Fischer GmbH Institut f�r Elektronik und Messtechnik IndustriaBe21 71069 Sindefingen GERMANY @@ -10980,8 +10980,8 @@ company_id Organization 00-06-9C (hex) Transmode Systems AB 00069C (base 16) Transmode Systems AB - Jakobsdalsvgen 17 - HGERSTEN SE-126 53 + Jakobsdalsv�gen 17 + H�GERSTEN SE-126 53 SWEDEN 00-06-9D (hex) Petards Ltd @@ -12135,9 +12135,9 @@ company_id Organization San Jose CA 95134 UNITED STATES -00-07-51 (hex) mut AG -000751 (base 16) mut AG - Megerte fr Medizin- und Umwelttechnik +00-07-51 (hex) m�u�t AG +000751 (base 16) m�u�t AG + Me�ger�te f�r Medizin- und Umwelttechnik Am Marienhof 2 Wedel 22880 GERMANY @@ -12391,7 +12391,7 @@ company_id Organization 000778 (base 16) GERSTEL GmbH & Co. KG Eberhard-Gerstel-Platz 1 D45473 - Mlheim an der Ruhr + M�lheim an der Ruhr GERMANY 00-07-79 (hex) Sungil Telecom Co., Ltd. @@ -12517,7 +12517,7 @@ company_id Organization 00-07-8C (hex) Elektronikspecialisten i Borlange AB 00078C (base 16) Elektronikspecialisten i Borlange AB Box 50 - 40 MOCKFJRD + 40 MOCKFJ�RD SE 780 SWEDEN @@ -14169,7 +14169,7 @@ company_id Organization 00-08-AC (hex) Eltromat GmbH 0008AC (base 16) Eltromat GmbH Herforder Str. 249-251 - Leopoldshhe Nordrhein-Westfalen 33818 + Leopoldsh�he Nordrhein-Westfalen 33818 GERMANY 00-08-AD (hex) Toyo-Linx Co., Ltd. @@ -14269,7 +14269,7 @@ company_id Organization 00-08-BC (hex) Ilevo AB 0008BC (base 16) Ilevo AB Box 1561 - Karlstad Vrmland S-651 21 + Karlstad V�rmland S-651 21 SWEDEN 00-08-BD (hex) TEPG-US @@ -14412,7 +14412,7 @@ company_id Organization 00-08-D3 (hex) Hercules Technologies S.A. 0008D3 (base 16) Hercules Technologies S.A. - Place de l'toile + Place de l'�toile Carentoir Bretagne 56910 FRANCE @@ -14755,7 +14755,7 @@ company_id Organization 00-09-09 (hex) Telenor Connect A/S 000909 (base 16) Telenor Connect A/S Ellegaardvej 25L - Snderborg Als 6400 + S�nderborg Als 6400 DENMARK 00-09-0A (hex) SnedFar Technology Co., Ltd. @@ -15447,8 +15447,8 @@ company_id Organization 00-09-77 (hex) Brunner Elektronik AG 000977 (base 16) Brunner Elektronik AG - Mllerwis 1 - Hittnau Zrich 8335 + M�llerwis 1 + Hittnau Z�rich 8335 SWITZERLAND 00-09-78 (hex) AIJI System Co., Ltd. @@ -15487,7 +15487,7 @@ company_id Organization 00-09-7D (hex) SecWell Networks Oy 00097D (base 16) SecWell Networks Oy P.O.BOX 174 - Hmeenpuisto 21 + H�meenpuisto 21 Tampere 33101 FINLAND @@ -16065,10 +16065,10 @@ company_id Organization San Francisco California 94124 UNITED STATES -00-09-D8 (hex) Flt Communications AB -0009D8 (base 16) Flt Communications AB - Kylgrnd 6A - SE 906 20 Ume +00-09-D8 (hex) F�lt Communications AB +0009D8 (base 16) F�lt Communications AB + Kylgr�nd 6A + SE 906 20 Ume� SWEDEN 00-09-D9 (hex) Neoscale Systems, Inc @@ -16093,7 +16093,7 @@ company_id Organization 0009DC (base 16) Galaxis Technology AG Steinmetzstrasse 7 P.O. Box 3364 - Lbeck Schleswig-Holstein 23556 + L�beck Schleswig-Holstein 23556 GERMANY 00-09-DD (hex) Mavin Technology Inc. @@ -16136,8 +16136,8 @@ company_id Organization 00-09-E3 (hex) Angel Iglesias S.A. 0009E3 (base 16) Angel Iglesias S.A. - Polgono 27 Martutene - San Sebastin Guipzcoa 20014 + Pol�gono 27 Martutene + San Sebasti�n Guip�zcoa 20014 SPAIN 00-09-E4 (hex) K Tech Infosystem Inc. @@ -16252,7 +16252,7 @@ company_id Organization 00-09-F5 (hex) Emerson Network Power Co.,Ltd 0009F5 (base 16) Emerson Network Power Co.,Ltd 1/F,3/F Electric Building Huawei Base,Ba - Longgang,Shenzhen Municipality,Peoples + Longgang,Shenzhen Municipality,People��s ShenZhen GuangDong 518029 CHINA @@ -16418,7 +16418,7 @@ company_id Organization 00-0A-10 (hex) FAST media integrations AG 000A10 (base 16) FAST media integrations AG - Schngrund 26 + Sch�ngrund 26 Rotkreuz Canton of Zug 6343 SWITZERLAND @@ -16764,7 +16764,7 @@ company_id Organization 00-0A-47 (hex) Allied Vision Technologies 000A47 (base 16) Allied Vision Technologies Taschenweg 2a - Stadtroda Thringen 07646 + Stadtroda Th�ringen 07646 GERMANY 00-0A-48 (hex) Albatron Technology @@ -17005,7 +17005,7 @@ company_id Organization 00-0A-6D (hex) EKS Elektronikservice GmbH 000A6D (base 16) EKS Elektronikservice GmbH Enzstr. 9 - Kornwestheim Baden Wrtemberg 70806 + Kornwestheim Baden W�rtemberg 70806 GERMANY 00-0A-6E (hex) Broadcast Technology Limited @@ -17146,7 +17146,7 @@ company_id Organization 00-0A-83 (hex) SALTO SYSTEMS S.L. 000A83 (base 16) SALTO SYSTEMS S.L. Arkotz, 9 - Polgono Lanbarren Oiartzun 20180 + Pol�gono Lanbarren Oiartzun 20180 SPAIN 00-0A-84 (hex) Rainsun Enterprise Co., Ltd. @@ -17235,7 +17235,7 @@ company_id Organization 00-0A-91 (hex) HemoCue AB 000A91 (base 16) HemoCue AB Box 1204 - ngelholm Skne 26223 + �ngelholm Sk�ne 26223 SWEDEN 00-0A-92 (hex) Presonus Corporation @@ -17450,7 +17450,7 @@ company_id Organization 00-0A-B3 (hex) Fa. GIRA 000AB3 (base 16) Fa. GIRA - Dahlienstrae + Dahlienstra�e Radevormwald Nordrhein-Westfalen 42477 GERMANY @@ -17462,7 +17462,7 @@ company_id Organization 00-0A-B5 (hex) Digital Electronic Network 000AB5 (base 16) Digital Electronic Network - 8 rue du sacr coeur + 8 rue du sacr� coeur Saint Laurent sur Sevre Vendee 85290 FRANCE @@ -17807,7 +17807,7 @@ company_id Organization 00-0A-EA (hex) ADAM ELEKTRONIK LTD.STI. 000AEA (base 16) ADAM ELEKTRONIK LTD.STI. - UZUNAYNA CAD. CELENK SOK. NO:1 AKMAK / + UZUNAYNA CAD. CELENK SOK. NO:1 �AKMAK / ISTANBUL 81260 TURKEY @@ -17839,7 +17839,7 @@ company_id Organization 00-0A-EF (hex) OTRUM ASA 000AEF (base 16) OTRUM ASA Brattekleiv - Frvik N-4818 + F�rvik N-4818 NORWAY 00-0A-F0 (hex) SHIN-OH ELECTRONICS CO., LTD. R&D @@ -18236,7 +18236,7 @@ company_id Organization 00-0B-2F (hex) bplan GmbH 000B2F (base 16) bplan GmbH - Industriestrae 23 + Industriestra�e 23 Steinbach 61449 GERMANY @@ -18552,10 +18552,10 @@ company_id Organization San Jose CA 95134 UNITED STATES -00-0B-61 (hex) Friedrich Ltze GmbH &Co. -000B61 (base 16) Friedrich Ltze GmbH &Co. - Bruckwiesenstrae 17-19 - Weinstadt-Groheppach BW 71384 +00-0B-61 (hex) Friedrich L�tze GmbH &Co. +000B61 (base 16) Friedrich L�tze GmbH &Co. + Bruckwiesenstra�e 17-19 + Weinstadt-Gro�heppach BW 71384 GERMANY 00-0B-62 (hex) Ingenieurbuero fuer Elektronikdesign Ingo Mohnen @@ -18659,7 +18659,7 @@ company_id Organization 00-0B-72 (hex) Lawo AG 000B72 (base 16) Lawo AG Am Oberwald 8 - Rastatt Baden-Wrttemberg 76437 + Rastatt Baden-W�rttemberg 76437 GERMANY 00-0B-73 (hex) Kodeos Communications @@ -18852,8 +18852,8 @@ company_id Organization York YO30 4GU UNITED KINGDOM -00-0B-91 (hex) Aglaia Gesellschaft fr Bildverarbeitung und Kommunikation m -000B91 (base 16) Aglaia Gesellschaft fr Bildverarbeitung und Kommunikation m +00-0B-91 (hex) Aglaia Gesellschaft f�r Bildverarbeitung und Kommunikation m +000B91 (base 16) Aglaia Gesellschaft f�r Bildverarbeitung und Kommunikation m Tiniusstr. 12-15 Berlin D-13089 GERMANY @@ -18886,7 +18886,7 @@ company_id Organization 00-0B-96 (hex) Innotrac Diagnostics Oy 000B96 (base 16) Innotrac Diagnostics Oy Kalevantie 25 - Turku bo 20520 + Turku �bo 20520 FINLAND 00-0B-97 (hex) Matsushita Electric Industrial Co.,Ltd. @@ -18964,7 +18964,7 @@ company_id Organization 00-0B-A3 (hex) Siemens AG, I&S 000BA3 (base 16) Siemens AG, I&S - Werner-von-Siemens-Strae 65 + Werner-von-Siemens-Stra�e 65 Erlangen Bavaria 91052 GERMANY @@ -19293,7 +19293,7 @@ company_id Organization 00-0B-D7 (hex) DORMA Time + Access GmbH 000BD7 (base 16) DORMA Time + Access GmbH - Mainzer Strae 36-52 + Mainzer Stra�e 36-52 Bonn Nordrheinwestfalen 53179 GERMANY @@ -20225,7 +20225,7 @@ company_id Organization 00-0C-6B (hex) Kurz Industrie-Elektronik GmbH 000C6B (base 16) Kurz Industrie-Elektronik GmbH Foehrenbachstrasse 3 - Remshalden Baden-Wrttemberg 73630 + Remshalden Baden-W�rttemberg 73630 GERMANY 00-0C-6C (hex) Elgato Systems LLC @@ -20784,7 +20784,7 @@ company_id Organization 00-0C-C3 (hex) BeWAN systems 000CC3 (base 16) BeWAN systems - 16 rue du Moulin des Bruyres + 16 rue du Moulin des Bruy�res Courbevoie Hauts de Seine 92400 FRANCE @@ -20802,7 +20802,7 @@ company_id Organization 00-0C-C6 (hex) Ka-Ro electronics GmbH 000CC6 (base 16) Ka-Ro electronics GmbH - Pascalstrae 22 + Pascalstra�e 22 Aachen NW 52076 GERMANY @@ -20846,7 +20846,7 @@ company_id Organization 00-0C-CD (hex) IEC - TC57 000CCD (base 16) IEC - TC57 - 3, rue de Varemb + 3, rue de Varemb� P.O. Box 131 Geneva GE 1211 SWITZERLAND @@ -20955,7 +20955,7 @@ company_id Organization 00-0C-DE (hex) ABB STOTZ-KONTAKT GmbH 000CDE (base 16) ABB STOTZ-KONTAKT GmbH Eppelheimer Str. 82 - Heidelberg Baden-Wrttemberg 69123 + Heidelberg Baden-W�rttemberg 69123 GERMANY 00-0C-DF (hex) PULNiX America, Inc @@ -21030,7 +21030,7 @@ company_id Organization 00-0C-EA (hex) aphona Kommunikationssysteme 000CEA (base 16) aphona Kommunikationssysteme Entwicklungs- und VertriebsgmbH - Deutschstrae 4 + Deutschstra�e 4 Wien 1230 AUSTRIA @@ -21081,9 +21081,9 @@ company_id Organization Hillsboro OR 97124 UNITED STATES -00-0C-F2 (hex) GAMESA ELICA -000CF2 (base 16) GAMESA ELICA - Polgono Agustinos s/n +00-0C-F2 (hex) GAMESA E�LICA +000CF2 (base 16) GAMESA E�LICA + Pol�gono Agustinos s/n Pamplona NAVARRA 31013 SPAIN @@ -21095,8 +21095,8 @@ company_id Organization 00-0C-F4 (hex) AKATSUKI ELECTRIC MFG.CO.,LTD. 000CF4 (base 16) AKATSUKI ELECTRIC MFG.CO.,LTD. - 593-1,aoji cho - kusatsu shi shiga 525-0041 + 593-1,aoji� cho + kusatsu� shi shiga 525-0041 JAPAN 00-0C-F5 (hex) InfoExpress @@ -21200,7 +21200,7 @@ company_id Organization 00-0D-04 (hex) Foxboro Eckardt Development GmbH 000D04 (base 16) Foxboro Eckardt Development GmbH Glockenstrasse 52 - Stuttgart Baden-Wrttemberg 70376 + Stuttgart Baden-W�rttemberg 70376 GERMANY 00-0D-05 (hex) cybernet manufacturing inc. @@ -21295,7 +21295,7 @@ company_id Organization 00-0D-13 (hex) Wilhelm Rutenbeck GmbH&Co. 000D13 (base 16) Wilhelm Rutenbeck GmbH&Co. Niederworth 1-10 - Schalksmhle NRW 58579 + Schalksm�hle NRW 58579 GERMANY 00-0D-14 (hex) Vtech Innovation LP dba Advanced American Telephones @@ -21422,7 +21422,7 @@ company_id Organization 00-0D-27 (hex) MICROPLEX Printware AG 000D27 (base 16) MICROPLEX Printware AG - Panzerstrae 5 + Panzerstra�e 5 Varel Niedersachsen 26316 GERMANY @@ -21443,7 +21443,7 @@ company_id Organization 00-0D-2A (hex) Scanmatic AS 000D2A (base 16) Scanmatic AS Kilsund - Staub 4920 + Staub� 4920 NORWAY 00-0D-2B (hex) Racal Instruments @@ -21462,7 +21462,7 @@ company_id Organization 00-0D-2D (hex) NCT Deutschland GmbH 000D2D (base 16) NCT Deutschland GmbH Wildenbruchstr. 15 - Jena Thringen 07745 + Jena Th�ringen 07745 GERMANY 00-0D-2E (hex) Matsushita Avionics Systems Corporation @@ -21806,7 +21806,7 @@ company_id Organization 00-0D-64 (hex) COMAG Handels AG 000D64 (base 16) COMAG Handels AG Zillenhardtstr.41 - Goeppingen Baden-Wrttemberg 73037 + Goeppingen Baden-W�rttemberg 73037 GERMANY 00-0D-65 (hex) Cisco Systems @@ -21932,7 +21932,7 @@ company_id Organization 00-0D-78 (hex) Engineering & Security 000D78 (base 16) Engineering & Security - Martiri della Libert 32/4 + Martiri della Libert� 32/4 Genova 16155 ITALY @@ -21987,13 +21987,13 @@ company_id Organization 00-0D-81 (hex) Pepperl+Fuchs GmbH 000D81 (base 16) Pepperl+Fuchs GmbH - Lilienthalstrae 200 + Lilienthalstra�e 200 Mannheim 68307 GERMANY 00-0D-82 (hex) PHS srl 000D82 (base 16) PHS srl - Via Pal, 17 + Via Pal�, 17 Arcugnano Vicenza 36057 ITALY @@ -22081,7 +22081,7 @@ company_id Organization 00-0D-90 (hex) Factum Electronics AB 000D90 (base 16) Factum Electronics AB Teknikringen 1H - Linkping stergtland 583 30 + Link�ping �sterg�tland 583 30 SWEDEN 00-0D-91 (hex) Eclipse (HQ Espana) S.L. @@ -22249,7 +22249,7 @@ company_id Organization 00-0D-AB (hex) Parker Hannifin GmbH Electromechanical Division Europe 000DAB (base 16) Parker Hannifin GmbH Electromechanical Division Europe Robert-Bosch-Strasse 22 - Offenburg Baden Wrttemberg 77656 + Offenburg Baden W�rttemberg 77656 GERMANY 00-0D-AC (hex) Japan CBM Corporation @@ -22338,8 +22338,8 @@ company_id Organization 8006 Zurich SWITZERLAND -00-0D-BA (hex) Oc Document Technologies GmbH -000DBA (base 16) Oc Document Technologies GmbH +00-0D-BA (hex) Oc� Document Technologies GmbH +000DBA (base 16) Oc� Document Technologies GmbH Max-Stromeyer-Str. 116 Konstanz 78467 GERMANY @@ -22488,7 +22488,7 @@ company_id Organization 00-0D-D2 (hex) Simrad Optronics ASA 000DD2 (base 16) Simrad Optronics ASA - Ensjveien 23B + Ensj�veien 23B PO Box 6114 Etterstad NO-0602 Oslo NORWAY @@ -22555,11 +22555,11 @@ company_id Organization Taipei 110 TAIWAN, REPUBLIC OF CHINA -00-0D-DD (hex) PROFLO TELRA ELEKTRONK SANAY VE TCARET A.. -000DDD (base 16) PROFLO TELRA ELEKTRONK SANAY VE TCARET A.. - CEMAL SAHR SOKAK NO:26-28 - MECDYEKY - STANBUL TURKEY 34255 +00-0D-DD (hex) PROF�LO TELRA ELEKTRON�K SANAY� VE T�CARET A.�. +000DDD (base 16) PROF�LO TELRA ELEKTRON�K SANAY� VE T�CARET A.�. + CEMAL SAH�R SOKAK NO:26-28 + MEC�D�YEK�Y + �STANBUL TURKEY 34255 TURKEY 00-0D-DE (hex) Joyteck Co., Ltd. @@ -22799,7 +22799,7 @@ company_id Organization 00-0E-04 (hex) CMA/Microdialysis AB 000E04 (base 16) CMA/Microdialysis AB - Dalvgen 10 / Box 2 + Dalv�gen 10 / Box 2 Solna 171 18 SWEDEN @@ -22854,8 +22854,8 @@ company_id Organization Hillsboro OR 97124 UNITED STATES -00-0E-0D (hex) HESCH Schrder GmbH -000E0D (base 16) HESCH Schrder GmbH +00-0E-0D (hex) HESCH Schr�der GmbH +000E0D (base 16) HESCH Schr�der GmbH Boschstrasse 8 Neustadt Niedersachsen 31535 GERMANY @@ -22879,10 +22879,10 @@ company_id Organization Tokyo 106-0032 JAPAN -00-0E-11 (hex) BDT Bro- und Datentechnik GmbH & Co. KG -000E11 (base 16) BDT Bro- und Datentechnik GmbH & Co. KG +00-0E-11 (hex) BDT B�ro- und Datentechnik GmbH & Co. KG +000E11 (base 16) BDT B�ro- und Datentechnik GmbH & Co. KG Saline 29 - Rottweil Baden-Wrttemberg D-78628 + Rottweil Baden-W�rttemberg D-78628 GERMANY 00-0E-12 (hex) Adaptive Micro Systems Inc. @@ -23076,7 +23076,7 @@ company_id Organization 00-0E-31 (hex) Olympus Soft Imaging Solutions GmbH 000E31 (base 16) Olympus Soft Imaging Solutions GmbH Johann-Krane-Weg 39 - Mnster 48149 + M�nster 48149 GERMANY 00-0E-32 (hex) Kontron Medical @@ -23231,7 +23231,7 @@ company_id Organization 00-0E-49 (hex) Forsway Scandinavia AB 000E49 (base 16) Forsway Scandinavia AB Kaplansgatan 16 B - 541 34 Skvde + 541 34 Sk�vde SWEDEN 00-0E-4A (hex) Changchun Huayu WEBPAD Co.,LTD @@ -23305,7 +23305,7 @@ company_id Organization 00-0E-55 (hex) AUVITRAN 000E55 (base 16) AUVITRAN - 7c chemin des prs + 7c chemin des pr�s MEYLAN 38410 FRANCE @@ -23444,7 +23444,7 @@ company_id Organization 00-0E-6B (hex) Janitza electronics GmbH 000E6B (base 16) Janitza electronics GmbH - Vor dem Polstck 1 + Vor dem Polst�ck 1 Lahnau Hessen 35633 GERMANY @@ -23552,7 +23552,7 @@ company_id Organization 00-0E-7C (hex) Televes S.A. 000E7C (base 16) Televes S.A. Rua Benefica Conxo 17 - Santiago de Compostela Corua 15706 + Santiago de Compostela Coru�a 15706 SPAIN 00-0E-7D (hex) Electronics Line 3000 Ltd. @@ -23653,7 +23653,7 @@ company_id Organization 00-0E-8C (hex) Siemens AG A&D ET 000E8C (base 16) Siemens AG A&D ET - Siemensstrae 10 + Siemensstra�e 10 Regensburg 93055 GERMANY @@ -23693,9 +23693,9 @@ company_id Organization Songpa-gu Seoul 138-169 KOREA, REPUBLIC OF -00-0E-93 (hex) Milnio 3 Sistemas Electrnicos, Lda. -000E93 (base 16) Milnio 3 Sistemas Electrnicos, Lda. - Edifcio Via Norte, R. Espido 164C S403 +00-0E-93 (hex) Mil�nio 3 Sistemas Electr�nicos, Lda. +000E93 (base 16) Mil�nio 3 Sistemas Electr�nicos, Lda. + Edif�cio Via Norte, R. Espido 164C S403 Maia Minho 4470-177 PORTUGAL @@ -23869,7 +23869,7 @@ company_id Organization 00-0E-AF (hex) CASTEL 000EAF (base 16) CASTEL - ZI Saint Lambert des Leves + ZI Saint Lambert des Lev�es SAUMUR Maine et Loire 49412 FRANCE @@ -23888,7 +23888,7 @@ company_id Organization 00-0E-B2 (hex) Micro-Research Finland Oy 000EB2 (base 16) Micro-Research Finland Oy - Vlitalontie 83 C + V�litalontie 83 C Helsinki FIN-00660 FINLAND @@ -23951,7 +23951,7 @@ company_id Organization 00-0E-BC (hex) Paragon Fidelity GmbH 000EBC (base 16) Paragon Fidelity GmbH - Schwadermhlstrasse 4a + Schwaderm�hlstrasse 4a Cadolzburg 90556 GERMANY @@ -24072,7 +24072,7 @@ company_id Organization 00-0E-CF (hex) PROFIBUS Nutzerorganisation e.V. 000ECF (base 16) PROFIBUS Nutzerorganisation e.V. Haid-und-Neu-Strasse 7 - Karlsruhe Baden-Wrttemberg 76131 + Karlsruhe Baden-W�rttemberg 76131 GERMANY 00-0E-D0 (hex) Privaris, Inc. @@ -24275,7 +24275,7 @@ company_id Organization 00-0E-F0 (hex) Festo AG & Co. KG 000EF0 (base 16) Festo AG & Co. KG - Ruiterstrae 82 + Ruiterstra�e 82 Esslingen 73734 GERMANY @@ -24439,8 +24439,8 @@ company_id Organization 00-0F-0B (hex) Kentima Technologies AB 000F0B (base 16) Kentima Technologies AB Box 174 - Kastanjevgen 2 - Staffanstorp Skne 245 44 + Kastanjev�gen 2 + Staffanstorp Sk�ne 245 44 SWEDEN 00-0F-0C (hex) SYNCHRONIC ENGINEERING @@ -24503,7 +24503,7 @@ company_id Organization 00-0F-15 (hex) Kjaerulff1 A/S 000F15 (base 16) Kjaerulff1 A/S C.F. Tietgens Boulevard 19 - Odense S Fyn 5220 + Odense S� Fyn 5220 DENMARK 00-0F-16 (hex) JAY HOW TECHNOLOGY CO., @@ -24943,7 +24943,7 @@ company_id Organization 00-0F-59 (hex) Phonak Communications AG 000F59 (base 16) Phonak Communications AG - Lnggasse 17 + L�nggasse 17 Murten FR 3280 SWITZERLAND @@ -25159,7 +25159,7 @@ company_id Organization 00-0F-7B (hex) Arce Sistemas, S.A. 000F7B (base 16) Arce Sistemas, S.A. - C/Padre Larramendi, 3 - 2 + C/Padre Larramendi, 3 - 2� Bilbao Vizcaya 48012 SPAIN @@ -25381,7 +25381,7 @@ company_id Organization 00-0F-9E (hex) Murrelektronik GmbH 000F9E (base 16) Murrelektronik GmbH Falkenstrasse 3 - Oppenweiler Baden Wrttemberg 71570 + Oppenweiler Baden W�rttemberg 71570 GERMANY 00-0F-9F (hex) Motorola Mobility, Inc. @@ -25419,7 +25419,7 @@ company_id Organization 00-0F-A4 (hex) Sprecher Automation GmbH 000FA4 (base 16) Sprecher Automation GmbH Franckstrasse 51 - Linz Obersterreich 4018 + Linz Ober�sterreich 4018 AUSTRIA 00-0F-A5 (hex) BWA Technology GmbH @@ -25473,7 +25473,7 @@ company_id Organization 00-0F-AD (hex) FMN communications GmbH 000FAD (base 16) FMN communications GmbH Grimmelallee 4 - Nordhausen Thringen 99734 + Nordhausen Th�ringen 99734 GERMANY 00-0F-AE (hex) E2O Communications @@ -25561,7 +25561,7 @@ company_id Organization 00-0F-BB (hex) Nokia Siemens Networks GmbH & Co. KG 000FBB (base 16) Nokia Siemens Networks GmbH & Co. KG Werner-von-Siemens Str. 2-6 - Bruchsal Baden-Wrtemberg 76646 + Bruchsal Baden-W�rtemberg 76646 GERMANY 00-0F-BC (hex) Onkey Technologies, Inc. @@ -25892,7 +25892,7 @@ company_id Organization 00-0F-EF (hex) Thales e-Transactions GmbH 000FEF (base 16) Thales e-Transactions GmbH - Konrad-Zuse-Strae 19-21 + Konrad-Zuse-Stra�e 19-21 Bad Hersfeld Hessen 36251 GERMANY @@ -26572,8 +26572,8 @@ company_id Organization 00-10-5B (hex) NET INSIGHT AB 00105B (base 16) NET INSIGHT AB - Vstberga All 9 - SE-1260 30 Hgersten + V�stberga All� 9 + SE-1260 30 H�gersten SWEDEN 00-10-5C (hex) QUANTUM DESIGNS (H.K.) LTD. @@ -28373,8 +28373,8 @@ company_id Organization Hsin Tien City 231 TAIWAN, REPUBLIC OF CHINA -00-11-7B (hex) Bchi Labortechnik AG -00117B (base 16) Bchi Labortechnik AG +00-11-7B (hex) B�chi Labortechnik AG +00117B (base 16) B�chi Labortechnik AG Meierseggstrasse 40 Flawil 9230 SG SWITZERLAND @@ -28513,8 +28513,8 @@ company_id Organization 00-11-91 (hex) CTS-Clima Temperatur Systeme GmbH 001191 (base 16) CTS-Clima Temperatur Systeme GmbH - Lotzencker 21 - Hechingen Badenwrttemberg 72379 + Lotzen�cker 21 + Hechingen Badenw�rttemberg 72379 GERMANY 00-11-92 (hex) Cisco Systems @@ -28908,12 +28908,12 @@ company_id Organization 00-11-CF (hex) Thrane & Thrane A/S 0011CF (base 16) Thrane & Thrane A/S Lundtoftegaardsvej 93D - Lyngby Kbenhavn 2800 + Lyngby K�benhavn 2800 DENMARK 00-11-D0 (hex) Tandberg Data ASA 0011D0 (base 16) Tandberg Data ASA - Kjelssveien 161 + Kjels�sveien 161 Oslo 0411 NORWAY @@ -29002,7 +29002,7 @@ company_id Organization 00-11-DE (hex) EURILOGIC 0011DE (base 16) EURILOGIC - Centrale Parc Bt 7 + Centrale Parc B�t 7 Avenue sully prud'homme Chatenay Malabry 92298 FRANCE @@ -29138,7 +29138,7 @@ company_id Organization 00-11-F3 (hex) NeoMedia Europe AG 0011F3 (base 16) NeoMedia Europe AG Jens-Otto-Krag-Str. 11 - Wrselen Nordrhein-Westfalen 52146 + W�rselen Nordrhein-Westfalen 52146 GERMANY 00-11-F4 (hex) woori-net @@ -29212,7 +29212,7 @@ company_id Organization 0011FF (base 16) Digitro Tecnologia Ltda Rua: Professora Sofia Quint de Souza, 167 Bairro: Capoeiras - Florianpolis Santa Catarina 88085-040 + Florian�polis Santa Catarina 88085-040 BRAZIL 00-12-00 (hex) Cisco @@ -29597,7 +29597,7 @@ company_id Organization 00-12-3B (hex) KeRo Systems ApS 00123B (base 16) KeRo Systems ApS Allikevej 3 - Hrsholm 2970 + H�rsholm 2970 DENMARK 00-12-3C (hex) Second Rule LLC @@ -29749,7 +29749,7 @@ company_id Organization 00-12-53 (hex) AudioDev AB 001253 (base 16) AudioDev AB Kabingatan 9 - Malm SE-212 39 + Malm� SE-212 39 SWEDEN 00-12-54 (hex) Spectra Technologies Holdings Company Ltd @@ -29787,7 +29787,7 @@ company_id Organization 00-12-59 (hex) THERMO ELECTRON KARLSRUHE 001259 (base 16) THERMO ELECTRON KARLSRUHE DIESELSTRASSE 4 - KARLSRUHE BADEN WRTEMBERG 76227 + KARLSRUHE BADEN W�RTEMBERG 76227 GERMANY 00-12-5A (hex) Microsoft Corporation @@ -30002,7 +30002,7 @@ company_id Organization 00-12-7C (hex) SWEGON AB 00127C (base 16) SWEGON AB Box 300 - KVNUM VSTRA GTALAND SE 535 23 + KV�NUM V�STRA G�TALAND SE 535 23 SWEDEN 00-12-7D (hex) MobileAria @@ -30072,7 +30072,7 @@ company_id Organization 00-12-87 (hex) Digital Everywhere Unterhaltungselektronik GmbH 001287 (base 16) Digital Everywhere Unterhaltungselektronik GmbH Maria Gailer Strasse 16 - Villach Krnten 9500 + Villach K�rnten 9500 AUSTRIA 00-12-88 (hex) 2Wire, Inc @@ -30109,7 +30109,7 @@ company_id Organization 00-12-8D (hex) STB Datenservice GmbH 00128D (base 16) STB Datenservice GmbH Weinsbergstrasse 190 - Kln NRW 50825 + K�ln NRW 50825 GERMANY 00-12-8E (hex) Q-Free ASA @@ -30208,7 +30208,7 @@ company_id Organization 00129D (base 16) First International Computer do Brasil Rodovia BR 459 km 121 - Distrito Industrial - Santa Rita do Sapuca Minas Gerais + Santa Rita do Sapuca� Minas Gerais BRAZIL 00-12-9E (hex) Surf Communications Inc. @@ -30309,7 +30309,7 @@ company_id Organization 00-12-AD (hex) IDS GmbH 0012AD (base 16) IDS GmbH Nobelstr, 18 - Ettlingen Baden-Wrttemberg 76275 + Ettlingen Baden-W�rttemberg 76275 GERMANY 00-12-AE (hex) HLS HARD-LINE Solutions Inc. @@ -30447,7 +30447,7 @@ company_id Organization 00-12-C3 (hex) WIT S.A. 0012C3 (base 16) WIT S.A. - 138 avenue Lon Brenger + 138 avenue L�on B�renger Saint Laurent du Var PACA 06700 FRANCE @@ -30531,7 +30531,7 @@ company_id Organization 00-12-D0 (hex) Gossen-Metrawatt-GmbH 0012D0 (base 16) Gossen-Metrawatt-GmbH Thomas-Mann-Str. 16-20 - Nrnberg Bavaria 90471 + N�rnberg Bavaria 90471 GERMANY 00-12-D1 (hex) Texas Instruments Inc @@ -30628,7 +30628,7 @@ company_id Organization 00-12-DF (hex) Novomatic AG 0012DF (base 16) Novomatic AG Wiener Strasse 158 - Gumpoldskirchen Niedersterreich A-2352 + Gumpoldskirchen Nieder�sterreich A-2352 AUSTRIA 00-12-E0 (hex) Codan Limited @@ -31025,7 +31025,7 @@ company_id Organization 00-13-1E (hex) Peiker acustic GmbH & Co. KG 00131E (base 16) Peiker acustic GmbH & Co. KG - Max-Planck-Strae 32 + Max-Planck-Stra�e 32 Friedrichsdorf Hessen 61381 GERMANY @@ -31113,7 +31113,7 @@ company_id Organization 00-13-2C (hex) MAZ Brandenburg GmbH 00132C (base 16) MAZ Brandenburg GmbH - Mielestrae 2 + Mielestra�e 2 Werder Brandenburg 14542 GERMANY @@ -31258,7 +31258,7 @@ company_id Organization 00-13-43 (hex) Matsushita Electronic Components (Europe) GmbH 001343 (base 16) Matsushita Electronic Components (Europe) GmbH - Zeppelinstrae 19 + Zeppelinstra�e 19 Lueneburg Niedersachsen 21337 GERMANY @@ -31427,7 +31427,7 @@ company_id Organization 00-13-5E (hex) EAB/RWI/K 00135E (base 16) EAB/RWI/K - Frgatan 6 + F�r�gatan 6 Stockholm Kista 164 80 SWEDEN @@ -31689,7 +31689,7 @@ company_id Organization 00-13-87 (hex) 27M Technologies AB 001387 (base 16) 27M Technologies AB Diskettgatan 11 - Linkping S-583 35 + Link�ping S-583 35 SWEDEN 00-13-88 (hex) WiMedia Alliance @@ -31699,10 +31699,10 @@ company_id Organization San Ramon CA 94583 UNITED STATES -00-13-89 (hex) Redes de Telefona Mvil S.A. -001389 (base 16) Redes de Telefona Mvil S.A. +00-13-89 (hex) Redes de Telefon�a M�vil S.A. +001389 (base 16) Redes de Telefon�a M�vil S.A. C/Puerto de la Morcuera 14 B4 - Legans Madrid 28918 + Legan�s Madrid 28918 SPAIN 00-13-8A (hex) QINGDAO GOERTEK ELECTRONICS CO.,LTD. @@ -32041,7 +32041,7 @@ company_id Organization 00-13-BE (hex) Virtual Conexions 0013BE (base 16) Virtual Conexions 410 rue St-Nicolas, suite 600 - Montral Qubec H2Y 2P5 + Montr�al Qu�bec H2Y 2P5 CANADA 00-13-BF (hex) Media System Planning Corp. @@ -32053,8 +32053,8 @@ company_id Organization 00-13-C0 (hex) Trix Tecnologia Ltda. 0013C0 (base 16) Trix Tecnologia Ltda. - Rua da Paz, 1957 - Chcara Santo Antnio - So Paulo 04713-002 + Rua da Paz, 1957 - Ch�cara Santo Ant�nio + S�o Paulo 04713-002 BRAZIL 00-13-C1 (hex) Asoka USA Corporation @@ -32613,7 +32613,7 @@ company_id Organization 00-14-17 (hex) RSE Informations Technologie GmbH 001417 (base 16) RSE Informations Technologie GmbH Silberbergstrasse 9 - Wolfsberg Krnten 9400 + Wolfsberg K�rnten 9400 AUSTRIA 00-14-18 (hex) C4Line @@ -32812,7 +32812,7 @@ company_id Organization 00-14-36 (hex) Qwerty Elektronik AB 001436 (base 16) Qwerty Elektronik AB - Blinge Klockargrd + B�linge Klockarg�rd Tystberga 610 60 SWEDEN @@ -33339,7 +33339,7 @@ company_id Organization 00-14-89 (hex) B15402100 - JANDEI, S.L. 001489 (base 16) B15402100 - JANDEI, S.L. POL. IND. POCOMACO, E-28 - LA CORUA 15190 + LA CORU�A 15190 SPAIN 00-14-8A (hex) Elin Ebg Traction Gmbh @@ -33644,7 +33644,7 @@ company_id Organization 00-14-B9 (hex) MSTAR SEMICONDUCTOR 0014B9 (base 16) MSTAR SEMICONDUCTOR - 11-13 rue Ren Jacques + 11-13 rue Ren� Jacques Issy les Moulineaux 92130 FRANCE @@ -33714,7 +33714,7 @@ company_id Organization 00-14-C4 (hex) Vitelcom Mobile Technology 0014C4 (base 16) Vitelcom Mobile Technology - PTA, Avda, Juan Lpez Pealver, n 7 + PTA, Avda, Juan L�pez Pe�alver, n� 7 29590, Campanillas Campanillas. Malaga. SPAIN @@ -33811,7 +33811,7 @@ company_id Organization 00-14-D3 (hex) SEPSA 0014D3 (base 16) SEPSA calle Albatros, 7 y 9 - Pol. Ind. La Estacin + Pol. Ind. La Estaci�n PINTO Madrid 28320 SPAIN @@ -33899,7 +33899,7 @@ company_id Organization 00-14-E1 (hex) Data Display AG 0014E1 (base 16) Data Display AG - Industriestrae 1 + Industriestra�e 1 Germering Bayern 82110 GERMANY @@ -34423,9 +34423,9 @@ company_id Organization Hwaseong Gyeonggi 445-895 KOREA, REPUBLIC OF -00-15-34 (hex) A BELTRNICA, Companhia de Comunicaes, Lda -001534 (base 16) A BELTRNICA, Companhia de Comunicaes, Lda - R. Dr. Jos Baptista de Sousa, 27 +00-15-34 (hex) A BELTR�NICA, Companhia de Comunica��es, Lda +001534 (base 16) A BELTR�NICA, Companhia de Comunica��es, Lda + R. Dr. Jos� Baptista de Sousa, 27 Lisbon 1549-002 Lis PORTUGAL @@ -34554,7 +34554,7 @@ company_id Organization 00-15-48 (hex) CUBE TECHNOLOGIES 001548 (base 16) CUBE TECHNOLOGIES - 10, rue des Rosiristes + 10, rue des Rosi�ristes CHAMPAGNE AU MONT D'OR FRANCE 69410 FRANCE @@ -34592,7 +34592,7 @@ company_id Organization 00-15-4E (hex) IEC 00154E (base 16) IEC - 3, rue de Varemb + 3, rue de Varemb� P.O. Box 131 CH - 1211 GENEVA 20 GERMANY @@ -34632,7 +34632,7 @@ company_id Organization 00-15-54 (hex) Atalum Wireless S.A. 001554 (base 16) Atalum Wireless S.A. - C/ Orellana 5, 1 I + C/ Orellana 5, 1� I Madrid 28004 SPAIN @@ -34880,7 +34880,7 @@ company_id Organization 00-15-7B (hex) Leuze electronic GmbH + Co. KG 00157B (base 16) Leuze electronic GmbH + Co. KG In der Braike 1 - Owen Baden-Wrttemberg 73277 + Owen Baden-W�rttemberg 73277 GERMANY 00-15-7C (hex) Dave Networks, Inc. @@ -35010,7 +35010,7 @@ company_id Organization 00-15-90 (hex) Hectronic GmbH 001590 (base 16) Hectronic GmbH Allmendstrasse 15 - Bonndorf Baden-Wrttemberg 79848 + Bonndorf Baden-W�rttemberg 79848 GERMANY 00-15-91 (hex) RLW Inc. @@ -35118,7 +35118,7 @@ company_id Organization 00-15-A1 (hex) ECA-SINTERS 0015A1 (base 16) ECA-SINTERS - 5, rue Paul Mespl + 5, rue Paul Mespl� TOULOUSE Cedex 01 31106 FRANCE @@ -35191,7 +35191,7 @@ company_id Organization 00-15-AC (hex) Capelon AB 0015AC (base 16) Capelon AB - Jgerhorns vg 1 + J�gerhorns v�g 1 Kungens Kurva Stockholm S-141 75 SWEDEN @@ -35234,7 +35234,7 @@ company_id Organization 00-15-B3 (hex) Caretech AB 0015B3 (base 16) Caretech AB - Nyborgsvgen 197 + Nyborgsv�gen 197 Kalix 95291 SWEDEN @@ -35290,7 +35290,7 @@ company_id Organization 00-15-BC (hex) Develco 0015BC (base 16) Develco - Olof Palmes All 40 + Olof Palmes All� 40 Aarhus N 8200 DENMARK @@ -35447,7 +35447,7 @@ company_id Organization 00-15-D4 (hex) Emitor AB 0015D4 (base 16) Emitor AB - Sjviksbacken 14 + Sj�viksbacken 14 Stockholm 117 43 SWEDEN @@ -35566,7 +35566,7 @@ company_id Organization 00-15-E7 (hex) Quantec ProAudio 0015E7 (base 16) Quantec ProAudio Leopoldstrasse 18 - Mnchen D-80802 + M�nchen D-80802 GERMANY 00-15-E8 (hex) Nortel @@ -35640,7 +35640,7 @@ company_id Organization 00-15-F3 (hex) PELTOR AB 0015F3 (base 16) PELTOR AB Box 2341 - SE-331 02 VRNAMO SE-331 02 + SE-331 02 V�RNAMO SE-331 02 SWEDEN 00-15-F4 (hex) Eventide @@ -35773,8 +35773,8 @@ company_id Organization 00-16-08 (hex) Sequans Communications 001608 (base 16) Sequans Communications - 19 Le Parvis de la Dfense - Btiment CitiCenter + 19 Le Parvis de la D�fense + B�timent CitiCenter PARIS LA DEFENSE CEDEX 92073 FRANCE @@ -35877,8 +35877,8 @@ company_id Organization Songpa-Gu Seoul KOREA, REPUBLIC OF -00-16-19 (hex) La Factora de Comunicaciones Aplicadas,S.L. -001619 (base 16) La Factora de Comunicaciones Aplicadas,S.L. +00-16-19 (hex) La Factor�a de Comunicaciones Aplicadas,S.L. +001619 (base 16) La Factor�a de Comunicaciones Aplicadas,S.L. C/Agricultura,111 Terrassa Barcelona 08223 SPAIN @@ -35934,7 +35934,7 @@ company_id Organization 00-16-22 (hex) BBH SYSTEMS GMBH 001622 (base 16) BBH SYSTEMS GMBH - Bttgerstrasse 40 + B�ttgerstrasse 40 Weiden i.d.OPf. Bayern 92637 GERMANY @@ -35979,7 +35979,7 @@ company_id Organization 00-16-29 (hex) Nivus GmbH 001629 (base 16) Nivus GmbH - Im Tle 2 + Im T�le 2 Eppingen Baden-Wuerttemberg 75031 GERMANY @@ -36015,8 +36015,8 @@ company_id Organization Hsinchu Hsien 307 TAIWAN, REPUBLIC OF CHINA -00-16-2F (hex) Geutebrck GmbH -00162F (base 16) Geutebrck GmbH +00-16-2F (hex) Geutebr�ck GmbH +00162F (base 16) Geutebr�ck GmbH Im Nassen 7-9 Windhagen 53578 GERMANY @@ -36235,7 +36235,7 @@ company_id Organization 00-16-51 (hex) Exeo Systems 001651 (base 16) Exeo Systems 1650, rue Michelin, suite 201 - Laval Qubec H7L 4R3 + Laval Qu�bec H7L 4R3 CANADA 00-16-52 (hex) Hoatech Technologies, Inc. @@ -36473,7 +36473,7 @@ company_id Organization 00-16-77 (hex) Bihl+Wiedemann GmbH 001677 (base 16) Bihl+Wiedemann GmbH Flosswoerthstr. 41 - Mannheim Baden Wrtemberg 68199 + Mannheim Baden W�rtemberg 68199 GERMANY 00-16-78 (hex) SHENZHEN BAOAN GAOKE ELECTRONICS CO., LTD @@ -36655,7 +36655,7 @@ company_id Organization 00-16-94 (hex) Sennheiser Communications A/S 001694 (base 16) Sennheiser Communications A/S Langager 6 - Solrd Strand Copenhagen 2680 + Solr�d Strand Copenhagen 2680 DENMARK 00-16-95 (hex) AVC Technology Limited @@ -36840,7 +36840,7 @@ company_id Organization 00-16-B1 (hex) KBS 0016B1 (base 16) KBS - 88 rue Pierre Smard + 88 rue Pierre S�mard BP 55 Moissy cedex Ile de France 77552 FRANCE @@ -36882,7 +36882,7 @@ company_id Organization 00-16-B8 (hex) Sony Ericsson Mobile Communications 0016B8 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-16-B9 (hex) ProCurve Networking @@ -37076,13 +37076,13 @@ company_id Organization 00-16-D7 (hex) Sunways AG 0016D7 (base 16) Sunways AG Macairestr.3-5 - Konstanz Baden Wrttemberg 78467 + Konstanz Baden W�rttemberg 78467 GERMANY 00-16-D8 (hex) Senea AB 0016D8 (base 16) Senea AB - Fretagsallen 12 - kersberga 18484 + F�retagsallen 12 + �kersberga 18484 SWEDEN 00-16-D9 (hex) NINGBO BIRD CO.,LTD. @@ -37438,7 +37438,7 @@ company_id Organization 00-17-11 (hex) GE Healthcare Bio-Sciences AB 001711 (base 16) GE Healthcare Bio-Sciences AB - Bjrkgatan 30 + Bj�rkgatan 30 Uppsala SE 75184 SWEDEN @@ -37518,7 +37518,7 @@ company_id Organization 00-17-1E (hex) Theo Benning GmbH & Co. KG 00171E (base 16) Theo Benning GmbH & Co. KG - Muensterstrae 135-137 + Muensterstra�e 135-137 Bocholt NRW 46397 GERMANY @@ -37545,7 +37545,7 @@ company_id Organization 00-17-22 (hex) Hanazeder Electronic GmbH 001722 (base 16) Hanazeder Electronic GmbH J.M. Dimmelstr 10 - Ried i. I. Obersterreich 4910 + Ried i. I. Ober�sterreich 4910 AUSTRIA 00-17-23 (hex) Summit Data Communications @@ -37558,7 +37558,7 @@ company_id Organization 00-17-24 (hex) Studer Professional Audio GmbH 001724 (base 16) Studer Professional Audio GmbH Althardstrasse 30 - Regensdorf Zrich CH-8105 + Regensdorf Z�rich CH-8105 SWITZERLAND 00-17-25 (hex) Liquid Computing @@ -37866,7 +37866,7 @@ company_id Organization 00-17-56 (hex) Vinci Labs Oy 001756 (base 16) Vinci Labs Oy Finlaysoninkuja 21 A - Tampere Lnsi-Suomi 33210 + Tampere L�nsi-Suomi 33210 FINLAND 00-17-57 (hex) RIX TECHNOLOGY LIMITED @@ -38064,7 +38064,7 @@ company_id Organization 00-17-75 (hex) TTE Germany GmbH 001775 (base 16) TTE Germany GmbH Hermann-Schwer-Str. 3 - Villingen-Schwenningen Baden-Wrttemberg 78048 + Villingen-Schwenningen Baden-W�rttemberg 78048 GERMANY 00-17-76 (hex) Meso Scale Diagnostics, LLC @@ -38223,7 +38223,7 @@ company_id Organization 00-17-8E (hex) Gunnebo Cash Automation AB 00178E (base 16) Gunnebo Cash Automation AB Fabriksgatan 10 - Gteborg 402 27 + G�teborg 402 27 SWEDEN 00-17-8F (hex) NINGBO YIDONG ELECTRONIC CO.,LTD. @@ -38312,7 +38312,7 @@ company_id Organization 00-17-9C (hex) DEPRAG SCHULZ GMBH u. CO. 00179C (base 16) DEPRAG SCHULZ GMBH u. CO. - Kurfrstenring 12.18 + Kurf�rstenring 12.18 Amberg Bayern 92224 GERMANY @@ -38435,7 +38435,7 @@ company_id Organization 00-17-AF (hex) Enermet 0017AF (base 16) Enermet Salvesenintie - Jysk FIN-40420 + Jysk� FIN-40420 FINLAND 00-17-B0 (hex) Nokia Danmark A/S @@ -38498,7 +38498,7 @@ company_id Organization 00-17-B9 (hex) Gambro Lundia AB 0017B9 (base 16) Gambro Lundia AB BOX 10101 - LUND Skne 22010 + LUND Sk�ne 22010 SWEDEN 00-17-BA (hex) SEDO CO., LTD. @@ -38518,7 +38518,7 @@ company_id Organization 0017BC (base 16) Touchtunes Music Corporation 3 Place du Commerce 4th Floor - Montral Qubec H3E 1H7 + Montr�al Qu�bec H3E 1H7 CANADA 00-17-BD (hex) Tibetsystem @@ -38581,12 +38581,12 @@ company_id Organization 0017C6 (base 16) Cross Match Technologies Inc 400, boul. Jean-Lesage Hall Ouest, Suite 30 - Qubec, Qc G1K 8W1 + Qu�bec, Qc G1K 8W1 CANADA 00-17-C7 (hex) MARA Systems Consulting AB 0017C7 (base 16) MARA Systems Consulting AB - Instrumentvgen 45 + Instrumentv�gen 45 Stockholm 126 53 SWEDEN @@ -39072,7 +39072,7 @@ company_id Organization 00-18-13 (hex) Sony Ericsson Mobile Communications 001813 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-18-14 (hex) Mitutoyo Corporation @@ -39182,7 +39182,7 @@ company_id Organization 00-18-24 (hex) Kimaldi Electronics, S.L. 001824 (base 16) Kimaldi Electronics, S.L. - Ctra. de Rub, 292 B + Ctra. de Rub�, 292 B Pol. Ind. Can Guitard Terrassa Barcelona 08228 SPAIN @@ -39233,9 +39233,9 @@ company_id Organization BenQuao City Taipei 220 TAIWAN, REPUBLIC OF CHINA -00-18-2D (hex) Artec Group O -00182D (base 16) Artec Group O - Tri 10C +00-18-2D (hex) Artec Group O� +00182D (base 16) Artec Group O� + T�ri 10C Tallinn Harjumaa 11313 ESTONIA @@ -39504,7 +39504,7 @@ company_id Organization 00-18-58 (hex) TagMaster AB 001858 (base 16) TagMaster AB - Kronborgsgrnd 1 + Kronborgsgr�nd 1 Kista Stockholm S-16487 SWEDEN @@ -39713,8 +39713,8 @@ company_id Organization 00-18-78 (hex) Mackware GmbH 001878 (base 16) Mackware GmbH - Schnzle 13 - Waiblingen Baden-Wrttemberg 71332 + Sch�nzle 13 + Waiblingen Baden-W�rttemberg 71332 GERMANY 00-18-79 (hex) dSys @@ -39814,7 +39814,7 @@ company_id Organization 00-18-88 (hex) GOTIVE a.s. 001888 (base 16) GOTIVE a.s. - Zmock 34 + Z�mock� 34 Bratislava 81101 SLOVAKIA @@ -39875,7 +39875,7 @@ company_id Organization 00-18-92 (hex) ads-tec GmbH 001892 (base 16) ads-tec GmbH Raiffeisenstrasse 14 - Leinfelden-Echterdingen Baden-Wrttemberg 70771 + Leinfelden-Echterdingen Baden-W�rttemberg 70771 GERMANY 00-18-93 (hex) SHENZHEN PHOTON BROADBAND TECHNOLOGY CO.,LTD @@ -39975,7 +39975,7 @@ company_id Organization 00-18-A2 (hex) XIP Technology AB 0018A2 (base 16) XIP Technology AB PO Box 437 - Jnkping Sweden SE- 551 16 + J�nk�ping Sweden SE- 551 16 SWEDEN 00-18-A3 (hex) ZIPPY TECHNOLOGY CORP. @@ -40166,10 +40166,10 @@ company_id Organization San Diego CA 92129 UNITED STATES -00-18-C1 (hex) Almitec Informtica e Comrcio Ltda. -0018C1 (base 16) Almitec Informtica e Comrcio Ltda. +00-18-C1 (hex) Almitec Inform�tica e Com�rcio Ltda. +0018C1 (base 16) Almitec Inform�tica e Com�rcio Ltda. 461, Francisco de Morais St. - So Paulo 04714-010 + S�o Paulo 04714-010 BRAZIL 00-18-C2 (hex) Firetide, Inc @@ -40361,9 +40361,9 @@ company_id Organization 00-18-E0 (hex) ANAVEO 0018E0 (base 16) ANAVEO - Les Carrs du parc - 10 rue des Rosiristes - CHAMPAGNE au MONT D'OR Rhne F-69410 + Les Carr�s du parc + 10 rue des Rosi�ristes + CHAMPAGNE au MONT D'OR Rh�ne F-69410 FRANCE 00-18-E1 (hex) Verkerk Service Systemen @@ -40510,7 +40510,7 @@ company_id Organization 00-18-F7 (hex) Kameleon Technologies 0018F7 (base 16) Kameleon Technologies - 217, rue St Honor + 217, rue St Honor� Paris 75001 FRANCE @@ -40543,7 +40543,7 @@ company_id Organization 00-18-FC (hex) Altec Electronic AG 0018FC (base 16) Altec Electronic AG Lenggenbachstrasse 3 - Fahrweid Zrich CH-8951 + Fahrweid Z�rich CH-8951 SWITZERLAND 00-18-FD (hex) Optimal Technologies International Inc. @@ -40562,7 +40562,7 @@ company_id Organization 00-18-FF (hex) PowerQuattro Co. 0018FF (base 16) PowerQuattro Co. - Jnos u. 175. + J�nos u. 175. Budapest H-1161 HUNGARY @@ -40575,7 +40575,7 @@ company_id Organization 00-19-01 (hex) F1MEDIA 001901 (base 16) F1MEDIA - 610, Keumkang Hightech , 138-1 Sangdaewon-Dong, Jungwon-Gu + 610, Keumkang Hightech ��, 138-1 Sangdaewon-Dong, Jungwon-Gu Seongnam-Si Gyeonggi-Do 462-707 KOREA, REPUBLIC OF @@ -40601,7 +40601,7 @@ company_id Organization 00-19-05 (hex) SCHRACK Seconet AG 001905 (base 16) SCHRACK Seconet AG Eibesbrunnergasse 18 - Wien sterreich 1122 + Wien �sterreich 1122 AUSTRIA 00-19-06 (hex) Cisco Systems @@ -40738,7 +40738,7 @@ company_id Organization 00-19-1B (hex) Sputnik Engineering AG 00191B (base 16) Sputnik Engineering AG - Hheweg 85 + H�heweg 85 Biel-Bienne BE 2502 SWITZERLAND @@ -40821,7 +40821,7 @@ company_id Organization 00-19-28 (hex) Siemens AG, Transportation Systems 001928 (base 16) Siemens AG, Transportation Systems - Werner-von-Siemens-Strae 67 + Werner-von-Siemens-Stra�e 67 Erlangen 91052 GERMANY @@ -41033,7 +41033,7 @@ company_id Organization 00-19-4A (hex) TESTO AG 00194A (base 16) TESTO AG Testo Strasse 1 - Lenzkirch Baden-Wrtemberg 79853 + Lenzkirch Baden-W�rtemberg 79853 GERMANY 00-19-4B (hex) SAGEM COMMUNICATION @@ -41191,7 +41191,7 @@ company_id Organization 00-19-63 (hex) Sony Ericsson Mobile Communications AB 001963 (base 16) Sony Ericsson Mobile Communications AB Nya Vattentornet - Lund Skne 221 88 + Lund Sk�ne 221 88 SWEDEN 00-19-64 (hex) Doorking Inc. @@ -41388,7 +41388,7 @@ company_id Organization 00-19-82 (hex) SmarDTV 001982 (base 16) SmarDTV 531 Avenue du Serpolet - ZE Athlia 2 + ZE Ath�lia 2 La Ciotat France 13 704 FRANCE @@ -41465,7 +41465,7 @@ company_id Organization 00-19-8E (hex) Oticon A/S 00198E (base 16) Oticon A/S Kongebakken 9 - Smrum 2765 + Sm�rum 2765 DENMARK 00-19-8F (hex) Alcatel Bell N.V. @@ -41509,7 +41509,7 @@ company_id Organization 00-19-95 (hex) Jurong Hi-Tech (Suzhou)Co.ltd 001995 (base 16) Jurong Hi-Tech (Suzhou)Co.ltd - 275,Xing Long StreetSuzhou Indudtrial Park + 275,Xing Long Street��Suzhou Indudtrial Park Suzhou Jiang Su 215021 CHINA @@ -41950,7 +41950,7 @@ company_id Organization 00-19-D9 (hex) Zeutschel GmbH 0019D9 (base 16) Zeutschel GmbH Heerweg 2 - Tbingen-Hirschau BW D-72070 + T�bingen-Hirschau BW D-72070 GERMANY 00-19-DA (hex) Welltrans O&E Technology Co. , Ltd. @@ -41968,7 +41968,7 @@ company_id Organization 00-19-DC (hex) ENENSYS Technologies 0019DC (base 16) ENENSYS Technologies Le Germanium - 80 Avenue des buttes de Cosmes + 80 Avenue des buttes de Co�smes RENNES Brittany 35700 FRANCE @@ -42937,7 +42937,7 @@ company_id Organization 00-1A-75 (hex) Sony Ericsson Mobile Communications 001A75 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-1A-76 (hex) SDT information Technology Co.,LTD. @@ -42955,7 +42955,7 @@ company_id Organization 00-1A-78 (hex) ubtos 001A78 (base 16) ubtos - Rn.213, Woolim Lions Valley , #680 + Rn.213, Woolim Lion��s Valley ��, #680 seoul Gasan-dong 153-803 KOREA, REPUBLIC OF @@ -43089,7 +43089,7 @@ company_id Organization 00-1A-8D (hex) AVECS Bergen GmbH 001A8D (base 16) AVECS Bergen GmbH Billrothstr. 11 a - Bergen auf Rgen M/V 18528 + Bergen auf R�gen M/V 18528 GERMANY 00-1A-8E (hex) 3Way Networks Ltd @@ -43106,11 +43106,11 @@ company_id Organization Brampton Ontario L6T 5P6 CANADA -00-1A-90 (hex) Trpico Sistemas e Telecomunicaes da Amaznia LTDA. -001A90 (base 16) Trpico Sistemas e Telecomunicaes da Amaznia LTDA. +00-1A-90 (hex) Tr�pico Sistemas e Telecomunica��es da Amaz�nia LTDA. +001A90 (base 16) Tr�pico Sistemas e Telecomunica��es da Amaz�nia LTDA. Rod. Campinas-Mogi-Mirim (SP 340) Km 118,5 - Polis de Tecnologia (CPqD)-Prdio 9A - Campinas So Paulo 13.086-902 + Polis de Tecnologia (CPqD)-Pr�dio 9A + Campinas S�o Paulo 13.086-902 BRAZIL 00-1A-91 (hex) FusionDynamic Ltd. @@ -43129,7 +43129,7 @@ company_id Organization 00-1A-93 (hex) ERCO Leuchten GmbH 001A93 (base 16) ERCO Leuchten GmbH Brockhauser Weg 80-82 - Ldenscheid NRW D-58507 + L�denscheid NRW D-58507 GERMANY 00-1A-94 (hex) Votronic GmbH @@ -43248,7 +43248,7 @@ company_id Organization 00-1A-A6 (hex) Telefunken Radio Communication Systems GmbH &CO.KG 001AA6 (base 16) Telefunken Radio Communication Systems GmbH &CO.KG Eberhard-Finckh-Strasse 55 - Ulm Baden-Wrttemberg 89075 + Ulm Baden-W�rttemberg 89075 GERMANY 00-1A-A7 (hex) Torian Wireless @@ -43303,8 +43303,8 @@ company_id Organization 00-1A-AF (hex) BLUSENS TECHNOLOGY 001AAF (base 16) BLUSENS TECHNOLOGY EDIFICIO CNL,- AV. - FERNANDO CASAS NOVOA ,N 37B 2 - 15707 - SANTIAGO DE COMPOSTELA A CORUA + FERNANDO CASAS NOVOA ,N� 37B 2� + 15707 - SANTIAGO DE COMPOSTELA A CORU�A SPAIN 00-1A-B0 (hex) Signal Networks Pvt. Ltd., @@ -43466,7 +43466,7 @@ company_id Organization 00-1A-C8 (hex) ISL (Instrumentation Scientifique de Laboratoire) 001AC8 (base 16) ISL (Instrumentation Scientifique de Laboratoire) Impasse des 4 vents - Parc d'Activit de la Mesnillire + Parc d'Activit� de la Mesnilli�re VERSON CALVADOS 14790 FRANCE @@ -43567,7 +43567,7 @@ company_id Organization 00-1A-D8 (hex) AlsterAero GmbH 001AD8 (base 16) AlsterAero GmbH - Lbecker Strae 1 + L�becker Stra�e 1 Hamburg 22087 GERMANY @@ -43768,8 +43768,8 @@ company_id Organization 00-1A-F7 (hex) dataschalt e+a GmbH 001AF7 (base 16) dataschalt e+a GmbH - An der Hlshorst 7-9 - Lbeck 23568 + An der H�lshorst 7-9 + L�beck 23568 GERMANY 00-1A-F8 (hex) Copley Controls Corporation @@ -43864,7 +43864,7 @@ company_id Organization 001B06 (base 16) Ateliers R. LAUMONIER 11, rue du Chenival BP 1 - Nesles la Valle Val d'Oise 95690 + Nesles la Vall�e Val d'Oise 95690 FRANCE 00-1B-07 (hex) Mendocino Software @@ -44024,7 +44024,7 @@ company_id Organization 00-1B-1F (hex) DELTA - Danish Electronics, Light & Acoustics 001B1F (base 16) DELTA - Danish Electronics, Light & Acoustics Venlighedsvej 4 - Hrsholm DK-2970 + H�rsholm DK-2970 DENMARK 00-1B-20 (hex) TPine Technology @@ -44507,7 +44507,7 @@ company_id Organization 001B6A (base 16) Powerwave Technologies Sweden AB 164 26 Kista - Knarrarnsgatan 7, Kista + Knarrarn�sgatan 7, Kista SWEDEN 00-1B-6B (hex) Swyx Solutions AG @@ -44832,7 +44832,7 @@ company_id Organization 00-1B-9D (hex) Novus Security Sp. z o.o. 001B9D (base 16) Novus Security Sp. z o.o. - ul. Puawska 431 + ul. Pu�awska 431 Warsaw woj. mazowieckie 02-801 POLAND @@ -44855,10 +44855,10 @@ company_id Organization 34000 Montpellier FRANCE -00-1B-A1 (hex) mic AB -001BA1 (base 16) mic AB +00-1B-A1 (hex) �mic AB +001BA1 (base 16) �mic AB Uppsala science park - Dag Hammrskjlds vg 52 B + Dag Hammrskj�lds v�g 52 B Uppsala 75183 SWEDEN @@ -44870,7 +44870,7 @@ company_id Organization 00-1B-A3 (hex) Flexit Group GmbH 001BA3 (base 16) Flexit Group GmbH - Bruhausstrae 14 + Br�uhausstra�e 14 Salzburg Salzburg 5020 AUSTRIA @@ -45048,7 +45048,7 @@ company_id Organization 00-1B-BF (hex) SAGEM COMMUNICATION 001BBF (base 16) SAGEM COMMUNICATION 14 Rue Paul Dautier - Vlizy 78457 + V�lizy 78457 FRANCE 00-1B-C0 (hex) Juniper Networks @@ -45257,8 +45257,8 @@ company_id Organization 00-1B-E0 (hex) TELENOT ELECTRONIC GmbH 001BE0 (base 16) TELENOT ELECTRONIC GmbH - Wiesentalstrae 42 - Aalen Baden-Wrttemberg 73434 + Wiesentalstra�e 42 + Aalen Baden-W�rttemberg 73434 GERMANY 00-1B-E1 (hex) ViaLogy @@ -45294,7 +45294,7 @@ company_id Organization 00-1B-E6 (hex) VR AG 001BE6 (base 16) VR AG - Rtistrasse 18 + R�tistrasse 18 Schlieren CH-8952 SWITZERLAND @@ -45388,9 +45388,9 @@ company_id Organization 18-24 SHAN MEI ST, FOTAN HONG KONG -00-1B-F5 (hex) Tellink Sistemas de Telecomunicacin S.L. -001BF5 (base 16) Tellink Sistemas de Telecomunicacin S.L. - C/ Mara Tubau N 5 Bajo B +00-1B-F5 (hex) Tellink Sistemas de Telecomunicaci�n S.L. +001BF5 (base 16) Tellink Sistemas de Telecomunicaci�n S.L. + C/ Mar�a Tubau N� 5 Bajo B Madrid 28050 SPAIN @@ -45621,7 +45621,7 @@ company_id Organization 00-1C-19 (hex) secunet Security Networks AG 001C19 (base 16) secunet Security Networks AG - Kronprinzenstrae 30 + Kronprinzenstra�e 30 Essen NRW 45128 GERMANY @@ -45634,7 +45634,7 @@ company_id Organization 00-1C-1B (hex) Hyperstone GmbH 001C1B (base 16) Hyperstone GmbH Line-Eid-Str. 3 - Konstanz Baden-Wrttemberg 78467 + Konstanz Baden-W�rttemberg 78467 GERMANY 00-1C-1C (hex) Center Communication Systems GmbH @@ -45756,7 +45756,7 @@ company_id Organization 00-1C-2F (hex) Pfister GmbH 001C2F (base 16) Pfister GmbH - Sttzlinger Strae 70 + St�tzlinger Stra�e 70 Augsburg Bavaria 86165 GERMANY @@ -45769,7 +45769,7 @@ company_id Organization 00-1C-31 (hex) Mobile XP Technology Co., LTD 001C31 (base 16) Mobile XP Technology Co., LTD - Room No.2506,Tri-tower C building,No.66Zhongguancun East Road,Haidian District + Room No.2506,Tri-tower C building,No.66��Zhongguancun East Road,Haidian District Beijing 100080 CHINA @@ -45800,7 +45800,7 @@ company_id Organization 00-1C-36 (hex) iNEWiT NV 001C36 (base 16) iNEWiT NV - Schalinhoevedreef 20D + Schali�nhoevedreef 20D Mechelen Antwerp 2800 BELGIUM @@ -45847,7 +45847,7 @@ company_id Organization 00-1C-3D (hex) WaveStorm 001C3D (base 16) WaveStorm 40 rue d'Oradour-sur-Glane - Paris le-de-France 75015 + Paris �le-de-France 75015 FRANCE 00-1C-3E (hex) ECKey Limited @@ -45952,13 +45952,13 @@ company_id Organization 00-1C-4E (hex) TASA International Limited 001C4E (base 16) TASA International Limited - 5FBuilding2No.1295 ,Xin Jinqiao Road, + 5F��Building2��No.1295 ,Xin Jinqiao Road, Shanghai 201206 CHINA 00-1C-4F (hex) MACAB AB 001C4F (base 16) MACAB AB - Vannhgsgatan 7 + Vannh�gsgatan 7 Trelleborg 23166 SWEDEN @@ -46105,7 +46105,7 @@ company_id Organization 00-1C-66 (hex) UCAMP CO.,LTD 001C66 (base 16) UCAMP CO.,LTD - #1015, Kolon Science Valley + #1015, Kolon Science Valley �� Seoul Guro-Dong,Guro-gu, 152-848 KOREA, REPUBLIC OF @@ -46183,7 +46183,7 @@ company_id Organization 00-1C-72 (hex) Mayer & Cie GmbH & Co KG 001C72 (base 16) Mayer & Cie GmbH & Co KG Emil Mayer Strasse 10 - Albstadt Baden Wrttemberg 72461 + Albstadt Baden W�rttemberg 72461 GERMANY 00-1C-73 (hex) Arista Networks, Inc. @@ -46201,7 +46201,7 @@ company_id Organization 00-1C-75 (hex) RF Systems GmbH 001C75 (base 16) RF Systems GmbH - Einsteinstrae 11 + Einsteinstra�e 11 Viernheim Hessen D 68519 GERMANY @@ -46357,7 +46357,7 @@ company_id Organization 00-1C-8D (hex) Mesa Imaging 001C8D (base 16) Mesa Imaging Badenerstrasse 569 - Zrich ZH 8048 + Z�rich ZH 8048 SWITZERLAND 00-1C-8E (hex) Alcatel-Lucent IPD @@ -46443,7 +46443,7 @@ company_id Organization 00-1C-9B (hex) FEIG ELECTRONIC GmbH 001C9B (base 16) FEIG ELECTRONIC GmbH - Lange Strae 4 + Lange Stra�e 4 Weilburg Hessen 35781 GERMANY @@ -46463,7 +46463,7 @@ company_id Organization 00-1C-9E (hex) Dualtech IT AB 001C9E (base 16) Dualtech IT AB Banehagsgatan 1F - GOTHENBURG Vstra Gtaland 41451 + GOTHENBURG V�stra G�taland 41451 SWEDEN 00-1C-9F (hex) Razorstream, LLC @@ -46499,7 +46499,7 @@ company_id Organization 00-1C-A4 (hex) Sony Ericsson Mobile Communications 001CA4 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-1C-A5 (hex) Zygo Corporation @@ -46827,8 +46827,8 @@ company_id Organization 00-1C-D7 (hex) Harman/Becker Automotive Systems GmbH 001CD7 (base 16) Harman/Becker Automotive Systems GmbH - Becker-Gring-Str. 16 - Karlsbad Baden - Wrttemberg 76307 + Becker-G�ring-Str. 16 + Karlsbad Baden - W�rttemberg 76307 GERMANY 00-1C-D8 (hex) BlueAnt Wireless @@ -46888,8 +46888,8 @@ company_id Organization 00-1C-E1 (hex) INDRA SISTEMAS, S.A. 001CE1 (base 16) INDRA SISTEMAS, S.A. - Ctra. de Loeches, n. 9 - TORREJN DE ARDOZ MADRID 28850 + Ctra. de Loeches, n.� 9 + TORREJ�N DE ARDOZ MADRID 28850 SPAIN 00-1C-E2 (hex) Attero Tech, LLC. @@ -46918,7 +46918,7 @@ company_id Organization 00-1C-E6 (hex) INNES 001CE6 (base 16) INNES - 80 avenue des Buttes de Cosmes + 80 avenue des Buttes de Co�smes RENNES 35700 FRANCE @@ -47230,7 +47230,7 @@ company_id Organization 00-1D-16 (hex) Efixo 001D16 (base 16) Efixo 5 avenue de Saint Menet - Immeuble Axiome, Bt B + Immeuble Axiome, B�t B MARSEILLE PACA 13011 FRANCE @@ -47299,13 +47299,13 @@ company_id Organization 00-1D-21 (hex) Alcad SL 001D21 (base 16) Alcad SL Pol. Ind. Arreche-Ugalde, 1 - Irn Guipzcoa E-20305 + Ir�n Guip�zcoa E-20305 SPAIN 00-1D-22 (hex) Foss Analytical A/S 001D22 (base 16) Foss Analytical A/S Slangerupgade 69 - Hillerd Seeland 3400 + Hiller�d Seeland 3400 DENMARK 00-1D-23 (hex) SENSUS @@ -47346,7 +47346,7 @@ company_id Organization 00-1D-29 (hex) Doro AB 001D29 (base 16) Doro AB - Magistratsvgen 10 + Magistratsv�gen 10 Lund 226 43 SWEDEN @@ -47392,7 +47392,7 @@ company_id Organization 00-1D-30 (hex) YX Wireless S.A. 001D30 (base 16) YX Wireless S.A. - Av. Vicua Mackenna #4860 + Av. Vicu�a Mackenna #4860 Edificio 512, piso 3. Macul Santiago 8580710 CHILE @@ -47545,7 +47545,7 @@ company_id Organization 00-1D-48 (hex) Sensor-Technik Wiedemann GmbH 001D48 (base 16) Sensor-Technik Wiedemann GmbH - Am Brenwald 6 + Am B�renwald 6 Kaufbeuren Bayern 87600 GERMANY @@ -47595,7 +47595,7 @@ company_id Organization 00-1D-50 (hex) SPINETIX SA 001D50 (base 16) SPINETIX SA - Parc Scientifique de l'EPFL, Btiment C + Parc Scientifique de l'EPFL, B�timent C Lausanne VD 1015 SWITZERLAND @@ -47663,8 +47663,8 @@ company_id Organization 00-1D-5B (hex) Tecvan Informatica Ltda 001D5B (base 16) Tecvan Informatica Ltda Rua Guaicurus, 145 - Vila Conceico - Diadema So Paulo 09911-630 + Vila Conceic�o + Diadema S�o Paulo 09911-630 BRAZIL 00-1D-5C (hex) Tom Communication Industrial Co.,Ltd. @@ -47714,7 +47714,7 @@ company_id Organization 00-1D-63 (hex) Miele & Cie. KG 001D63 (base 16) Miele & Cie. KG Carl-Miele-Str. 29 - Gtersloh 33332 + G�tersloh 33332 GERMANY 00-1D-64 (hex) Adam Communications Systems Int Ltd @@ -48315,8 +48315,8 @@ company_id Organization 00-1D-C2 (hex) XORTEC OY 001DC2 (base 16) XORTEC OY - Hytmntie 6 - Lempl Pirkanmaa 33880 + H�yt�m�ntie 6 + Lemp��l� Pirkanmaa 33880 FINLAND 00-1D-C3 (hex) RIKOR TV, Ltd @@ -48370,8 +48370,8 @@ company_id Organization Airdrie Lanarkshire ML6 7UD UNITED KINGDOM -00-1D-CB (hex) Exns Development Oy -001DCB (base 16) Exns Development Oy +00-1D-CB (hex) Ex�ns Development Oy +001DCB (base 16) Ex�ns Development Oy Kauppakatu 36 Kajaani Kainuu 87100 FINLAND @@ -48462,8 +48462,8 @@ company_id Organization 00-1D-DA (hex) Mikroelektronika spol. s r. o. 001DDA (base 16) Mikroelektronika spol. s r. o. - Drby 849 - Vysok Mto CZ 566 01 + Dr�by 849 + Vysok� M�to CZ 566 01 CZECH REPUBLIC 00-1D-DB (hex) C-BEL Corporation @@ -48590,10 +48590,10 @@ company_id Organization San Francisco CA 94107 UNITED STATES -00-1D-EE (hex) NEXTVISION SISTEMAS DIGITAIS DE TELEVISO LTDA. -001DEE (base 16) NEXTVISION SISTEMAS DIGITAIS DE TELEVISO LTDA. +00-1D-EE (hex) NEXTVISION SISTEMAS DIGITAIS DE TELEVIS�O LTDA. +001DEE (base 16) NEXTVISION SISTEMAS DIGITAIS DE TELEVIS�O LTDA. Alameda Rio Negro, 1030 - 19o. andar conj. 1904 - Barueri So Paulo 06454-000 + Barueri S�o Paulo 06454-000 BRAZIL 00-1D-EF (hex) TRIMM, INC. @@ -48645,10 +48645,10 @@ company_id Organization Gumi Gyeongbuk 730-350 KOREA, REPUBLIC OF -00-1D-F7 (hex) R. STAHL Schaltgerte GmbH -001DF7 (base 16) R. STAHL Schaltgerte GmbH +00-1D-F7 (hex) R. STAHL Schaltger�te GmbH +001DF7 (base 16) R. STAHL Schaltger�te GmbH am Bahnhof 30 - Waldenburg Baden Wrttemberg 74638 + Waldenburg Baden W�rttemberg 74638 GERMANY 00-1D-F8 (hex) Webpro Vision Technology Corporation @@ -49631,7 +49631,7 @@ company_id Organization 00-1E-92 (hex) JEULIN S.A. 001E92 (base 16) JEULIN S.A. - ZI N1 + ZI N�1 rue Jacques Monod Evreux F27019 FRANCE @@ -49822,7 +49822,7 @@ company_id Organization 00-1E-B0 (hex) ImesD Electronica S.L. 001EB0 (base 16) ImesD Electronica S.L. - Entena 81 + Enten�a 81 Barcelona 08015 SPAIN @@ -50002,7 +50002,7 @@ company_id Organization 00-1E-CC (hex) CDVI 001ECC (base 16) CDVI - 31 Avenue du Gnral Leclerc + 31 Avenue du G�n�ral Leclerc PANTIN Ile de France 93500 FRANCE @@ -50066,7 +50066,7 @@ company_id Organization 00-1E-D6 (hex) Alentec & Orion AB 001ED6 (base 16) Alentec & Orion AB Box 108 - 132 23 Saltsj-Boo + 132 23 Saltsj�-Boo SWEDEN 00-1E-D7 (hex) H-Stream Wireless, Inc. @@ -50181,7 +50181,7 @@ company_id Organization 00-1E-E9 (hex) Stoneridge Electronics AB 001EE9 (base 16) Stoneridge Electronics AB - Grdsfogdevgen 18A + G�rdsfogdev�gen 18A Bromma Stockholm 168 66 SWEDEN @@ -50317,8 +50317,8 @@ company_id Organization 00-1E-FE (hex) LEVEL s.r.o. 001EFE (base 16) LEVEL s.r.o. - Plhovsk 1997 - Nchod 547 01 + Plhovsk� 1997 + N�chod 547 01 CZECH REPUBLIC 00-1E-FF (hex) Mueller-Elektronik GmbH & Co. KG @@ -50565,7 +50565,7 @@ company_id Organization 00-1F-25 (hex) MBS GmbH 001F25 (base 16) MBS GmbH - Rmerstrae 15 + R�merstra�e 15 Krefeld Nordrhein-Westfalen 47809 GERMANY @@ -50696,7 +50696,7 @@ company_id Organization 00-1F-39 (hex) Construcciones y Auxiliar de Ferrocarriles, S.A. 001F39 (base 16) Construcciones y Auxiliar de Ferrocarriles, S.A. C/ J.M. Iturrioz, 26 - Beasain Guipzcoa E-20200 + Beasain Guip�zcoa E-20200 SPAIN 00-1F-3A (hex) Hon Hai Precision Ind.Co., Ltd. @@ -50850,14 +50850,14 @@ company_id Organization Ronkonkoma NY 11779 UNITED STATES -00-1F-52 (hex) UVT Unternehmensberatung fr Verkehr und Technik GmbH -001F52 (base 16) UVT Unternehmensberatung fr Verkehr und Technik GmbH +00-1F-52 (hex) UVT Unternehmensberatung f�r Verkehr und Technik GmbH +001F52 (base 16) UVT Unternehmensberatung f�r Verkehr und Technik GmbH Josefsstr.54-56 Mainz RLP 55118 GERMANY -00-1F-53 (hex) GEMAC Gesellschaft fr Mikroelektronikanwendung Chemnitz mbH -001F53 (base 16) GEMAC Gesellschaft fr Mikroelektronikanwendung Chemnitz mbH +00-1F-53 (hex) GEMAC Gesellschaft f�r Mikroelektronikanwendung Chemnitz mbH +001F53 (base 16) GEMAC Gesellschaft f�r Mikroelektronikanwendung Chemnitz mbH Zwickauer Str. 227 Chemnitz Sachsen 09116 GERMANY @@ -50935,7 +50935,7 @@ company_id Organization 00-1F-5F (hex) Blatand GmbH 001F5F (base 16) Blatand GmbH - Lichtenbergstrae 8 + Lichtenbergstra�e 8 Garching Bavaria 85748 GERMANY @@ -50991,7 +50991,7 @@ company_id Organization 00-1F-68 (hex) Martinsson Elektronik AB 001F68 (base 16) Martinsson Elektronik AB Box 9060 - Hgersten Stockholm 126 09 + H�gersten Stockholm 126 09 SWEDEN 00-1F-69 (hex) Pingood Technology Co., Ltd. @@ -51034,7 +51034,7 @@ company_id Organization 00-1F-6F (hex) Fujian Sunnada Communication Co.,Ltd. 001F6F (base 16) Fujian Sunnada Communication Co.,Ltd. - 7/FMain BuildingFujian Torch Hi-Tech Innovation Park#611 Industrial Road FuzhouPRC 350002 + 7/F��Main Building��Fujian Torch Hi-Tech Innovation Park��#611 Industrial Road�� Fuzhou��PRC 350002 7# Building B District, Software Park, TongPan Road Fuzhou, PRC 350003 Fuzhou Fujian 350002 CHINA @@ -51099,8 +51099,8 @@ company_id Organization 00-1F-79 (hex) Lodam Electronics A/S 001F79 (base 16) Lodam Electronics A/S - Krvej 77 - Snderborg Als DK-6400 + K�rvej 77 + S�nderborg Als DK-6400 DENMARK 00-1F-7A (hex) WiWide Inc. @@ -51124,7 +51124,7 @@ company_id Organization 00-1F-7D (hex) embedded wireless GmbH 001F7D (base 16) embedded wireless GmbH - Sflinger Str. 100 + S�flinger Str. 100 Ulm BW 89077 GERMANY @@ -51643,7 +51643,7 @@ company_id Organization 00-1F-CF (hex) MSI Technology GmbH 001FCF (base 16) MSI Technology GmbH - Hanauer Landstrae 328-330 + Hanauer Landstra�e 328-330 Frankfurt am Main Hessen 60314 GERMANY @@ -51773,12 +51773,12 @@ company_id Organization 00-1F-E4 (hex) Sony Ericsson Mobile Communications 001FE4 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-1F-E5 (hex) In-Circuit GmbH 001FE5 (base 16) In-Circuit GmbH - Knigsbrcker Strasse 69 + K�nigsbr�cker Strasse 69 Dresden 01099 GERMANY @@ -51819,10 +51819,10 @@ company_id Organization Carrum Downs Victoria 3201 AUSTRALIA -00-1F-EC (hex) Synapse lectronique -001FEC (base 16) Synapse lectronique +00-1F-EC (hex) Synapse �lectronique +001FEC (base 16) Synapse �lectronique 1010, 7e Avenue - Grand-Mre Qubec G9T 2B8 + Grand-M�re Qu�bec G9T 2B8 CANADA 00-1F-ED (hex) Tecan Systems Inc. @@ -51834,7 +51834,7 @@ company_id Organization 00-1F-EE (hex) ubisys technologies GmbH 001FEE (base 16) ubisys technologies GmbH Am Wehrhahn 45 - Dsseldorf NRW 40211 + D�sseldorf NRW 40211 GERMANY 00-1F-EF (hex) SHINSEI INDUSTRIES CO.,LTD @@ -53698,7 +53698,7 @@ company_id Organization 00-21-13 (hex) Padtec S/A 002113 (base 16) Padtec S/A Road Campinas Mogi-Mirim km 118,5 - Campinas So Paulo 13086-902 + Campinas S�o Paulo 13086-902 BRAZIL 00-21-14 (hex) Hylab Technology Inc. @@ -53761,7 +53761,7 @@ company_id Organization 00-21-1D (hex) Dataline AB 00211D (base 16) Dataline AB Katrinedalsgatan 53 - BORS S-50451 + BOR�S S-50451 SWEDEN 00-21-1E (hex) Motorola Mobility, Inc. @@ -53869,7 +53869,7 @@ company_id Organization 00-21-2E (hex) dresden-elektronik 00212E (base 16) dresden-elektronik - Glasewaldtstrae 22 + Glasewaldtstra�e 22 Dresden Saxony D-01277 GERMANY @@ -54181,7 +54181,7 @@ company_id Organization 00-21-5F (hex) IHSE GmbH 00215F (base 16) IHSE GmbH Maybachstrasse 11 - Oberteuringen Baden-Wrttemberg 88094 + Oberteuringen Baden-W�rttemberg 88094 GERMANY 00-21-60 (hex) Hidea Solutions Co. Ltd. @@ -54341,7 +54341,7 @@ company_id Organization 00-21-78 (hex) Matuschek Messtechnik GmbH 002178 (base 16) Matuschek Messtechnik GmbH - Werner Heisenberg Strae 14 + Werner Heisenberg Stra�e 14 Alsdorf NRW 52477 GERMANY @@ -54360,8 +54360,8 @@ company_id Organization 00-21-7B (hex) Bastec AB 00217B (base 16) Bastec AB - Hstvgen 4A - Malm M 212 35 + H�stv�gen 4A + Malm� M 212 35 SWEDEN 00-21-7C (hex) 2Wire @@ -54576,7 +54576,7 @@ company_id Organization 00-21-9E (hex) Sony Ericsson Mobile Communications 00219E (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-21-9F (hex) SATEL OY @@ -54814,7 +54814,7 @@ company_id Organization 00-21-C4 (hex) Consilium AB 0021C4 (base 16) Consilium AB - Vstra Finnbodavgen 2-4 + V�stra Finnbodav�gen 2-4 Nacka Stockholm 13131 SWEDEN @@ -54859,8 +54859,8 @@ company_id Organization 00-21-CB (hex) SMS TECNOLOGIA ELETRONICA LTDA 0021CB (base 16) SMS TECNOLOGIA ELETRONICA LTDA - Av. Pirmide, 661 - DIADEMA SO PAULO 09970330 + Av. Pir�mide, 661 + DIADEMA S�O PAULO 09970330 BRAZIL 00-21-CC (hex) Flextronics International @@ -54916,7 +54916,7 @@ company_id Organization 00-21-D4 (hex) Vollmer Werke GmbH 0021D4 (base 16) Vollmer Werke GmbH Maschinenfabrik - Biberach Baden-Wrttemberg 88400 + Biberach Baden-W�rttemberg 88400 GERMANY 00-21-D5 (hex) X2E GmbH @@ -55005,7 +55005,7 @@ company_id Organization 00-21-E2 (hex) Creative Electronic GmbH 0021E2 (base 16) Creative Electronic GmbH Lorcher Strasse 52 - Birenbach Baden-Wrttemberg 73102 + Birenbach Baden-W�rttemberg 73102 GERMANY 00-21-E3 (hex) SerialTek LLC @@ -55055,7 +55055,7 @@ company_id Organization 00-21-EA (hex) Bystronic Laser AG 0021EA (base 16) Bystronic Laser AG Industriestr. 21 - 3362 Niedernz + 3362 Nieder�nz SWITZERLAND 00-21-EB (hex) ESP SYSTEMS, LLC @@ -55183,7 +55183,7 @@ company_id Organization 00-21-FF (hex) Cyfrowy Polsat SA 0021FF (base 16) Cyfrowy Polsat SA - ubinowa 4A + �ubinowa 4A Warsaw Mazowieckie 03-878 POLAND @@ -55199,10 +55199,10 @@ company_id Organization Calgary T2L 2K7 CANADA -00-22-02 (hex) Excito Elektronik i Skne AB -002202 (base 16) Excito Elektronik i Skne AB +00-22-02 (hex) Excito Elektronik i Sk�ne AB +002202 (base 16) Excito Elektronik i Sk�ne AB Box 126 - Lddekpinge 246 22 + L�ddek�pinge 246 22 SWEDEN 00-22-03 (hex) Glensound Electronics Ltd @@ -55225,13 +55225,13 @@ company_id Organization 00-22-06 (hex) Cyberdyne Inc. 002206 (base 16) Cyberdyne Inc. - 504@C49-2 + 504�@C49-2 Tsukuba-shi Ibaraki-ken 305-0817 JAPAN 00-22-07 (hex) Inteno Broadband Technology AB 002207 (base 16) Inteno Broadband Technology AB - Drivhjulsvgen 22 + Drivhjulsv�gen 22 Stockholm SE 12630 SWEDEN @@ -55333,8 +55333,8 @@ company_id Organization 00-22-17 (hex) Neat Electronics 002217 (base 16) Neat Electronics - Varuvgen 2 - Lddekpinge Skne SE-24642 + Varuv�gen 2 + L�ddek�pinge Sk�ne SE-24642 SWEDEN 00-22-18 (hex) Verivue Inc. @@ -55435,7 +55435,7 @@ company_id Organization 00-22-27 (hex) uv-electronic GmbH 002227 (base 16) uv-electronic GmbH Grosswiesenstrasse 20 - Durchhausen Baden-Wrttemberg 78591 + Durchhausen Baden-W�rttemberg 78591 GERMANY 00-22-28 (hex) Breeze Innovations Ltd. @@ -55477,7 +55477,7 @@ company_id Organization 00-22-2E (hex) maintech GmbH 00222E (base 16) maintech GmbH Seeweg 60 - Hchberg Bavaria 97204 + H�chberg Bavaria 97204 GERMANY 00-22-2F (hex) Open Grid Computing, Inc. @@ -55618,7 +55618,7 @@ company_id Organization 00-22-45 (hex) Leine & Linde AB 002245 (base 16) Leine & Linde AB Box 8 - Strngns Sdermanland SE-645 21 + Str�ngn�s S�dermanland SE-645 21 SWEDEN 00-22-46 (hex) Evoc Intelligent Technology Co.,Ltd. @@ -55642,7 +55642,7 @@ company_id Organization 00-22-49 (hex) HOME MULTIENERGY SL 002249 (base 16) HOME MULTIENERGY SL - CAPITN HAYA 1 + CAPIT�N HAYA 1 EDIFICIO EUCOCENTRO BAJO MADRID 28020 SPAIN @@ -55745,7 +55745,7 @@ company_id Organization 00-22-59 (hex) Guangzhou New Postcom Equipment Co.,Ltd. 002259 (base 16) Guangzhou New Postcom Equipment Co.,Ltd. - No.3Guangpuxi Road,Guangzhou Science City, + No.3��Guangpuxi Road,Guangzhou Science City, Guangzhou Guangdong 510663 CHINA @@ -55893,9 +55893,9 @@ company_id Organization Sunnyvale CA 94085 UNITED STATES -00-22-71 (hex) Jger Computergesteuerte Messtechnik GmbH -002271 (base 16) Jger Computergesteuerte Messtechnik GmbH - Rheinstrae 2-4 +00-22-71 (hex) J�ger Computergesteuerte Messtechnik GmbH +002271 (base 16) J�ger Computergesteuerte Messtechnik GmbH + Rheinstra�e 2-4 Lorsch Hessen 64653 GERMANY @@ -55915,7 +55915,7 @@ company_id Organization 00-22-74 (hex) FamilyPhone AB 002274 (base 16) FamilyPhone AB Anckargripsgatan 3 - Malm 21119 + Malm� 21119 SWEDEN 00-22-75 (hex) Belkin International, Inc. @@ -56065,7 +56065,7 @@ company_id Organization 00-22-8C (hex) Photon Europe GmbH 00228C (base 16) Photon Europe GmbH - Jlicher Strae 376 + J�licher Stra�e 376 Aachen Nordrhein-Westfalen 52070 GERMANY @@ -56143,7 +56143,7 @@ company_id Organization 00-22-98 (hex) Sony Ericsson Mobile Communications 002298 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-22-99 (hex) SeaMicro Inc. @@ -56408,7 +56408,7 @@ company_id Organization 00-22-C2 (hex) Proview Eletronica do Brasil LTDA 0022C2 (base 16) Proview Eletronica do Brasil LTDA - R. Acar, 203 - Distrito Industrial + R. Acar�, 203 - Distrito Industrial Manaus Amazonas 69075-030 BRAZIL @@ -56489,7 +56489,7 @@ company_id Organization 00-22-CF (hex) PLANEX Communications INC 0022CF (base 16) PLANEX Communications INC - 2F FENISSAY Ebisu Bldg3-16-3 + 2F F�ENISSAY Ebisu Bldg3-16-3 Shibuya-ku Tokyo 150-0011 JAPAN @@ -56501,15 +56501,15 @@ company_id Organization 00-22-D1 (hex) Albrecht Jung GmbH & Co. KG 0022D1 (base 16) Albrecht Jung GmbH & Co. KG - Volmestrae 1 - Schalksmhle NRW 58579 + Volmestra�e 1 + Schalksm�hle NRW 58579 GERMANY -00-22-D2 (hex) All Earth Comrcio de Eletrnicos LTDA. -0022D2 (base 16) All Earth Comrcio de Eletrnicos LTDA. +00-22-D2 (hex) All Earth Com�rcio de Eletr�nicos LTDA. +0022D2 (base 16) All Earth Com�rcio de Eletr�nicos LTDA. Rua Bento de Arruda Camargo 270 - Jd. Santana - Campinas So Paulo 13088-650 + Campinas S�o Paulo 13088-650 BRAZIL 00-22-D3 (hex) Hub-Tech @@ -56534,7 +56534,7 @@ company_id Organization 00-22-D6 (hex) Cypak AB 0022D6 (base 16) Cypak AB P.O. BOX 2332 - Funckens Grnd 1 + Funckens Gr�nd 1 Stockholm 103 18 SWEDEN @@ -56669,7 +56669,7 @@ company_id Organization 00-22-EB (hex) Data Respons A/S 0022EB (base 16) Data Respons A/S - Ellekr 6 + Ellek�r 6 Herlev 2730 DENMARK @@ -56889,7 +56889,7 @@ company_id Organization 00-23-0E (hex) Gorba AG 00230E (base 16) Gorba AG Sandackerstrasse - Oberbren SG CH - 9245 + Oberb�ren SG CH - 9245 SWITZERLAND 00-23-0F (hex) Hirsch Electronics Corporation @@ -56990,9 +56990,9 @@ company_id Organization 00-23-1E (hex) Cezzer Multimedia Technologies 00231E (base 16) Cezzer Multimedia Technologies - Ppinire d'entreprises CREATIC + P�pini�re d'entreprises CREATIC 115 rue Claude Chappe - Plouzan 29280 + Plouzan� 29280 FRANCE 00-23-1F (hex) Guangda Electronic & Telecommunication Technology Development Co., Ltd. @@ -57158,7 +57158,7 @@ company_id Organization 00-23-38 (hex) OJ-Electronics A/S 002338 (base 16) OJ-Electronics A/S Stenager 13B - Snderborg 6400 + S�nderborg 6400 DENMARK 00-23-39 (hex) Samsung Electronics @@ -57240,7 +57240,7 @@ company_id Organization 00-23-45 (hex) Sony Ericsson Mobile Communications 002345 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-23-46 (hex) Vestac @@ -57403,7 +57403,7 @@ company_id Organization 00-23-5F (hex) Silicon Micro Sensors GmbH 00235F (base 16) Silicon Micro Sensors GmbH - Grenzstrasse 28 / Gebude 32 + Grenzstrasse 28 / Geb�ude 32 Dresden Saxony 01109 GERMANY @@ -57441,7 +57441,7 @@ company_id Organization 00-23-65 (hex) ELKA-Elektronik GmbH 002365 (base 16) ELKA-Elektronik GmbH Talstrasse 104 - Ldenscheid NRW 58515 + L�denscheid NRW 58515 GERMANY 00-23-66 (hex) Beijing Siasun Electronic System Co.,Ltd. @@ -57498,7 +57498,7 @@ company_id Organization 00-23-6E (hex) Burster GmbH & Co KG 00236E (base 16) Burster GmbH & Co KG Talstrasse 1-5 - Gernsbach Baden-Wrttemberg 76593 + Gernsbach Baden-W�rttemberg 76593 GERMANY 00-23-6F (hex) DAQ System @@ -57670,7 +57670,7 @@ company_id Organization 00-23-89 (hex) HANGZHOU H3C Technologies Co., Ltd. 002389 (base 16) HANGZHOU H3C Technologies Co., Ltd. - Oriental Electronics Bldg., #2, Chuangye RoadShangdi Information Industry Base, + Oriental Electronics Bldg., #2, Chuangye Road��Shangdi Information Industry Base, Haidian District, Beijing, P.R.China Beijing 100085 CHINA @@ -57775,7 +57775,7 @@ company_id Organization 00-23-9A (hex) EasyData Software GmbH 00239A (base 16) EasyData Software GmbH - Steinbacher Strae 14-24 + Steinbacher Stra�e 14-24 Eschborn / Ts. Hessen D-65760 GERMANY @@ -57804,8 +57804,8 @@ company_id Organization Changshu Jiangsu 215500 CHINA -00-23-9F (hex) Institut fr Prftechnik -00239F (base 16) Institut fr Prftechnik +00-23-9F (hex) Institut f�r Pr�ftechnik +00239F (base 16) Institut f�r Pr�ftechnik Schulstr. 3 Todtenweis Bayern 86447 GERMANY @@ -57934,7 +57934,7 @@ company_id Organization 00-23-B3 (hex) Lyyn AB 0023B3 (base 16) Lyyn AB IDEON Science Park - Scheelevgen 17 + Scheelev�gen 17 Lund 223 70 SWEDEN @@ -57991,7 +57991,7 @@ company_id Organization 00-23-BC (hex) EQ-SYS GmbH 0023BC (base 16) EQ-SYS GmbH - Hinter den Grten 15b + Hinter den G�rten 15b Treuenbrietzen OT Feldheim Brandenburg 14929 GERMANY @@ -58022,7 +58022,7 @@ company_id Organization 00-23-C1 (hex) Securitas Direct AB 0023C1 (base 16) Securitas Direct AB Kalendegatan 26 - Malm 20320 + Malm� 20320 SWEDEN 00-23-C2 (hex) SAMSUNG Electronics. Co. LTD @@ -58059,7 +58059,7 @@ company_id Organization 00-23-C7 (hex) AVSystem 0023C7 (base 16) AVSystem ul. Friedleina 4 - Krakw maopolskie 30-009 + Krak�w ma�opolskie 30-009 POLAND 00-23-C8 (hex) TEAM-R @@ -58178,7 +58178,7 @@ company_id Organization 00-23-DA (hex) Industrial Computer Source (Deutschland)GmbH 0023DA (base 16) Industrial Computer Source (Deutschland)GmbH - Marie-Curie-Strae 9 + Marie-Curie-Stra�e 9 Pulheim NRW 50259 GERMANY @@ -58224,12 +58224,12 @@ company_id Organization 00-23-E1 (hex) Cavena Image Products AB 0023E1 (base 16) Cavena Image Products AB Nytorpsvagen 26 - Tby Stockholm se-183 53 + T�by Stockholm se-183 53 SWEDEN 00-23-E2 (hex) SEA Signalisation 0023E2 (base 16) SEA Signalisation - 20-22 Rue Pierre Mends France + 20-22 Rue Pierre Mend�s France BP 231 Vaulx en Velin CEDEX 69515 FRANCE @@ -58327,7 +58327,7 @@ company_id Organization 00-23-F1 (hex) Sony Ericsson Mobile Communications 0023F1 (base 16) Sony Ericsson Mobile Communications Nya Vattentornet - Lund Skne 22188 + Lund Sk�ne 22188 SWEDEN 00-23-F2 (hex) TVLogic @@ -58430,7 +58430,7 @@ company_id Organization 00-24-02 (hex) Op-Tection GmbH 002402 (base 16) Op-Tection GmbH - Borsigstrae 80 + Borsigstra�e 80 Heinsberg Germany 52525 GERMANY @@ -58448,7 +58448,7 @@ company_id Organization 00-24-05 (hex) Dilog Nordic AB 002405 (base 16) Dilog Nordic AB - Faktorvgen 9 + Faktorv�gen 9 Kungsbacka Halland 439 34 SWEDEN @@ -58493,7 +58493,7 @@ company_id Organization 00-24-0C (hex) DELEC GmbH 00240C (base 16) DELEC GmbH Ruheweg 17-21 - Gllheim Rheinland-Pfalz 67307 + G�llheim Rheinland-Pfalz 67307 GERMANY 00-24-0D (hex) OnePath Networks LTD. @@ -58612,7 +58612,7 @@ company_id Organization 00-24-1F (hex) DCT-Delta GmbH 00241F (base 16) DCT-Delta GmbH Bodanrueckstrasse 1 - Bodman - Ludwigshafen Baden - Wrttemberg 78351 + Bodman - Ludwigshafen Baden - W�rttemberg 78351 GERMANY 00-24-20 (hex) NetUP Inc. @@ -58630,7 +58630,7 @@ company_id Organization 00-24-22 (hex) Knapp Logistik Automation GmbH 002422 (base 16) Knapp Logistik Automation GmbH - Gnter-Knapp-Strasse 5-7 + G�nter-Knapp-Strasse 5-7 Hart bei Graz Styria 8075 AUSTRIA @@ -58922,7 +58922,7 @@ company_id Organization 00-24-52 (hex) Silicon Software GmbH 002452 (base 16) Silicon Software GmbH Steubenstr. 46 - Mannheim Baden-Wrttemberg 68163 + Mannheim Baden-W�rttemberg 68163 GERMANY 00-24-53 (hex) Initra d.o.o. @@ -58957,7 +58957,7 @@ company_id Organization 00-24-59 (hex) ABB STOTZ-KONTAKT GmbH 002459 (base 16) ABB STOTZ-KONTAKT GmbH - Eppelheimer Strae 82 + Eppelheimer Stra�e 82 STO/KE1 Heidelberg 69123 GERMANY @@ -59029,7 +59029,7 @@ company_id Organization 00-24-64 (hex) Bridge Technologies Co AS 002464 (base 16) Bridge Technologies Co AS - Mlleparken 4 + M�lleparken 4 Oslo 0459 NORWAY @@ -59398,7 +59398,7 @@ company_id Organization 00-24-9E (hex) ADC-Elektronik GmbH 00249E (base 16) ADC-Elektronik GmbH - stingstrae 13b + �stingstra�e 13b Hamm NRW D-59063 GERMANY @@ -59447,8 +59447,8 @@ company_id Organization 00-24-A6 (hex) TELESTAR DIGITAL GmbH 0024A6 (base 16) TELESTAR DIGITAL GmbH - Vulkanhhe / B410 - Dreis - Brck 54552 + Vulkanh�he / B410 + Dreis - Br�ck 54552 GERMANY 00-24-A7 (hex) Advanced Video Communications Inc. @@ -59492,7 +59492,7 @@ company_id Organization 00-24-AD (hex) Adolf Thies Gmbh & Co. KG 0024AD (base 16) Adolf Thies Gmbh & Co. KG Hauptstr. 76 - Gttingen 37083 + G�ttingen 37083 GERMANY 00-24-AE (hex) Morpho @@ -59510,7 +59510,7 @@ company_id Organization 00-24-B0 (hex) ESAB AB 0024B0 (base 16) ESAB AB Box 8004 - Lindholmsalln 9 + Lindholmsall�n 9 Gothenburg SE-402 77 SWEDEN @@ -59529,7 +59529,7 @@ company_id Organization 00-24-B3 (hex) Graf-Syteco GmbH & Co. KG 0024B3 (base 16) Graf-Syteco GmbH & Co. KG Kaiserstr. 18 - Tuningen Baden-Wrttemberg 78609 + Tuningen Baden-W�rttemberg 78609 GERMANY 00-24-B4 (hex) ESCATRONIC GmbH @@ -59675,7 +59675,7 @@ company_id Organization 00-24-CA (hex) Tobii Technology AB 0024CA (base 16) Tobii Technology AB - Karlsrovgen 2D + Karlsrov�gen 2D Danderyd 18253 SWEDEN @@ -59809,7 +59809,7 @@ company_id Organization 00-24-DF (hex) Digitalbox Europe GmbH 0024DF (base 16) Digitalbox Europe GmbH - Sandstrae 65 + Sandstra�e 65 Ratingen 40878 GERMANY @@ -59923,7 +59923,7 @@ company_id Organization 00-24-F1 (hex) Shenzhen Fanhai Sanjiang Electronics Co., Ltd. 0024F1 (base 16) Shenzhen Fanhai Sanjiang Electronics Co., Ltd. - 3FGuangcai Xintiandi Building,Nanshan Rd,Nanshan, + 3F��Guangcai Xintiandi Building,Nanshan Rd,Nanshan, Shenzhen Guangdong 518054 CHINA @@ -59996,7 +59996,7 @@ company_id Organization 00-24-FD (hex) Prosilient Technologies AB 0024FD (base 16) Prosilient Technologies AB - rstangsvgen 25 (3rd floor), (Box 47231) + �rsta�ngsv�gen 25 (3rd floor), (Box 47231) Stockholm SE-10074 SWEDEN @@ -60406,7 +60406,7 @@ company_id Organization 00-25-41 (hex) Maquet Critical Care AB 002541 (base 16) Maquet Critical Care AB - Rntgenvgen 2 + R�ntgenv�gen 2 Solna SE-171 95 SWEDEN @@ -60633,7 +60633,7 @@ company_id Organization 00-25-65 (hex) Vizimax Inc. 002565 (base 16) Vizimax Inc. 2284, rue de la Province - Longueuil Qubec J4G 1G1 + Longueuil Qu�bec J4G 1G1 CANADA 00-25-66 (hex) Samsung Electronics Co.,Ltd @@ -60759,8 +60759,8 @@ company_id Organization Mamaroneck NY 10543 UNITED STATES -00-25-7A (hex) CAMCO Produktions- und Vertriebs-GmbH fr Beschallungs- und Beleuchtungsanlagen -00257A (base 16) CAMCO Produktions- und Vertriebs-GmbH fr Beschallungs- und Beleuchtungsanlagen +00-25-7A (hex) CAMCO Produktions- und Vertriebs-GmbH f�r Beschallungs- und Beleuchtungsanlagen +00257A (base 16) CAMCO Produktions- und Vertriebs-GmbH f�r Beschallungs- und Beleuchtungsanlagen Fischpicke 5 Wenden NRW 57482 GERMANY @@ -60799,7 +60799,7 @@ company_id Organization 00-25-80 (hex) Equipson S.A. 002580 (base 16) Equipson S.A. - Poligono Ind. LAlter + Poligono Ind. L�Alter� Avda. Saler, 14 Silla Valencia 46460 SPAIN @@ -60923,8 +60923,8 @@ company_id Organization 00-25-93 (hex) DatNet Informatikai Kft. 002593 (base 16) DatNet Informatikai Kft. - Htvezr u. 5. - Szigetszentmikls Pest megye 2310 + H�tvez�r u. 5. + Szigetszentmikl�s Pest megye 2310 HUNGARY 00-25-94 (hex) Eurodesign BG LTD @@ -60942,7 +60942,7 @@ company_id Organization 00-25-96 (hex) GIGAVISION srl 002596 (base 16) GIGAVISION srl Via Figini, 16 - Muggi Milano 20053 + Muggi� Milano 20053 ITALY 00-25-97 (hex) Kalki Communication Technologies @@ -61026,7 +61026,7 @@ company_id Organization 00-25-A4 (hex) EuroDesign embedded technologies GmbH 0025A4 (base 16) EuroDesign embedded technologies GmbH - Waldstrae 4A + Waldstra�e 4A Kirchdorf a.d. Amper Bayern 85414 GERMANY @@ -61111,10 +61111,10 @@ company_id Organization Shenzhen 518057 CHINA -00-25-B2 (hex) LFK-Lenkflugkrpersysteme GmbH -0025B2 (base 16) LFK-Lenkflugkrpersysteme GmbH - Landshuter Strae 26 - Unterschleiheim Bavaria 85716 +00-25-B2 (hex) LFK-Lenkflugk�rpersysteme GmbH +0025B2 (base 16) LFK-Lenkflugk�rpersysteme GmbH + Landshuter Stra�e 26 + Unterschlei�heim Bavaria 85716 GERMANY 00-25-B3 (hex) Hewlett-Packard Company @@ -61259,7 +61259,7 @@ company_id Organization 00-25-C9 (hex) SHENZHEN HUAPU DIGITAL CO., LTD 0025C9 (base 16) SHENZHEN HUAPU DIGITAL CO., LTD Futian District,Chegongmiao,TianAn Cyberpark - 17/F East,High-Tech Plaza, Phase + 17/F East,High-Tech Plaza, Phase �� ShenZhen Guangdong Province 518040 CHINA @@ -61271,7 +61271,7 @@ company_id Organization 00-25-CB (hex) Reiner SCT 0025CB (base 16) Reiner SCT - Reiner Kartengerte GmbH & Co. KG. + Reiner Kartenger�te GmbH & Co. KG. Goethestr. 14 Furtwangen 78120 GERMANY @@ -61477,7 +61477,7 @@ company_id Organization 00-25-EC (hex) Humanware 0025EC (base 16) Humanware 445 rue du Parc Industriel - Longueuil Qubec J4H 3V7 + Longueuil Qu�bec J4H 3V7 CANADA 00-25-ED (hex) NuVo Technologies LLC @@ -61518,8 +61518,8 @@ company_id Organization San Diego CA 92121 UNITED STATES -00-25-F3 (hex) Nordwestdeutsche Zhlerrevision -0025F3 (base 16) Nordwestdeutsche Zhlerrevision +00-25-F3 (hex) Nordwestdeutsche Z�hlerrevision +0025F3 (base 16) Nordwestdeutsche Z�hlerrevision Ing. Aug. Knemeyer GmbH & Co. KG Heideweg 33 Bad Laer Niedersachsen 49196 @@ -61527,7 +61527,7 @@ company_id Organization 00-25-F4 (hex) KoCo Connector AG 0025F4 (base 16) KoCo Connector AG - Marienstrae 12 + Marienstra�e 12 Berlin 10117 GERMANY @@ -61706,7 +61706,7 @@ company_id Organization 00-26-11 (hex) Licera AB 002611 (base 16) Licera AB Teknikringen 1C - Linkping 58330 + Link�ping 58330 SWEDEN 00-26-12 (hex) Space Exploration Technologies @@ -61802,7 +61802,7 @@ company_id Organization 00-26-20 (hex) ISGUS GmbH 002620 (base 16) ISGUS GmbH - Oberdorfstrae 18 - 22 + Oberdorfstra�e 18 - 22 VS - Schwenningen BW 78054 GERMANY @@ -61850,8 +61850,8 @@ company_id Organization Seocho-gu, Seoul 137-130 KOREA, REPUBLIC OF -00-26-28 (hex) companytec automao e controle ltda -002628 (base 16) companytec automao e controle ltda +00-26-28 (hex) companytec automa��o e controle ltda +002628 (base 16) companytec automa��o e controle ltda Rua Marcilio Dias 3005 Pelotas Rio Grande do Sul 96020-480 BRAZIL @@ -61997,9 +61997,9 @@ company_id Organization 00-26-3F (hex) LIOS Technology GmbH 00263F (base 16) LIOS Technology GmbH - Schanzenstrae 39 + Schanzenstra�e 39 Building D9-D13 - Kln Germany D-51063 + K�ln Germany D-51063 GERMANY 00-26-40 (hex) Baustem Broadband Technologies, Ltd. @@ -62085,8 +62085,8 @@ company_id Organization Flensburg 24937 GERMANY -00-26-4F (hex) Krger&Gothe GmbH -00264F (base 16) Krger&Gothe GmbH +00-26-4F (hex) Kr�ger&Gothe GmbH +00264F (base 16) Kr�ger&Gothe GmbH Atzendorfer Strasse 19 Stassfurt Sachsen Anhalt 39418 GERMANY @@ -62365,9 +62365,9 @@ company_id Organization Wuhan Hubei 430073 CHINA -00-26-7B (hex) GSI Helmholtzzentrum fr Schwerionenforschung GmbH -00267B (base 16) GSI Helmholtzzentrum fr Schwerionenforschung GmbH - Planckstrae 1 +00-26-7B (hex) GSI Helmholtzzentrum f�r Schwerionenforschung GmbH +00267B (base 16) GSI Helmholtzzentrum f�r Schwerionenforschung GmbH + Planckstra�e 1 Darmstadt Hessen 64291 GERMANY @@ -62393,7 +62393,7 @@ company_id Organization 00-26-7F (hex) Zenterio AB 00267F (base 16) Zenterio AB Diskettgatan 11B - Linkping 58335 + Link�ping 58335 SWEDEN 00-26-80 (hex) Lockie Innovation Pty Ltd @@ -62406,7 +62406,7 @@ company_id Organization 00-26-81 (hex) Interspiro AB 002681 (base 16) Interspiro AB Box 10060 - Liding 18110 + Liding� 18110 SWEDEN 00-26-82 (hex) Gemtek Technology Co., Ltd. @@ -62989,7 +62989,7 @@ company_id Organization 0026DE (base 16) FDI MATELEC Route de saint symphorien BP 69 - Les landes Gnusson 85130 + Les landes G�nusson 85130 FRANCE 00-26-DF (hex) TaiDoc Technology Corp. @@ -63090,8 +63090,8 @@ company_id Organization 00-26-EE (hex) TKM GmbH 0026EE (base 16) TKM GmbH - Schlossstrae 123 - Mnchengladbach NRW 41238 + Schlossstra�e 123 + M�nchengladbach NRW 41238 GERMANY 00-26-EF (hex) Technology Advancement Group, Inc. @@ -63986,7 +63986,7 @@ company_id Organization 00-30-56 (hex) Beck IPC GmbH 003056 (base 16) Beck IPC GmbH - Grninger Weg 24 + Gr�ninger Weg 24 D-35415 Pohlheim GERMANY @@ -65582,7 +65582,7 @@ company_id Organization 00-40-43 (hex) Nokia Siemens Networks GmbH & Co. KG. 004043 (base 16) Nokia Siemens Networks GmbH & Co. KG. Werner-von-Siemens Str. 2-6 - Bruchsal Baden-Wrtemberg 76646 + Bruchsal Baden-W�rtemberg 76646 FINLAND 00-40-44 (hex) QNIX COMPUTER CO., LTD. @@ -68705,7 +68705,7 @@ company_id Organization 00-60-36 (hex) AIT Austrian Institute of Technology GmbH 006036 (base 16) AIT Austrian Institute of Technology GmbH - Donau-City-Strae 1 + Donau-City-Stra�e 1 Vienna 1220 AUSTRIA @@ -72678,7 +72678,7 @@ company_id Organization 00-90-9B (hex) IMAJE 00909B (base 16) IMAJE - Gtaverksgatan 6A + G�taverksgatan 6A Gothenburg 417 55 SWEDEN @@ -73164,7 +73164,7 @@ company_id Organization 00-90-E9 (hex) JANZ COMPUTER AG 0090E9 (base 16) JANZ COMPUTER AG - Im Drener Feld 8 + Im D�rener Feld 8 D-33100 Paderborn GERMANY @@ -73877,7 +73877,7 @@ company_id Organization 00A057 (base 16) LANCOM Systems GmbH Adenauer Str.20 /B2 D-52070 AACHEN - Wrselen 52146 + W�rselen 52146 GERMANY 00-A0-58 (hex) GLORY, LTD. @@ -76641,10 +76641,10 @@ company_id Organization WATERTOWN MA 02172 UNITED STATES -00-C0-D5 (hex) Werbeagentur Jrgen Siebert -00C0D5 (base 16) Werbeagentur Jrgen Siebert +00-C0-D5 (hex) Werbeagentur J�rgen Siebert +00C0D5 (base 16) Werbeagentur J�rgen Siebert Im Klostergarten 8 - D-50321 Brhl + D-50321 Br�hl GERMANY 00-C0-D6 (hex) J1 SYSTEMS, INC. @@ -77457,7 +77457,7 @@ company_id Organization 00-D0-4E (hex) LOGIBAG 00D04E (base 16) LOGIBAG - 2, Rue de la Mandinire + 2, Rue de la Mandini�re 72300 SABLE/SARTHE FRANCE @@ -78241,7 +78241,7 @@ company_id Organization 00-D0-C8 (hex) Prevas A/S 00D0C8 (base 16) Prevas A/S Frederikskaj 6 - DK-2450 Kbenhavn SV + DK-2450 K�benhavn SV DENMARK 00-D0-C9 (hex) ADVANTECH CO., LTD. @@ -79485,7 +79485,7 @@ company_id Organization 00-E0-7A (hex) MIKRODIDAKT AB 00E07A (base 16) MIKRODIDAKT AB - Skiffervgen 48 + Skifferv�gen 48 LUND SE22478 SWEDEN @@ -82233,7 +82233,7 @@ company_id Organization 10-45-F8 (hex) LNT-Automation GmbH 1045F8 (base 16) LNT-Automation GmbH - Hans-Paul-Kaysser-Strae 1 + Hans-Paul-Kaysser-Stra�e 1 Leutenbach-Nellmersbach BW D-71397 GERMANY @@ -82295,10 +82295,10 @@ company_id Organization Walnut California 91789 UNITED STATES -10-88-0F (hex) DARUMA TELECOMUNICAES E INFORMTICA S/A -10880F (base 16) DARUMA TELECOMUNICAES E INFORMTICA S/A +10-88-0F (hex) DARUMA TELECOMUNICA��ES E INFORM�TICA S/A +10880F (base 16) DARUMA TELECOMUNICA��ES E INFORM�TICA S/A AVENIDA INDEPENDENCIA, 3500, LOTEAMENTO INDUSTRIAL - TAUBAT SO PAULO 12032-000 + TAUBAT� S�O PAULO 12032-000 BRAZIL 10-8C-CF (hex) Cisco Systems @@ -86205,7 +86205,7 @@ company_id Organization 50-2D-F4 (hex) Phytec Messtechnik GmbH 502DF4 (base 16) Phytec Messtechnik GmbH - Robert-Koch-Strae 39 + Robert-Koch-Stra�e 39 Mainz Rheinland-Pfalz 55129 GERMANY @@ -88258,8 +88258,8 @@ company_id Organization 70-3C-39 (hex) SEAWING Kft 703C39 (base 16) SEAWING Kft - Budai t 139. - Szkesfehrvr Fejr 8000 + Budai �t 139. + Sz�kesfeh�rv�r Fej�r 8000 HUNGARY 70-46-42 (hex) CHYNG HONG ELECTRONIC CO., LTD. @@ -89004,7 +89004,7 @@ company_id Organization 78-C4-0E (hex) H&D Wireless 78C40E (base 16) H&D Wireless - Sjvgen 17 + Sj�v�gen 17 Solna 169 55 SWEDEN @@ -90147,8 +90147,8 @@ company_id Organization 8C-59-8B (hex) C Technologies AB 8C598B (base 16) C Technologies AB - Traktorvgen 11 - Lund Skne 226 60 + Traktorv�gen 11 + Lund Sk�ne 226 60 SWEDEN 8C-5C-A1 (hex) d-broad,INC @@ -90462,8 +90462,8 @@ company_id Organization 90-55-AE (hex) Ericsson, EAB/RWI/K 9055AE (base 16) Ericsson, EAB/RWI/K - Skolgngen 17 - Gvle SE-800 06 + Skolg�ngen 17 + G�vle SE-800 06 SWEDEN 90-5F-8D (hex) modas GmbH @@ -90492,11 +90492,11 @@ company_id Organization Vimercate MB 20059 ITALY -90-6D-C8 (hex) DLG Automao Industrial Ltda -906DC8 (base 16) DLG Automao Industrial Ltda - Rua Jos Batista Soares, 53 +90-6D-C8 (hex) DLG Automa��o Industrial Ltda +906DC8 (base 16) DLG Automa��o Industrial Ltda + Rua Jos� Batista Soares, 53 Distrito Industrial - Sertozinho So Paulo 14176-119 + Sert�ozinho S�o Paulo 14176-119 BRAZIL 90-6E-BB (hex) Hon Hai Precision Ind. Co.,Ltd. @@ -90697,8 +90697,8 @@ company_id Organization Shenzhen Guangdong 518103 CHINA -94-2E-63 (hex) Finscur -942E63 (base 16) Finscur +94-2E-63 (hex) Fins�cur +942E63 (base 16) Fins�cur 52 rue Paul Lescop Nanterre 92000 FRANCE @@ -90827,11 +90827,11 @@ company_id Organization Vimercate MB 20059 ITALY -94-BA-31 (hex) Visiontec da Amaznia Ltda. -94BA31 (base 16) Visiontec da Amaznia Ltda. +94-BA-31 (hex) Visiontec da Amaz�nia Ltda. +94BA31 (base 16) Visiontec da Amaz�nia Ltda. Rod. Geraldo Scavone, 2300 - Galpao 27 California Center - Pq. California - Jacare SP 12305-490 + Jacare� SP 12305-490 BRAZIL 94-C4-E9 (hex) PowerLayer Microsystems HongKong Limited @@ -93149,7 +93149,7 @@ B8921D (base 16) BG T&A B8-94-D2 (hex) Retail Innovation HTT AB B894D2 (base 16) Retail Innovation HTT AB - Sjngsvgen 2 + Sj��ngsv�gen 2 Sollentuna S-192 72 SWEDEN @@ -94096,7 +94096,7 @@ C86CB6 (base 16) Optcom Co., Ltd. C8-72-48 (hex) Aplicom Oy C87248 (base 16) Aplicom Oy Rautatienkatu 56 - nekoski Lnsi-Suomi 44101 + ��nekoski L�nsi-Suomi 44101 FINLAND C8-7C-BC (hex) Valink Co., Ltd. @@ -95480,7 +95480,7 @@ D8FE8F (base 16) IDFone Co., Ltd. DC-02-65 (hex) Meditech Kft DC0265 (base 16) Meditech Kft - lli t 200. + �ll�i �t 200. Budapest 1191 HUNGARY diff --git a/pox/lib/packet/__init__.py b/pox/lib/packet/__init__.py index eff539c66..6ad6debd7 100644 --- a/pox/lib/packet/__init__.py +++ b/pox/lib/packet/__init__.py @@ -24,45 +24,45 @@ # None of this is probably that big, and almost all of it gets loaded # under most circumstances anyway. Let's just load all of it. -import arp as ARP -import dhcp as DHCP -import dns as DNS -import eap as EAP -import eapol as EAPOL -import ethernet as ETHERNET -import ipv4 as IPV4 -import ipv6 as IPV6 -import icmp as ICMP -import icmpv6 as ICMPV6 -import lldp as LLDP -import tcp as TCP -import udp as UDP -import vlan as VLAN -import mpls as MPLS -import llc as LLC -import rip as RIP -import gre as GRE -import vxlan as VXLAN +from . import arp as ARP +from . import dhcp as DHCP +from . import dns as DNS +from . import eap as EAP +from . import eapol as EAPOL +from . import ethernet as ETHERNET +from . import ipv4 as IPV4 +from . import ipv6 as IPV6 +from . import icmp as ICMP +from . import icmpv6 as ICMPV6 +from . import lldp as LLDP +from . import tcp as TCP +from . import udp as UDP +from . import vlan as VLAN +from . import mpls as MPLS +from . import llc as LLC +from . import rip as RIP +from . import gre as GRE +from . import vxlan as VXLAN -from gre import * -from vxlan import * -from rip import * -from arp import * -from dhcp import * -from dns import * -from eap import * -from eapol import * -from ethernet import * -from ipv6 import * -from ipv4 import * -from icmpv6 import * -from icmp import * -from lldp import * -from tcp import * -from udp import * -from vlan import * -from mpls import * -from llc import * +from .gre import * +from .vxlan import * +from .rip import * +from .arp import * +from .dhcp import * +from .dns import * +from .eap import * +from .eapol import * +from .ethernet import * +from .ipv6 import * +from .ipv4 import * +from .icmpv6 import * +from .icmp import * +from .lldp import * +from .tcp import * +from .udp import * +from .vlan import * +from .mpls import * +from .llc import * __all__ = [ 'rip', diff --git a/pox/lib/packet/arp.py b/pox/lib/packet/arp.py index b15041875..802caa19f 100644 --- a/pox/lib/packet/arp.py +++ b/pox/lib/packet/arp.py @@ -37,19 +37,19 @@ #===================================================================== import struct -from packet_base import packet_base -from ipv4 import ipv4 +from .packet_base import packet_base +from .ipv4 import ipv4 -from ethernet import ethernet -from ethernet import ETHER_ANY -from ethernet import ETHER_BROADCAST +from .ethernet import ethernet +from .ethernet import ETHER_ANY +from .ethernet import ETHER_BROADCAST -from ipv4 import IP_ANY -from ipv4 import IP_BROADCAST +from .ipv4 import IP_ANY +from .ipv4 import IP_BROADCAST from pox.lib.addresses import IPAddr, EthAddr -from packet_utils import * +from .packet_utils import * class arp (packet_base): "ARP/RARP packet struct" diff --git a/pox/lib/packet/dhcp.py b/pox/lib/packet/dhcp.py index e7aca8cfe..9d8d28d0d 100644 --- a/pox/lib/packet/dhcp.py +++ b/pox/lib/packet/dhcp.py @@ -55,9 +55,9 @@ #====================================================================== import struct import string -from packet_utils import * +from .packet_utils import * -from packet_base import packet_base +from .packet_base import packet_base import pox.lib.util as util from pox.lib.util import is_subclass from pox.lib.addresses import * @@ -168,7 +168,7 @@ def _to_str(self): # self._raw_options]) if len(self.options): s += ' options:' - s += ','.join(repr(x) for x in self.options.values()) + s += ','.join(repr(x) for x in list(self.options.values())) s += ']' return s @@ -217,7 +217,7 @@ def parse(self, raw): self.parsed = True def unpackOptions(self): - for k,v in self.options.items(): + for k,v in list(self.options.items()): unpack = _dhcp_option_unpackers.get(k, DHCPRawOption.unpack) try: self.options[k] = unpack(v,k) @@ -277,7 +277,7 @@ def addPart (k, v): o += chr(dhcp.PAD_OPT) return o - for k,v in self.options.iteritems(): + for k,v in self.options.items(): if k == dhcp.END_OPT: continue if k == dhcp.PAD_OPT: continue if isinstance(v, DHCPOption): @@ -428,7 +428,7 @@ class DHCPIPsOptionBase (DHCPOption): Superclass for options which are a list of IP addresses """ def __init__ (self, addrs=[]): - if isinstance(addrs, (basestring,IPAddr)): + if isinstance(addrs, (str,IPAddr)): self.addrs = [IPAddr(addrs)] else: self.addrs = [IPAddr(a) for a in addrs] @@ -600,7 +600,7 @@ def __repr__ (self): if n is None or not hasattr(n, 'im_self'): n = "Opt/" + str(o) else: - n = n.im_self.__name__ + n = n.__self__.__name__ if n.startswith("DHCP"): n = n[4:] if n.endswith("Option"): n = n[:-6] if n == "": n = "Opt" diff --git a/pox/lib/packet/dns.py b/pox/lib/packet/dns.py index 01ef64978..a070a472a 100644 --- a/pox/lib/packet/dns.py +++ b/pox/lib/packet/dns.py @@ -89,10 +89,10 @@ # General cleaup/rewrite (code is/has gotten pretty bad) import struct -from packet_utils import * -from packet_utils import TruncatedException as Trunc +from .packet_utils import * +from .packet_utils import TruncatedException as Trunc -from packet_base import packet_base +from .packet_base import packet_base from pox.lib.addresses import IPAddr,IPAddr6,EthAddr @@ -298,7 +298,7 @@ def parse(self, raw): for i in range(0,total_questions): try: query_head = self.next_question(raw, query_head) - except Exception, e: + except Exception as e: self._exc(e, 'parsing questions') return None @@ -306,7 +306,7 @@ def parse(self, raw): for i in range(0,total_answers): try: query_head = self.next_rr(raw, query_head, self.answers) - except Exception, e: + except Exception as e: self._exc(e, 'parsing answers') return None @@ -314,7 +314,7 @@ def parse(self, raw): for i in range(0,total_auth_rr): try: query_head = self.next_rr(raw, query_head, self.authorities) - except Exception, e: + except Exception as e: self._exc(e, 'parsing authoritative name servers') return None @@ -322,7 +322,7 @@ def parse(self, raw): for i in range(0,total_add_rr): try: query_head = self.next_rr(raw, query_head, self.additional) - except Exception, e: + except Exception as e: self._exc(e, 'parsing additional resource records') return None diff --git a/pox/lib/packet/eap.py b/pox/lib/packet/eap.py index 024e458a7..ef98c9162 100644 --- a/pox/lib/packet/eap.py +++ b/pox/lib/packet/eap.py @@ -85,9 +85,9 @@ # #====================================================================== import struct -from packet_utils import * +from .packet_utils import * -from packet_base import packet_base +from .packet_base import packet_base class eap(packet_base): "Extensible Authentication Protocol packet" diff --git a/pox/lib/packet/eapol.py b/pox/lib/packet/eapol.py index 43105851a..f39efa17b 100644 --- a/pox/lib/packet/eapol.py +++ b/pox/lib/packet/eapol.py @@ -32,11 +32,11 @@ # #====================================================================== import struct -from packet_utils import * +from .packet_utils import * -from packet_base import packet_base +from .packet_base import packet_base -from eap import * +from .eap import * class eapol(packet_base): "EAP over LAN packet" diff --git a/pox/lib/packet/ethernet.py b/pox/lib/packet/ethernet.py index 6c09e34b7..59a6219c1 100644 --- a/pox/lib/packet/ethernet.py +++ b/pox/lib/packet/ethernet.py @@ -23,8 +23,8 @@ import struct -from packet_base import packet_base -from packet_utils import ethtype_to_str +from .packet_base import packet_base +from .packet_utils import ethtype_to_str from pox.lib.addresses import * @@ -75,23 +75,23 @@ def __init__(self, raw=None, prev=None, **kw): packet_base.__init__(self) if len(ethernet.type_parsers) == 0: - from vlan import vlan + from .vlan import vlan ethernet.type_parsers[ethernet.VLAN_TYPE] = vlan - from arp import arp + from .arp import arp ethernet.type_parsers[ethernet.ARP_TYPE] = arp ethernet.type_parsers[ethernet.RARP_TYPE] = arp - from ipv4 import ipv4 + from .ipv4 import ipv4 ethernet.type_parsers[ethernet.IP_TYPE] = ipv4 - from ipv6 import ipv6 + from .ipv6 import ipv6 ethernet.type_parsers[ethernet.IPV6_TYPE] = ipv6 - from lldp import lldp + from .lldp import lldp ethernet.type_parsers[ethernet.LLDP_TYPE] = lldp - from eapol import eapol + from .eapol import eapol ethernet.type_parsers[ethernet.PAE_TYPE] = eapol - from mpls import mpls + from .mpls import mpls ethernet.type_parsers[ethernet.MPLS_TYPE] = mpls ethernet.type_parsers[ethernet.MPLS_MC_TYPE] = mpls - from llc import llc + from .llc import llc ethernet._llc = llc self.prev = prev diff --git a/pox/lib/packet/gre.py b/pox/lib/packet/gre.py index d7f0213b8..a169f6e04 100644 --- a/pox/lib/packet/gre.py +++ b/pox/lib/packet/gre.py @@ -37,12 +37,12 @@ import struct -from packet_base import packet_base -from packet_utils import checksum -from ethernet import ethernet -import ipv4 +from .packet_base import packet_base +from .packet_utils import checksum +from .ethernet import ethernet +from . import ipv4 -from packet_utils import * +from .packet_utils import * class gre (packet_base): diff --git a/pox/lib/packet/icmp.py b/pox/lib/packet/icmp.py index 628363034..9413d49f9 100644 --- a/pox/lib/packet/icmp.py +++ b/pox/lib/packet/icmp.py @@ -32,9 +32,9 @@ #====================================================================== import struct import random -from packet_utils import * +from .packet_utils import * -from packet_base import packet_base +from .packet_base import packet_base TYPE_ECHO_REPLY = 0 TYPE_DEST_UNREACH = 3 @@ -66,7 +66,7 @@ def _str_rest (s, p): if p.next is None: return s - if isinstance(p.next, basestring): + if isinstance(p.next, str): return "[%s bytes]" % (len(p.next),) return s+str(p.next) @@ -178,7 +178,7 @@ def parse (self, raw): if dlen >= 28: # xxx We're assuming this is IPv4! - import ipv4 + from . import ipv4 self.next = ipv4.ipv4(raw=raw[self.MIN_LEN:],prev=self) else: self.next = raw[self.MIN_LEN:] @@ -243,7 +243,7 @@ def parse(self, raw): if dlen >= 28: # xxx We're assuming this is IPv4! - import ipv4 + from . import ipv4 self.next = ipv4.ipv4(raw=raw[unreach.MIN_LEN:],prev=self) else: self.next = raw[unreach.MIN_LEN:] diff --git a/pox/lib/packet/icmpv6.py b/pox/lib/packet/icmpv6.py index b55d41463..cacc21b93 100644 --- a/pox/lib/packet/icmpv6.py +++ b/pox/lib/packet/icmpv6.py @@ -39,9 +39,9 @@ import struct import random -import new -from packet_utils import * -from packet_base import packet_base +import types +from .packet_utils import * +from .packet_base import packet_base from pox.lib.addresses import IPAddr6,EthAddr from pox.lib.util import hexdump, init_helper @@ -159,7 +159,7 @@ def __repr__ (self): ss = self._fields() if ss: s += ' ' - s += " ".join(["%s:%s" % (k,v) for k,v in ss.iteritems()]) + s += " ".join(["%s:%s" % (k,v) for k,v in ss.items()]) return "[" + s + "]" @property @@ -410,7 +410,7 @@ def __str__ (self): ss = self._fields() if ss: s += ' ' - s += " ".join(["%s:%s" % (k,v) for k,v in ss.iteritems()]) + s += " ".join(["%s:%s" % (k,v) for k,v in ss.items()]) return s + "]" def _fields (self): @@ -678,7 +678,7 @@ def unpack_new (cls, raw, offset = 0, buf_len = None, prev = None): if buf_len is None: buf_len = len(raw) try: - flags = ord(raw[offset]) + flags = raw[offset] o.is_router = (flags & cls.ROUTER_FLAG) != 0 o.is_solicited = (flags & cls.SOLICITED_FLAG) != 0 o.is_override = (flags & cls.OVERRIDE_FLAG) != 0 @@ -910,7 +910,7 @@ def parse (self, raw): self.parsed = True - import ipv6 + from . import ipv6 # xxx We're assuming this is IPv6! if dlen >= 8 + ipv6.MIN_LEN: self.next = ipv6.ipv6(raw=raw[unreach.MIN_LEN:],prev=self) diff --git a/pox/lib/packet/igmp.py b/pox/lib/packet/igmp.py index e4163ac11..4d534b52b 100644 --- a/pox/lib/packet/igmp.py +++ b/pox/lib/packet/igmp.py @@ -36,8 +36,8 @@ #TODO: Support for IGMP v3 import struct -from packet_utils import * -from packet_base import packet_base +from .packet_utils import * +from .packet_base import packet_base from pox.lib.addresses import * from pox.lib.util import initHelper @@ -115,7 +115,7 @@ def parse (self, raw): self.msg('packet data too short to parse') return None - ver_and_type = ord(raw[0]) + ver_and_type = raw[0] if ver_and_type == MEMBERSHIP_REPORT_V3: self.ver_and_type, res1, self.csum, res2, num = \ struct.unpack("!BBHHH", raw[:self.MIN_LEN]) diff --git a/pox/lib/packet/ipv4.py b/pox/lib/packet/ipv4.py index 0e88e3efc..6729abc9c 100644 --- a/pox/lib/packet/ipv4.py +++ b/pox/lib/packet/ipv4.py @@ -40,14 +40,14 @@ import struct import time -from packet_utils import * -from tcp import * -from udp import * -from icmp import * -from igmp import * -from gre import * +from .packet_utils import * +from .tcp import * +from .udp import * +from .icmp import * +from .igmp import * +from .gre import * -from packet_base import packet_base +from .packet_base import packet_base from pox.lib.addresses import IPAddr, IP_ANY, IP_BROADCAST @@ -74,7 +74,7 @@ def __init__(self, raw=None, prev=None, **kw): self.prev = prev self.v = 4 - self.hl = ipv4.MIN_LEN / 4 + self.hl = int(ipv4.MIN_LEN / 4) self.tos = 0 self.iplen = ipv4.MIN_LEN ipv4.ip_id = (ipv4.ip_id + 1) & 0xffff diff --git a/pox/lib/packet/ipv6.py b/pox/lib/packet/ipv6.py index fbf230210..f49c6d58d 100644 --- a/pox/lib/packet/ipv6.py +++ b/pox/lib/packet/ipv6.py @@ -47,12 +47,12 @@ """ import struct -from packet_utils import * -from tcp import * -from udp import * -from icmpv6 import * +from .packet_utils import * +from .tcp import * +from .udp import * +from .icmpv6 import * -from packet_base import packet_base +from .packet_base import packet_base from pox.lib.addresses import IPAddr6 from pox.lib.util import init_helper diff --git a/pox/lib/packet/llc.py b/pox/lib/packet/llc.py index 10da21a44..ef5991fe7 100644 --- a/pox/lib/packet/llc.py +++ b/pox/lib/packet/llc.py @@ -14,10 +14,10 @@ import struct -from packet_base import packet_base -from ethernet import ethernet +from .packet_base import packet_base +from .ethernet import ethernet -from packet_utils import * +from .packet_utils import * class llc (packet_base): @@ -118,8 +118,8 @@ def hdr (self, payload): r += struct.pack("!B", self.control) else: #FIXME: this is sloppy - r += chr(self.control & 0xff) - r += chr((self.control>>8) & 0xff) + r += chr(self.control & 0xff).encode('latin-1') + r += chr((self.control>>8) & 0xff).encode('latin-1') if self.has_snap: # SNAP r += self.oui diff --git a/pox/lib/packet/lldp.py b/pox/lib/packet/lldp.py index 16608e476..f03346c9f 100644 --- a/pox/lib/packet/lldp.py +++ b/pox/lib/packet/lldp.py @@ -60,9 +60,9 @@ import struct import time -from packet_utils import * +from .packet_utils import * -from packet_base import packet_base +from .packet_base import packet_base from pox.lib.addresses import EthAddr from pox.lib.util import initHelper diff --git a/pox/lib/packet/mpls.py b/pox/lib/packet/mpls.py index 7eaa7ca68..a144f3b69 100644 --- a/pox/lib/packet/mpls.py +++ b/pox/lib/packet/mpls.py @@ -29,10 +29,10 @@ #====================================================================== import struct -from packet_base import packet_base -from ethernet import ethernet +from .packet_base import packet_base +from .ethernet import ethernet -from packet_utils import * +from .packet_utils import * class mpls(packet_base): diff --git a/pox/lib/packet/packet_base.py b/pox/lib/packet/packet_base.py index a0f070db4..847f66a39 100644 --- a/pox/lib/packet/packet_base.py +++ b/pox/lib/packet/packet_base.py @@ -88,7 +88,7 @@ def warn(self, *args): #TODO: Remove? lg.warning(*args) - def __nonzero__(self): + def __bool__(self): return self.parsed is True def __len__(self): @@ -136,7 +136,7 @@ def find(self, proto): """ Find the specified protocol layer based on its class type or name. """ - if not isinstance(proto, basestring): + if not isinstance(proto, str): proto = proto.__name__ if self.__class__.__name__ == proto and self.parsed: return self @@ -171,7 +171,7 @@ def set_payload(self, payload): elif type(payload) == bytes: self.next = payload else: - raise TypeError("payload must be string or packet subclass") + raise TypeError("payload must be bytes or packet subclass") def parse(self, raw): '''Override me with packet parsing code''' diff --git a/pox/lib/packet/rip.py b/pox/lib/packet/rip.py index de4da98d0..a9f843164 100644 --- a/pox/lib/packet/rip.py +++ b/pox/lib/packet/rip.py @@ -52,8 +52,8 @@ #====================================================================== import struct -from packet_utils import * -from packet_base import packet_base +from .packet_utils import * +from .packet_base import packet_base from pox.lib.addresses import * # RIP v2 multicast address @@ -114,7 +114,7 @@ def parse (self, raw): while len(raw) >= 20: try: self.entries.append(RIPEntry(raw=raw[0:20])) - except Exception, e: + except Exception as e: self.err('Exception parsing RIP entries: ' + str(e)) return None raw = raw[20:] diff --git a/pox/lib/packet/tcp.py b/pox/lib/packet/tcp.py index c68821502..b0dda79da 100644 --- a/pox/lib/packet/tcp.py +++ b/pox/lib/packet/tcp.py @@ -43,11 +43,11 @@ #====================================================================== import struct -from packet_utils import * +from .packet_utils import * from socket import htons from socket import htonl -from packet_base import packet_base +from .packet_base import packet_base import logging lg = logging.getLogger('packet') @@ -95,11 +95,11 @@ def pack (self): @classmethod def unpack_new (cls, buf, offset = 0): - o = cls(ord(buf[offset]), None) + o = cls(buf[offset], None) arr = buf i = offset - length = ord(arr[i+1]) + length = arr[i+1] # These should be special-cased elsewhere assert o.type != tcp_opt.EOL @@ -112,7 +112,7 @@ def unpack_new (cls, buf, offset = 0): elif o.type == tcp_opt.WSOPT: if length != 3: raise RuntimeError("WSOPT option length != 3") - o.val = ord(arr[i+2]) + o.val = arr[i+2] elif o.type == tcp_opt.SACKPERM: if length != 2: raise RuntimeError("SACKPERM option length != 2") @@ -182,9 +182,9 @@ def unpack_new (dummy, buf, offset = 0): Returns a subclass for the specific option subtype. If the subtype is unknown, returns a generic mp_unknown. """ - t = ord(buf[offset]) + t = buf[offset] assert t == 30 - st = (ord(buf[offset+2]) & 0xf0) >> 4 + st = (buf[offset+2] & 0xf0) >> 4 cls = _mptcp_opts.get(st, mp_unknown) return cls.unpack_new(buf, offset) @@ -211,11 +211,11 @@ def pack (self): @classmethod def unpack_new (cls, buf, offset = 0): o = cls() - o.type = ord(buf[offset]) - length = ord(buf[offset+1]) + o.type = buf[offset] + length = buf[offset+1] o.data = buf[offset+2:offset+2+length] try: - self.subtype = (ord(buf[offset+2]) & 0xf0) >> 4 + self.subtype = (buf[offset+2] & 0xf0) >> 4 except: pass @@ -590,9 +590,9 @@ def parse_options (self, raw): while i < self.hdr_len: # Special case single-byte options - if ord(arr[i]) == tcp_opt.EOL: + if arr[i] == tcp_opt.EOL: break - if ord(arr[i]) == tcp_opt.NOP: + if arr[i] == tcp_opt.NOP: self.options.append(tcp_opt(tcp_opt.NOP,None)) i += 1 continue @@ -600,9 +600,9 @@ def parse_options (self, raw): # Sanity checking if i + 2 > dlen: raise RuntimeError("Very truncated TCP option") - if i + ord(arr[i+1]) > dlen: + if i + arr[i+1] > dlen: raise RuntimeError("Truncated TCP option") - if ord(arr[i+1]) < 2: + if arr[i+1] < 2: raise RuntimeError("Illegal TCP option length") i,opt = tcp_opt.unpack_new(arr, i) diff --git a/pox/lib/packet/udp.py b/pox/lib/packet/udp.py index 11677aaf1..1b75a084f 100644 --- a/pox/lib/packet/udp.py +++ b/pox/lib/packet/udp.py @@ -33,13 +33,13 @@ # +---------------- ... #====================================================================== import struct -from packet_utils import * -from dhcp import * -from dns import * -from rip import * -from vxlan import * +from .packet_utils import * +from .dhcp import * +from .dns import * +from .rip import * +from .vxlan import * -from packet_base import packet_base +from .packet_base import packet_base # We grab ipv4 later to prevent cyclic dependency #_ipv4 = None diff --git a/pox/lib/packet/vlan.py b/pox/lib/packet/vlan.py index 9132d0f78..a7485bde9 100644 --- a/pox/lib/packet/vlan.py +++ b/pox/lib/packet/vlan.py @@ -30,10 +30,10 @@ import struct -from packet_base import packet_base -from ethernet import ethernet +from .packet_base import packet_base +from .ethernet import ethernet -from packet_utils import * +from .packet_utils import * class vlan(packet_base): diff --git a/pox/lib/packet/vxlan.py b/pox/lib/packet/vxlan.py index 35428f98e..2fc1a4465 100644 --- a/pox/lib/packet/vxlan.py +++ b/pox/lib/packet/vxlan.py @@ -31,10 +31,10 @@ import struct -from packet_base import packet_base -from ethernet import ethernet +from .packet_base import packet_base +from .ethernet import ethernet -from packet_utils import * +from .packet_utils import * VXLAN_PORT = 4789 diff --git a/pox/lib/pxpcap/__init__.py b/pox/lib/pxpcap/__init__.py index abd2ef150..4a3549edc 100755 --- a/pox/lib/pxpcap/__init__.py +++ b/pox/lib/pxpcap/__init__.py @@ -63,7 +63,7 @@ def __getattr__ (self, *args): pass from pox.lib.addresses import IPAddr, EthAddr, IPAddr6 -import parser +from . import parser from threading import Thread, Lock, RLock, Semaphore import pox.lib.packet as pkt import pox.lib.util @@ -155,11 +155,11 @@ def quit_pcap (pcap): del self._pend_remove[:] del self._pend_add[:] if must_remove: - backwards = dict([(v,k) for k,v in _filenos.items()]) + backwards = dict([(v,k) for k,v in list(_filenos.items())]) for pcap in must_remove: if pcap not in backwards: continue del _filenos[backwards[pcap]] - fds = _filenos.keys() + fds = list(_filenos.keys()) fds.append(self._pinger) if len(fds) <= 1: @@ -190,7 +190,7 @@ def quit_pcap (pcap): elif not xx: # Nothing! quit = [] - for pcap in _filenos.itervalues(): + for pcap in _filenos.values(): if pcap._quitting: quit.append(pcap) if quit: reread = True @@ -296,7 +296,7 @@ def __init__ (self, device = None, promiscuous = True, period = 10, else: self.callback = callback - for k,v in kw.items(): + for k,v in list(kw.items()): assert not hasattr(self, k) setattr(self, k, v) @@ -488,7 +488,7 @@ def __del__ (self): try: _link_type_names = {} - for k,v in copy.copy(pcapc.__dict__).iteritems(): + for k,v in copy.copy(pcapc.__dict__).items(): if k.startswith("DLT_"): _link_type_names[v] = k except: @@ -515,25 +515,25 @@ def cb (obj, data, sec, usec, length): nbd = bytes_real - bytes_got if nbd != bytes_diff: bytes_diff = nbd - print "lost bytes:",nbd + print("lost bytes:",nbd) if t > total: total = t + 500 - print t,"total" + print(t,"total") if d > drop: drop = d - print d, "dropped" + print(d, "dropped") p = pkt.ethernet(data) ip = p.find('ipv4') if ip: - print ip.srcip,"\t",ip.dstip, p + print(ip.srcip,"\t",ip.dstip, p) - print "\n".join(["%i. %s" % x for x in - enumerate(PCap.get_device_names())]) + print("\n".join(["%i. %s" % x for x in + enumerate(PCap.get_device_names())])) if interface.startswith("#"): interface = int(interface[1:]) interface = PCap.get_device_names()[interface] - print "Interface:",interface + print("Interface:",interface) p = PCap(interface, callback = cb, filter = "icmp") @@ -585,11 +585,11 @@ def interfaces (verbose = False): Show interfaces """ if not verbose: - print "\n".join(["%i. %s" % x for x in - enumerate(PCap.get_device_names())]) + print("\n".join(["%i. %s" % x for x in + enumerate(PCap.get_device_names())])) else: import pprint - print pprint.pprint(PCap.get_devices()) + print(pprint.pprint(PCap.get_devices())) from pox.core import core core.quit() @@ -601,7 +601,7 @@ def launch (interface, no_incoming=False, no_outgoing=False): """ def cb (obj, data, sec, usec, length): p = pkt.ethernet(data) - print p.dump() + print(p.dump()) if interface.startswith("#"): interface = int(interface[1:]) diff --git a/pox/lib/pxpcap/dump_trace.py b/pox/lib/pxpcap/dump_trace.py index 61c5a1fdb..0eb0d75de 100644 --- a/pox/lib/pxpcap/dump_trace.py +++ b/pox/lib/pxpcap/dump_trace.py @@ -68,7 +68,7 @@ def cb (data, parser): else: p = packet while p: - if isinstance(p, basestring): + if isinstance(p, str): msg += "[%s bytes]" % (len(p),) break msg += "[%s]" % (p.__class__.__name__,) @@ -79,7 +79,7 @@ def cb (data, parser): msg = msg[:_max_length-3] msg += "..." #core.getLogger("dump").info(msg) - print msg + print(msg) def launch (infile, verbose = False, max_length = 110, @@ -91,12 +91,12 @@ def launch (infile, verbose = False, max_length = 110, else: _max_length = int(max_length) force_show = (show is True) or (hide is False and show is False) - if isinstance(hide, basestring): + if isinstance(hide, str): hide = hide.replace(',', ' ').replace('|', ' ') hide = set([p.lower() for p in hide.split()]) else: hide = set() - if isinstance(show, basestring): + if isinstance(show, str): show = show.replace(',', ' ').replace('|', ' ') show = set([p.lower() for p in show.split()]) else: diff --git a/pox/lib/recoco/__init__.py b/pox/lib/recoco/__init__.py index c545b6b1b..67f2630d6 100644 --- a/pox/lib/recoco/__init__.py +++ b/pox/lib/recoco/__init__.py @@ -1 +1 @@ -from recoco import * +from .recoco import * diff --git a/pox/lib/recoco/consumer.py b/pox/lib/recoco/consumer.py index 607ef2358..21745e785 100644 --- a/pox/lib/recoco/consumer.py +++ b/pox/lib/recoco/consumer.py @@ -78,7 +78,7 @@ def _do_work (self, work): def run (self): while core.running and self.running: - for _ in xrange(min(self.batch_size, len(self.queue))): + for _ in range(min(self.batch_size, len(self.queue))): work = self.queue.pop() try: self._do_work(work) diff --git a/pox/lib/recoco/recoco.py b/pox/lib/recoco/recoco.py index c2e4949a3..928f405d7 100644 --- a/pox/lib/recoco/recoco.py +++ b/pox/lib/recoco/recoco.py @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import print_function + from collections import deque -from Queue import PriorityQueue -from Queue import Queue +from queue import PriorityQueue +from queue import Queue import time import threading from threading import Thread @@ -337,7 +337,7 @@ def cycle (self): # Just unschedule/sleep #print "Unschedule", t, rv pass - elif type(rv) == int or type(rv) == long or type(rv) == float: + elif type(rv) == int or type(rv) == int or type(rv) == float: # Sleep time if rv == 0: #print "sleep 0" @@ -453,7 +453,7 @@ def execute (self, task, scheduler): if self._t is None: # Just unschedule return - if self._t is 0 or self._t < time.time(): + if self._t == 0 or self._t < time.time(): # Just reschedule scheduler.fast_schedule(task) return @@ -851,7 +851,7 @@ def _select (self, tasks, rets): #TODO: Fix this. It's pretty expensive. There had been some code which # priority heaped this, but I don't think a fully working version # ever quite made it. - for t,trl,twl,txl,tto in tasks.itervalues(): + for t,trl,twl,txl,tto in tasks.values(): if tto != None: if tto <= now: # Already expired @@ -860,7 +860,7 @@ def _select (self, tasks, rets): if tto-now > 0.1: print("preexpired",tto,now,tto-now) continue tt = tto - now - if tt < timeout or timeout is None: + if timeout is None or tt < timeout: timeout = tt timeoutTask = t @@ -877,9 +877,9 @@ def _select (self, tasks, rets): self._return(t, ([],[],[])) if timeout is None: timeout = CYCLE_MAXIMUM - ro, wo, xo = self._select_func( rl.keys() + [self._pinger], - wl.keys(), - xl.keys(), timeout ) + ro, wo, xo = self._select_func( list(rl.keys()) + [self._pinger], + list(wl.keys()), + list(xl.keys()), timeout ) if len(ro) == 0 and len(wo) == 0 and len(xo) == 0 and timeoutTask != None: # IO is idle - dispatch timers / release timeouts @@ -914,7 +914,7 @@ def _select (self, tasks, rets): if task not in rets: rets[task] = ([],[],[]) rets[task][2].append(i) - for t,v in rets.iteritems(): + for t,v in rets.items(): del tasks[t] self._return(t, v) rets.clear() diff --git a/pox/lib/revent/revent.py b/pox/lib/revent/revent.py index 883a3040c..a3637d9f5 100644 --- a/pox/lib/revent/revent.py +++ b/pox/lib/revent/revent.py @@ -92,7 +92,7 @@ def foo (self): # handlers, see raiseEventNoErrors(). """ -from __future__ import print_function + import operator @@ -326,7 +326,7 @@ def _eventMixin_get_listener_count (self): """ Returns the number of listeners. """ - return sum((len(x) for x in self._eventMixin_handlers.itervalues())) + return sum((len(x) for x in self._eventMixin_handlers.values())) def removeListener (self, handlerOrEID, eventType=None): """ @@ -400,10 +400,10 @@ def add_listener (self, handler, event_type=None, event_name=None, """ assert not (event_type and event_name) if (not event_type) and not (event_name): - if not handler.func_name.startswith("_handle_"): + if not handler.__name__.startswith("_handle_"): raise RuntimeError("Could not infer event type") #event_name = handler.func_name[8:] - event_name = handler.func_name.rsplit('_', 1)[-1] + event_name = handler.__name__.rsplit('_', 1)[-1] by_name = True if event_name else False t = event_name if by_name else event_type @@ -581,8 +581,8 @@ def __init__ (self, source, handler, removeData): removeData : The identifier used for removal of the handler """ self.source = weakref.ref(source, self._forgetMe) - self.obj = weakref.ref(handler.im_self, self._forgetMe) # methods only! - self.method = handler.im_func + self.obj = weakref.ref(handler.__self__, self._forgetMe) # methods only! + self.method = handler.__func__ self.removeData = removeData self.name = str(handler) diff --git a/pox/lib/threadpool.py b/pox/lib/threadpool.py index 8b857885d..cc023ed45 100644 --- a/pox/lib/threadpool.py +++ b/pox/lib/threadpool.py @@ -18,10 +18,10 @@ Kills off up to around half of its workers when more than half are idle. """ -from __future__ import print_function -from __future__ import with_statement + + from threading import Thread, RLock -from Queue import Queue +from queue import Queue CYCLE_TIME = 3 @@ -71,7 +71,7 @@ def __init__ (self, initial = 0, maximum = None): self._tasks = Queue() self.maximum = maximum self._lock = RLock() - for i in xrange(initial): + for i in range(initial): self._new_worker def _new_worker (self): @@ -98,7 +98,7 @@ def add_task (self, func, args=(), kwargs={}): self._tasks.put((func, args, kwargs)) if self.available > self._total / 2 and self.total > 8: - for i in xrange(self._total / 2 - 1): + for i in range(self._total / 2 - 1): self._tasks.put((None,None,None)) self._lock.release() diff --git a/pox/lib/util.py b/pox/lib/util.py index db49382fb..e49acfc40 100644 --- a/pox/lib/util.py +++ b/pox/lib/util.py @@ -20,7 +20,7 @@ #TODO: Break into multiple modules? (data structures, POX-specific, etc.) -from __future__ import print_function + import traceback import struct @@ -200,13 +200,13 @@ def dpid_to_str (dpid, alwaysLong = False): """ Convert a DPID from a long into into the canonical string form. """ - if type(dpid) is long or type(dpid) is int: + if type(dpid) is int or type(dpid) is int: # Not sure if this is right dpid = struct.pack('!Q', dpid) assert len(dpid) == 8 - r = '-'.join(['%02x' % (ord(x),) for x in dpid[2:]]) + r = '-'.join(['%02x' % (x,) for x in dpid[2:]]) if alwaysLong or dpid[0:2] != (b'\x00'*2): r += '|' + str(struct.unpack('!H', dpid[0:2])[0]) @@ -238,7 +238,7 @@ def assert_type(name, obj, types, none_ok=True): for cls in types: if isinstance(obj, cls): return True - allowed_types = "|".join(map(lambda x: str(x), types)) + allowed_types = "|".join([str(x) for x in types]) stack = traceback.extract_stack() stack_msg = "Function call %s() in %s:%d" % (stack[-2][2], stack[-3][0], stack[-3][1]) @@ -255,7 +255,7 @@ def init_helper (obj, kw): Inside a class's __init__, this will copy keyword arguments to fields of the same name. See libopenflow for an example. """ - for k,v in kw.iteritems(): + for k,v in kw.items(): if not hasattr(obj, k): raise TypeError(obj.__class__.__name__ + " constructor got " + "unexpected keyword argument '" + k + "'") @@ -281,7 +281,7 @@ def __init__ (self, pair): def ping (self): if os is None: return #TODO: Is there a better fix for this? - os.write(self._w, ' ') + os.write(self._w, b' ') def fileno (self): return self._r @@ -455,7 +455,7 @@ def hexdump (data): data = [ord(c) for c in data] o = "" def chunks (data, length): - return (data[i:i+length] for i in xrange(0, len(data), length)) + return (data[i:i+length] for i in range(0, len(data), length)) def filt (c): if c >= 32 and c <= 126: return chr(c) return '.' @@ -506,7 +506,7 @@ def connect_socket_with_backoff (address, port, max_backoff_seconds=32): return sock -_scalar_types = (int, long, basestring, float, bool) +_scalar_types = (int, int, str, float, bool) def is_scalar (v): """ @@ -520,7 +520,7 @@ def is_listlike (o): Is this a sequence that isn't like a string or bytes? """ if isinstance(o, (bytes,str,bytearray)): return False - return isinstance(o, collections.Iterable) + return isinstance(o, collections.abc.Iterable) def fields_of (obj, primitives_only=False, @@ -543,7 +543,7 @@ def fields_of (obj, primitives_only=False, if not isinstance(v, _scalar_types): continue elif primitives_and_composites_only: - if not isinstance(v, (int, long, basestring, float, bool, set, + if not isinstance(v, (int, str, float, bool, set, dict, list)): continue #r.append((k,v)) diff --git a/pox/log/__init__.py b/pox/log/__init__.py index a456155c8..2e4b7bdab 100644 --- a/pox/log/__init__.py +++ b/pox/log/__init__.py @@ -82,7 +82,7 @@ def standard (use_kw, v, C): else: if use_kw: v = dict([x.split('=',1) for x in v.split(',')]) - v = {k:_parse(v) for k,v in v.items()} + v = {k:_parse(v) for k,v in list(v.items())} h = C(**v) else: v = [_parse(p) for p in v.split(',')] @@ -90,7 +90,7 @@ def standard (use_kw, v, C): h.setFormatter(formatter) logging.getLogger().addHandler(h) - for _k,v in kw.iteritems(): + for _k,v in kw.items(): k = _k use_kw = k.startswith("*") if use_kw: k = k[1:] diff --git a/pox/log/color.py b/pox/log/color.py index 2434ae0f7..cf64b569f 100644 --- a/pox/log/color.py +++ b/pox/log/color.py @@ -52,7 +52,7 @@ } # Add intense/bold colors (names it capitals) -for _c in [_n for _n,_v in COLORS.items() if _v[0] == 0]: +for _c in [_n for _n,_v in list(COLORS.items()) if _v[0] == 0]: COLORS[_c.upper()] = (1,COLORS[_c][1]) COMMANDS = { @@ -97,7 +97,7 @@ def _proc (msg, level_color = "DEBUG"): if cmd: best = None bestlen = 0 - for k,v in COMMANDS.iteritems(): + for k,v in COMMANDS.items(): if len(k) > bestlen: if m.startswith(k): best = (k,v) @@ -108,7 +108,7 @@ def _proc (msg, level_color = "DEBUG"): m = m[bestlen:] best = None bestlen = 0 - for k,v in COLORS.iteritems(): + for k,v in COLORS.items(): if len(k) > bestlen: if m.startswith(k): best = (k,v) diff --git a/pox/log/level.py b/pox/log/level.py index 5bb091f94..3ba65d08a 100644 --- a/pox/log/level.py +++ b/pox/log/level.py @@ -23,7 +23,7 @@ def launch (__INSTANCE__=None, **kw): For example, to turn off the verbose web logging, try: pox.py web.webcore log.level --web.webcore=INFO """ - for k,v in kw.iteritems(): + for k,v in kw.items(): if v is True: # This means they did something like log.level --DEBUG v = k diff --git a/pox/log/msg.py b/pox/log/msg.py index 427c2a1c5..59f79f968 100644 --- a/pox/log/msg.py +++ b/pox/log/msg.py @@ -35,7 +35,7 @@ def get_level_by_name (level): except Exception: pass - if not isinstance(level, (str,unicode)): + if not isinstance(level, str): return None if (len(level) == 0) or (len(level.strip(string.ascii_uppercase)) != 0): return None diff --git a/pox/messenger/__init__.py b/pox/messenger/__init__.py index 1c258cf81..96f48ece2 100644 --- a/pox/messenger/__init__.py +++ b/pox/messenger/__init__.py @@ -218,7 +218,7 @@ def _close (self): if self._is_connected is False: return self._transport._forget(self) self._is_connected = False - for name,chan in self._transport._nexus._channels.items(): + for name,chan in list(self._transport._nexus._channels.items()): chan._remove_member(self) self.raiseEventNoErrors(ConnectionClosed, self) #self._transport._nexus.raiseEventNoErrors(ConnectionClosed, self) @@ -329,7 +329,7 @@ def __init__ (self, name, nexus = None, temporary = False): associated (defaults to core.MessengerNexus). """ EventMixin.__init__(self) - assert isinstance(name, basestring) + assert isinstance(name, str) self._name = name self._nexus = _get_nexus(nexus) @@ -636,12 +636,12 @@ def generate_session (self): key = str(random.random()) + str(time.time()) + str(r) key += str(id(key)) + self._session_salt - key = b32encode(hashlib.md5(key).digest()).upper().replace('=','') + key = b32encode(hashlib.md5(key.encode('utf-8')).digest()).upper().replace('='.encode('utf-8'),''.encode('utf-8')) def alphahex (r): """ base 16 on digits 'a' through 'p' """ r=hex(r)[2:].lower() - return ''.join(chr((10 if ord(x) >= 97 else 49) + ord(x)) for x in r) + return b''.join(chr((10 if ord(x) >= 97 else 49) + ord(x)).encode('latin-1') for x in r) key = alphahex(r) + key diff --git a/pox/messenger/ajax_transport.py b/pox/messenger/ajax_transport.py index 2ec75c860..39cf99679 100644 --- a/pox/messenger/ajax_transport.py +++ b/pox/messenger/ajax_transport.py @@ -48,7 +48,7 @@ def __init__ (self, nexus = None): self._t = Timer(SESSION_TIMEOUT, self._check_timeouts, recurring=True) def _check_timeouts (self): - for c in self._connections.values(): + for c in list(self._connections.values()): c._check_timeout() def _forget (self, connection): diff --git a/pox/messenger/log_service.py b/pox/messenger/log_service.py index 90b404a0c..bdadb9f31 100644 --- a/pox/messenger/log_service.py +++ b/pox/messenger/log_service.py @@ -132,7 +132,7 @@ def _process_parameters (self, params): if "setLevels" in params: levels = params['setLevels'] if isinstance(levels, dict): - for k,v in levels.iteritems(): + for k,v in levels.items(): l = core.getLogger(k) l.setLevel(v) else: @@ -188,25 +188,25 @@ def get (key): raiseLevels = get("raiseLevels") # more verbose setLevels = get("setLevels") - for k,v in lowerLevels.iteritems(): + for k,v in lowerLevels.items(): logger = core.getLogger(k) level = logging._checkLevel(v) if not l.isEnabledFor(level+1): logger.setLevel(v) - for k,v in raiseLevels.iteritems(): + for k,v in raiseLevels.items(): logger = core.getLogger(k) if not l.isEnabledFor(v): logger.setLevel(v) - for k,v in setLevels.iteritems(): + for k,v in setLevels.items(): logger = core.getLogger(k) logger.setLevel(v) message = msg.get("message", None) if message: level = msg.get("level", "DEBUG") - if isinstance(level, basestring): + if isinstance(level, str): import logging if not level.isalpha(): level = logging.DEBUG diff --git a/pox/messenger/test_client.py b/pox/messenger/test_client.py index 30427bd4f..1fd5b3e26 100755 --- a/pox/messenger/test_client.py +++ b/pox/messenger/test_client.py @@ -26,7 +26,7 @@ class JSONDestreamer (object): import json decoder = json.JSONDecoder() def __init__ (self, callback = None): - self._buf = '' + self._buf = b'' self.callback = callback if callback else self.rx def push (self, data): @@ -35,7 +35,7 @@ def push (self, data): self._buf += data try: while len(self._buf) > 0: - r,off = self.decoder.raw_decode(self._buf) + r,off = self.decoder.raw_decode(self._buf.decode()) self._buf = self._buf[off:].lstrip() self.callback(r) @@ -44,7 +44,7 @@ def push (self, data): def rx (self, data): import json - print "Recv:", json.dumps(data, indent=4) + print("Recv:", json.dumps(data, indent=4)) jd = JSONDestreamer() done = False @@ -53,7 +53,7 @@ def reader (socket): global done while True: d = socket.recv(1024) - if d == "": + if d == b"": done = True break jd.push(d) @@ -66,8 +66,8 @@ def channel (ch): import readline def main (addr = "127.0.0.1", port = 7790): - print "Connecting to %s:%i" % (addr,port) port = int(port) + print("Connecting to %s:%i" % (addr,port)) sock = socket.create_connection((addr, port)) @@ -78,7 +78,7 @@ def main (addr = "127.0.0.1", port = 7790): while not done: try: #print ">", - m = raw_input() + m = input() if len(m) == 0: continue m = eval(m) if not isinstance(m, dict): diff --git a/pox/messenger/web_transport.py b/pox/messenger/web_transport.py index 1fcefdb6a..4e4248826 100644 --- a/pox/messenger/web_transport.py +++ b/pox/messenger/web_transport.py @@ -22,8 +22,8 @@ Connection, and we could (but are not) reuse those. """ -from SocketServer import ThreadingMixIn -from BaseHTTPServer import * +from socketserver import ThreadingMixIn +from http.server import * import time import select @@ -102,7 +102,7 @@ def __init__ (self, nexus = None): self._t = Timer(60*2, self._check_timeouts, recurring=True) def _check_timeouts (self): - for c in self._connections.values(): + for c in list(self._connections.values()): c._check_timeout() def _forget (self, connection): diff --git a/pox/misc/gephi_topo.py b/pox/misc/gephi_topo.py index d2a56b89e..0d2ede14d 100644 --- a/pox/misc/gephi_topo.py +++ b/pox/misc/gephi_topo.py @@ -166,7 +166,7 @@ def get_full (self): out.append(an(s, kind='switch')) for e in self.links: out.append(ae(e[0],e[1])) - for h,s in self.hosts.iteritems(): + for h,s in self.hosts.items(): out.append(an(h, kind='host')) if s in self.switches: out.append(ae(h,s)) @@ -220,7 +220,7 @@ def _handle_openflow_discovery_LinkEvent (self, event): self.send(ae(s1,s2)) # Do we have abandoned hosts? - for h,s in self.hosts.iteritems(): + for h,s in self.hosts.items(): if s == s1: self.send(ae(h,s1)) elif s == s2: self.send(ae(h,s2)) diff --git a/pox/misc/ip_loadbalancer.py b/pox/misc/ip_loadbalancer.py index a754b2a5b..74fbb8820 100644 --- a/pox/misc/ip_loadbalancer.py +++ b/pox/misc/ip_loadbalancer.py @@ -136,7 +136,7 @@ def _do_expire (self): t = time.time() # Expire probes - for ip,expire_at in self.outstanding_probes.items(): + for ip,expire_at in list(self.outstanding_probes.items()): if t > expire_at: self.outstanding_probes.pop(ip, None) if ip in self.live_servers: @@ -145,7 +145,7 @@ def _do_expire (self): # Expire old flows c = len(self.memory) - self.memory = {k:v for k,v in self.memory.items() + self.memory = {k:v for k,v in list(self.memory.items()) if not v.is_expired} if len(self.memory) != c: self.log.debug("Expired %i flows", c-len(self.memory)) @@ -194,7 +194,7 @@ def _pick_server (self, key, inport): """ Pick a server for a (hopefully) new connection """ - return random.choice(self.live_servers.keys()) + return random.choice(list(self.live_servers.keys())) def _handle_PacketIn (self, event): inport = event.port diff --git a/pox/misc/mac_blocker.py b/pox/misc/mac_blocker.py index cefcd788f..ee99f105c 100644 --- a/pox/misc/mac_blocker.py +++ b/pox/misc/mac_blocker.py @@ -25,7 +25,7 @@ from pox.lib.addresses import EthAddr import pox.openflow.libopenflow_01 as of -from Tkinter import * +from tkinter import * # Sets of blocked and unblocked MACs blocked = set() diff --git a/pox/misc/nat.py b/pox/misc/nat.py index 283a93e0d..3c43cacc1 100644 --- a/pox/misc/nat.py +++ b/pox/misc/nat.py @@ -119,7 +119,7 @@ def _all_dependencies_met (self): def _expire (self): dead = [] - for r in self._record_by_outgoing.itervalues(): + for r in self._record_by_outgoing.values(): if r.expired: dead.append(r) diff --git a/pox/misc/telnetd/__init__.py b/pox/misc/telnetd/__init__.py index 59ccd5672..add9d5282 100644 --- a/pox/misc/telnetd/__init__.py +++ b/pox/misc/telnetd/__init__.py @@ -692,7 +692,7 @@ def __init__ (self): def _rx_telnet (self, msg): #self.log.info(" ".join("%02x" % (ord(x),) for x in msg)) - print " ".join("%02x" % (ord(x),) for x in msg), + print(" ".join("%02x" % (ord(x),) for x in msg), end=' ') @property def log (self): @@ -704,7 +704,7 @@ def log (self): class O (object): pass def pr (fmt, *args): - print fmt % args + print(fmt % args) def nopr (*args): pass o = O() @@ -929,7 +929,7 @@ def _chr (opt): Like chr(), but if the value is already a string, simply returns it. """ - if isinstance(opt, basestring): + if isinstance(opt, str): return opt else: return chr(opt) @@ -1728,7 +1728,7 @@ def check_timeout (frame, event, arg): oldout = sys.stdout olderr = sys.stderr oldin = sys.stdin - from StringIO import StringIO + from io import StringIO sys.stdout = StringIO() sys.stderr = sys.stdout # Sometime in the future something like this may be more useful... diff --git a/pox/openflow/__init__.py b/pox/openflow/__init__.py index 001f3972e..96507746b 100644 --- a/pox/openflow/__init__.py +++ b/pox/openflow/__init__.py @@ -35,7 +35,7 @@ from pox.lib.revent import * from pox.lib.util import dpidToStr -import libopenflow_01 as of +from . import libopenflow_01 as of from pox.lib.packet.ethernet import ethernet @@ -310,19 +310,19 @@ def getNexus (self, connection): class ConnectionDict (dict): def __iter__ (self): - return self.itervalues() + return iter(self.values()) def __contains__ (self, item): v = dict.__contains__(self, item) if v: return v - return item in self.values() + return item in list(self.values()) @property def dpids (self): - return self.keys() + return list(self.keys()) def iter_dpids (self): - return self.iterkeys() + return iter(self.keys()) class OpenFlowNexus (EventMixin): @@ -391,7 +391,7 @@ def sendToDPID (self, dpid, data): return False def _handle_DownEvent (self, event): - for c in self._connections.values(): + for c in list(self._connections.values()): try: c.disconnect() except: diff --git a/pox/openflow/discovery.py b/pox/openflow/discovery.py index 32564aec4..f307ff181 100644 --- a/pox/openflow/discovery.py +++ b/pox/openflow/discovery.py @@ -181,7 +181,7 @@ def _create_discovery_packet (dpid, port_num, port_addr, ttl): """ chassis_id = pkt.chassis_id(subtype=pkt.chassis_id.SUB_LOCAL) - chassis_id.id = bytes('dpid:' + hex(long(dpid))[2:-1]) + chassis_id.id = bytes('dpid:' + hex(int(dpid))[2:-1]) # Maybe this should be a MAC. But a MAC of what? Local port, maybe? port_id = pkt.port_id(subtype=pkt.port_id.SUB_PORT, id=str(port_num)) @@ -189,7 +189,7 @@ def _create_discovery_packet (dpid, port_num, port_addr, ttl): ttl = pkt.ttl(ttl = ttl) sysdesc = pkt.system_description() - sysdesc.payload = bytes('dpid:' + hex(long(dpid))[2:-1]) + sysdesc.payload = bytes('dpid:' + hex(int(dpid))[2:-1]) discovery_packet = pkt.lldp() discovery_packet.tlvs.append(chassis_id) @@ -296,7 +296,7 @@ def send_cycle_time (self): def install_flow (self, con_or_dpid, priority = None): if priority is None: priority = self._flow_priority - if isinstance(con_or_dpid, (int,long)): + if isinstance(con_or_dpid, int): con = core.openflow.connections.get(con_or_dpid) if con is None: log.warn("Can't install flow for %s", dpid_to_str(con_or_dpid)) @@ -331,7 +331,7 @@ def _expire_links (self): """ now = time.time() - expired = [link for link,timestamp in self.adjacency.iteritems() + expired = [link for link,timestamp in self.adjacency.items() if timestamp + self._link_timeout < now] if expired: for link in expired: diff --git a/pox/openflow/flow_table.py b/pox/openflow/flow_table.py index c0028e99b..4bbf79321 100755 --- a/pox/openflow/flow_table.py +++ b/pox/openflow/flow_table.py @@ -16,7 +16,7 @@ Implementation of an OpenFlow flow table """ -from libopenflow_01 import * +from .libopenflow_01 import * from pox.lib.revent import * import time diff --git a/pox/openflow/keepalive.py b/pox/openflow/keepalive.py index a962a4603..3ce4c8de3 100644 --- a/pox/openflow/keepalive.py +++ b/pox/openflow/keepalive.py @@ -38,7 +38,7 @@ def _handle_timer (ofnexus): t = time.time() dead = [] - for dpid,con in ofnexus.connections.iteritems(): + for dpid,con in ofnexus.connections.items(): if t - con.idle_time > (_interval+_switch_timeout): dead.append(con) continue diff --git a/pox/openflow/libopenflow_01.py b/pox/openflow/libopenflow_01.py index 5ce71e5c7..0d789538f 100755 --- a/pox/openflow/libopenflow_01.py +++ b/pox/openflow/libopenflow_01.py @@ -16,7 +16,7 @@ # autogenerated from openflow.h via a program by KK Yap. It has been # substantially altered since then. -from __future__ import print_function + import struct import operator @@ -37,6 +37,7 @@ from pox.lib.util import initHelper from pox.lib.util import hexdump from pox.lib.util import is_listlike +from functools import reduce EMPTY_ETH = EthAddr(None) @@ -71,7 +72,7 @@ def XIDGenerator (start = 1, stop = MAX_XID): i = start def xid_generator (start = 1, stop = MAX_XID): - return XIDGenerator(start, stop).next + return XIDGenerator(start, stop).__next__ def user_xid_generator (): return xid_generator(0x80000000, 0xffFFffFF) @@ -124,7 +125,7 @@ def _readzs (data, offset, length): #if len(d[1].replace(b"\x00", b"")) > 0: # raise RuntimeError("Non-zero string padding") assert True if (len(d) == 1) else (len(d[1].replace(b"\x00", b"")) == 0) - return (offset, d[0]) + return (offset, d[0].decode('latin-1')) def _readether (data, offset): (offset, d) = _read(data, offset, 6) @@ -161,7 +162,7 @@ def __len__ (cls): return cls._MIN_LENGTH -class ofp_base (object): +class ofp_base (object, metaclass=_ofp_meta): """ Base class for OpenFlow messages/structures @@ -170,7 +171,6 @@ class ofp_base (object): implement a __len__ instance method and set a class level _MIN_LENGTH attribute to your minimum length. """ - __metaclass__ = _ofp_meta def _assert (self): r = self._validate() @@ -647,7 +647,7 @@ def unpack_new (cls, raw, offset=0): def __repr__ (self): s = [] - for k,v in vars(self).items(): + for k,v in list(vars(self).items()): if callable(v): continue if k.startswith("_"): continue if k == "type": continue @@ -728,7 +728,7 @@ def pack (self): packed += struct.pack("!H", self.port_no) packed += (self.hw_addr if isinstance(self.hw_addr, bytes) else self.hw_addr.toRaw()) - packed += self.name.ljust(OFP_MAX_PORT_NAME_LEN,'\0') + packed += self.name.ljust(OFP_MAX_PORT_NAME_LEN,'\0').encode('latin-1') packed += struct.pack("!LLLLLL", self.config, self.state, self.curr, self.advertised, self.supported, self.peer) return packed @@ -760,12 +760,17 @@ def __eq__ (self, other): if self.peer != other.peer: return False return True - def __cmp__ (self, other): - if type(other) != type(self): return id(self)-id(other) - if self.port_no < other.port_no: return -1 - if self.port_no > other.port_no: return 1 - if self == other: return 0 - return id(self)-id(other) + def __lt__ (self, other): + if type(other) != type(self): return id(self) < id(other) + if self.port_no != other.port_no: + return self.port_no < other.port_no + return id(self) < id(other) + + def __gt__ (self, other): + if type(other) != type(self): return id(self) > id(other) + if self.port_no != other.port_no: + return self.port_no > other.port_no + return id(self) > id(other) def __hash__(self, *args, **kwargs): return hash(self.port_no) ^ hash(self.hw_addr) ^ \ @@ -1009,7 +1014,7 @@ def from_packet (cls, packet, in_port = None, spec_frags = False): def clone (self): n = ofp_match() - for k,v in ofp_match_data.iteritems(): + for k,v in ofp_match_data.items(): setattr(n, '_' + k, getattr(self, '_' + k)) n.wildcards = self.wildcards return n @@ -1034,14 +1039,14 @@ def flip (self, in_port = True): def __init__ (self, **kw): self._locked = False - for k,v in ofp_match_data.iteritems(): + for k,v in ofp_match_data.items(): setattr(self, '_' + k, v[0]) self.wildcards = self._normalize_wildcards(OFPFW_ALL) # This is basically initHelper(), but tweaked slightly since this # class does some magic of its own. - for k,v in kw.iteritems(): + for k,v in kw.items(): if not hasattr(self, '_'+k): raise TypeError(self.__class__.__name__ + " constructor got " + "unexpected keyword argument '" + k + "'") @@ -1164,7 +1169,7 @@ def _prereq_warning (self): msg = "Fields ignored due to unspecified prerequisites: " wcs = [] - for name in ofp_match_data.keys(): + for name in list(ofp_match_data.keys()): if getattr(self,name) is None: continue if getattr(om,name) is not None: continue wcs.append(name) @@ -1216,7 +1221,7 @@ def check_tp(val): def fix (addr): if addr is None: return 0 if type(addr) is int: return addr & 0xffFFffFF - if type(addr) is long: return addr & 0xffFFffFF + if type(addr) is int: return addr & 0xffFFffFF return addr.toUnsigned() packed += struct.pack("!LLHH", check_ip_or_arp(fix(self.nw_src)), @@ -1384,7 +1389,7 @@ def hash_code (self): v = getattr(self, f) if type(v) is int: h ^= v - elif type(v) is long: + elif type(v) is int: h ^= v else: h ^= hash(v) @@ -1489,7 +1494,7 @@ def safehex(n): def show_wildcards(w): parts = [ k.lower()[len("OFPFW_"):] - for (k,v) in ofp_flow_wildcards_rev_map.iteritems() + for (k,v) in ofp_flow_wildcards_rev_map.items() if v & w == v ] nw_src_bits = (w & OFPFW_NW_SRC_MASK) >> OFPFW_NW_SRC_SHIFT if nw_src_bits > 0: @@ -2178,7 +2183,7 @@ def unpack (self, raw, offset=0): offset,(self.capabilities, self.actions) = _unpack("!LL", raw, offset) portCount = (length - 32) // len(ofp_phy_port) self.ports = [] - for i in xrange(0, portCount): + for i in range(0, portCount): p = ofp_phy_port() offset = p.unpack(raw, offset) self.ports.append(p) @@ -2821,11 +2826,11 @@ def pack (self): assert self._assert() packed = b"" - packed += self.mfr_desc.ljust(DESC_STR_LEN,'\0') - packed += self.hw_desc.ljust(DESC_STR_LEN,'\0') - packed += self.sw_desc.ljust(DESC_STR_LEN,'\0') - packed += self.serial_num.ljust(SERIAL_NUM_LEN,'\0') - packed += self.dp_desc.ljust(DESC_STR_LEN,'\0') + packed += self.mfr_desc.ljust(DESC_STR_LEN,'\0').encode('latin-1') + packed += self.hw_desc.ljust(DESC_STR_LEN,'\0').encode('latin-1') + packed += self.sw_desc.ljust(DESC_STR_LEN,'\0').encode('latin-1') + packed += self.serial_num.ljust(SERIAL_NUM_LEN,'\0').encode('latin-1') + packed += self.dp_desc.ljust(DESC_STR_LEN,'\0').encode('latin-1') return packed def unpack (self, raw, offset, avail): @@ -3786,7 +3791,7 @@ def data (self): def data (self, data): assert assert_type("data", data, (packet_base, bytes)) if data is None: - self._data = '' + self._data = b'' elif isinstance(data, packet_base): self._data = data.pack() else: @@ -4386,7 +4391,7 @@ def _unpack_actions (b, length, offset=0): def _init (): def formatMap (name, m): o = name + " = {\n" - vk = sorted([(v,k) for k,v in m.iteritems()]) + vk = sorted([(v,k) for k,v in m.items()]) maxlen = 2 + len(reduce(lambda a,b: a if len(a)>len(b) else b, (v for k,v in vk))) fstr = " %-" + str(maxlen) + "s : %s,\n" @@ -4411,13 +4416,13 @@ def formatMap (name, m): return """ maps = [] - for k,v in globals().iteritems(): + for k,v in globals().items(): if (k.startswith("ofp_") and k.endswith("_rev_map") and type(v) == dict): maps.append((k[:-8],v)) for name,m in maps: # Try to generate forward maps - forward = dict(((v,k) for k,v in m.iteritems())) + forward = dict(((v,k) for k,v in m.items())) if len(forward) == len(m): if name + "_map" not in globals(): globals()[name + "_map"] = forward @@ -4425,7 +4430,7 @@ def formatMap (name, m): print(name + "_rev_map is not a map") # Try to generate lists - v = m.values() + v = list(m.values()) v.sort() if v[-1] != len(v)-1: # Allow ones where the last value is a special value (e.g., VENDOR) @@ -4434,7 +4439,7 @@ def formatMap (name, m): globals()[name] = v # Generate gobals - for k,v in m.iteritems(): + for k,v in m.items(): globals()[k] = v diff --git a/pox/openflow/nicira.py b/pox/openflow/nicira.py index 0183b57b7..1e7313d6c 100644 --- a/pox/openflow/nicira.py +++ b/pox/openflow/nicira.py @@ -396,7 +396,7 @@ def pack (self): self.flags, match_len) packed += _PAD6 packed += match - packed += _PAD * ((match_len + 7)/8*8 - match_len) + packed += _PAD * ((match_len + 7)//8*8 - match_len) for i in self.actions: packed += i.pack() @@ -598,7 +598,7 @@ def _pack_body (self): dst = self.dst if dst is None: - dst = "\x00\x00\x00\x00" + dst = b'\x00\x00\x00\x00' assert self.nbits is None assert self.offset == 0 ofs_nbits = 0 @@ -653,7 +653,7 @@ def _unpack_body (self, raw, offset, avail): self.offset = ofs_nbits >> 6 self.nbits = (ofs_nbits & 0x3f) + 1 - if dst == "\x00\x00\x00\x00": + if dst == b'\x00\x00\x00\x00': self.dst = None self.nbits = None self.offset = 0 @@ -991,7 +991,7 @@ class nx_action_mpls_label (of.ofp_action_vendor_base): def _init (self, kw): self.vendor = NX_VENDOR_ID self.subtype = NXAST_SET_MPLS_LABEL - self.label = None # Force setting + self.label = None # Force setting TODO check if ok (cannot be packed) def _eq (self, other): if self.subtype != other.subtype: return False @@ -1349,7 +1349,7 @@ def _pack_body (self): for fs in self.spec: p += fs.pack() if len(p) % 8: - p += '\x00' * (8-(len(p)%8)) + p += b'\x00' * (8-(len(p)%8)) return p def _unpack_body (self, raw, offset, avail): @@ -1634,7 +1634,7 @@ def new (cls, src=None, dst=None, **kw): dst_inst = None n_bits = None - for k,v in kw.iteritems(): + for k,v in kw.items(): # This is handy, though there's potentially future ambiguity s = globals().get('nx_learn_' + k) if not s: @@ -1757,7 +1757,7 @@ class _nxm_tcp_flags (_nxm_numeric): """ def _pack_mask (self, v): assert self._nxm_length == 2 - assert isinstance(v, (int, long)) + assert isinstance(v, int) if (v & 0xf000) != 0: raise RuntimeError("Top bits of TCP flags mask must be 0") return struct.pack("!H", v) @@ -1784,7 +1784,7 @@ def value (self, value): self.mask = value[1] #if isinstance(mask, (int,long)): # self.mask = mask - elif isinstance(value, basestring) and len(value)>4 and '/' in value: + elif isinstance(value, str) and len(value)>4 and '/' in value: temp = parse_cidr(value, infer=False) ip = temp[0] self.mask = 32 if temp[1] is None else temp[1] @@ -1798,7 +1798,7 @@ def _pack_value (self, v): def _unpack_value (self, v): return IPAddr(v, networkOrder=True) def _pack_mask (self, v): - if isinstance(v, (int, long)): + if isinstance(v, int): # Assume CIDR if v > 32: v = 32 elif v < 0: v = 0 @@ -1831,7 +1831,7 @@ def value (self, value): assert len(value) == 2 ip = value[0] self.mask = value[1] - elif isinstance(value, (unicode,str)): + elif isinstance(value, str): ip,mask = IPAddr6.parse_cidr(value, allow_host = True) #self.mask = 128 if mask is None else mask self.mask = mask @@ -1845,7 +1845,7 @@ def _pack_value (self, v): def _unpack_value (self, v): return IPAddr6(v, raw=True) def _pack_mask (self, v): - if isinstance(v, (int,long)): + if isinstance(v, int): # Assume CIDR if v > 128: v = 128 elif v < 0: v = 0 @@ -1917,8 +1917,8 @@ def unpack_body (raw, offset, t, has_mask, length): mask = None if has_mask: assert not (length & 1), "Odd length with mask" - mask = data[length/2:] - data = data[:length/2] + mask = data[int(length/2):] + data = data[:int(length/2)] #NOTE: Should use _class_for_nxm_header? c = _nxm_type_to_class.get(t) @@ -2025,18 +2025,18 @@ def pack (self, omittable = False, header_only = False): if mask is not None: assert len(mask) == self._nxm_length, "mask is wrong length" - if (mask.count("\x00") == self._nxm_length) and omittable: + if (mask.count(b'\x00') == self._nxm_length) and omittable: return b'' - if (mask.count("\xff") == self._nxm_length): + if (mask.count(b'\xff') == self._nxm_length): mask = None if mask is None and self._force_mask: - mask = "\xff" * self._nxm_length + mask = b'\xff' * self._nxm_length if mask is not None: h |= (1 << 8) - h |= (self._nxm_length * 2) + h |= int(self._nxm_length * 2) else: h |= self._nxm_length @@ -2049,7 +2049,7 @@ def pack (self, omittable = False, header_only = False): r += value if mask is not None: - assert 0 == sum(ord(v)&(0xff&~ord(m)) for v,m in zip(value,mask)), \ + assert 0 == sum(v&(0xff&~m) for v,m in zip(value,mask)), \ "nonzero masked bits" r += mask @@ -2058,7 +2058,7 @@ def pack (self, omittable = False, header_only = False): def __str__ (self): r = self.__class__.__name__ + "(" + str(self.value) if self.mask is not None: - if self.mask.raw != ("\xff" * self._nxm_length): + if self.mask.raw != (b'\xff' * self._nxm_length): r += "/" + str(self.mask) #if self.is_reg: r += "[r]" return r + ")" @@ -2091,10 +2091,10 @@ def allow_mask (self): def __str__ (self): r = "NXM_%08x_%i" % (self.nxm_vendor, self.nxm_field) r += "(" - r += "".join("%02x" % (ord(x),) for x in self.value) + r += "".join("%02x" % (x,) for x in self.value) #+ repr(self.value) if self.mask is not None: - if self.mask != ("\xff" * self._nxm_length): + if self.mask != (b'\xff' * self._nxm_length): r += "/" + repr(self.mask) return r + ")" @@ -2141,8 +2141,8 @@ def _make_nxm (__name, __vendor, __field, __len = None, type = None, t = _make_type(__vendor, __field) kw['_nxm_type'] = t if __len is not None: kw['_nxm_length'] = __len - import __builtin__ - typ = __builtin__.type + import builtins + typ = builtins.type c = typ(__name, tuple(type), kw) _nxm_type_to_class[t] = c _nxm_name_to_type[__name] = t @@ -2429,7 +2429,7 @@ def pack (self): match_len) packed += _PAD6 packed += match.pack() - packed += _PAD * ((match_len + 7)/8*8 - match_len) + packed += _PAD * ((match_len + 7)//8*8 - match_len) packed += _PAD2 packed += self.packed_data return packed @@ -2573,7 +2573,7 @@ def unpack (self, raw, offset, avail): return offset def pack (self, omittable = False): - return ''.join(x.pack(omittable) for x in self._parts) + return b''.join(x.pack(omittable) for x in self._parts) def __eq__ (self, other): if not isinstance(other, self.__class__): return False @@ -2799,7 +2799,7 @@ def _unpack_nx_vendor (raw, offset): nrr = nx_role_reply() return nrr.unpack(raw, offset)[0], nrr else: - print "NO UNPACKER FOR",subtype + print("NO UNPACKER FOR",subtype) return _old_unpacker(raw, offset) diff --git a/pox/openflow/of_01.py b/pox/openflow/of_01.py index 1b0b7dc59..e8d33e971 100644 --- a/pox/openflow/of_01.py +++ b/pox/openflow/of_01.py @@ -462,7 +462,7 @@ def run (self): while core.running: with self._lock: - cons = self._dataForConnection.keys() + cons = list(self._dataForConnection.keys()) rlist, wlist, elist = select.select([self._waker], cons, cons, 5) if not core.running: break @@ -488,7 +488,8 @@ def run (self): alldata[0] = data[l:] break del alldata[0] - except socket.error as (errno, strerror): + except socket.error as xxx_todo_changeme: + (errno, strerror) = xxx_todo_changeme.args if errno != EAGAIN: con.msg("DeferredSender/Socket error: " + strerror) con.disconnect() @@ -560,11 +561,11 @@ def _recv_out (self, buf): self._rbuf += buf l = len(self._rbuf) while l > 4: - if ord(self._rbuf[0]) != of.OFP_VERSION: + if self._rbuf[0] != of.OFP_VERSION: log.error("Bad OpenFlow version while trying to capture trace") self._enabled = False break - packet_length = ord(self._rbuf[2]) << 8 | ord(self._rbuf[3]) + packet_length = self._rbuf[2] << 8 | self._rbuf[3] if packet_length > l: break try: self._writer.write(False, self._rbuf[:packet_length]) @@ -579,11 +580,11 @@ def _send_out (self, buf, r): self._sbuf += buf l = len(self._sbuf) while l > 4: - if ord(self._sbuf[0]) != of.OFP_VERSION: + if self._sbuf[0] != of.OFP_VERSION: log.error("Bad OpenFlow version while trying to capture trace") self._enabled = False break - packet_length = ord(self._sbuf[2]) << 8 | ord(self._sbuf[3]) + packet_length = self._sbuf[2] << 8 | self._sbuf[3] if packet_length > l: break try: self._writer.write(True, self._sbuf[:packet_length]) @@ -642,10 +643,10 @@ def __str__ (self): return "" % (", ".join(l),) def __len__ (self): - return len(self.keys()) + return len(list(self.keys())) def __getitem__ (self, index): - if isinstance(index, (int,long)): + if isinstance(index, int): for p in self._ports: if p.port_no == index: return p @@ -674,10 +675,10 @@ def keys (self): return list(k) def __iter__ (self): - return iter(self.keys()) + return iter(list(self.keys())) def iterkeys (self): - return iter(self.keys()) + return iter(list(self.keys())) def __contains__ (self, index): try: @@ -688,17 +689,17 @@ def __contains__ (self, index): return False def values (self): - return [self[k] for k in self.keys()] + return [self[k] for k in list(self.keys())] def items (self): - return [(k,self[k]) for k in self.keys()] + return [(k,self[k]) for k in list(self.keys())] def iterkeys (self): - return iter(self.keys()) + return iter(list(self.keys())) def itervalues (self): - return iter(self.values()) + return iter(list(self.values())) def iteritems (self): - return iter(self.items()) + return iter(list(self.items())) def has_key (self, k): return k in self def get (self, k, default=None): @@ -884,7 +885,8 @@ def send (self, data): self.msg("Didn't send complete buffer.") data = data[l:] deferredSender.send(self, data) - except socket.error as (errno, strerror): + except socket.error as xxx_todo_changeme1: + (errno, strerror) = xxx_todo_changeme1.args if errno == EAGAIN: self.msg("Out of send buffer space. " + "Consider increasing SO_SNDBUF.") @@ -916,18 +918,18 @@ def read (self): # (using ord) to find the version/length/type so that we can # correctly call libopenflow to unpack it. - ofp_type = ord(self.buf[offset+1]) + ofp_type = self.buf[offset+1] - if ord(self.buf[offset]) != of.OFP_VERSION: + if self.buf[offset] != of.OFP_VERSION: if ofp_type == of.OFPT_HELLO: # We let this through and hope the other side switches down. pass else: log.warning("Bad OpenFlow version (0x%02x) on connection %s" - % (ord(self.buf[offset]), self)) + % (self.buf[offset], self)) return False # Throw connection away - msg_length = ord(self.buf[offset+2]) << 8 | ord(self.buf[offset+3]) + msg_length = self.buf[offset+2] << 8 | self.buf[offset+3] if buf_len - offset < msg_length: break @@ -996,7 +998,7 @@ def __str__ (self): def wrap_socket (new_sock): fname = datetime.datetime.now().strftime("%Y-%m-%d-%I%M%p") fname += "_" + new_sock.getpeername()[0].replace(".", "_") - fname += "_" + `new_sock.getpeername()[1]` + ".pcap" + fname += "_" + repr(new_sock.getpeername()[1]) + ".pcap" pcapfile = file(fname, "w") try: new_sock = OFCaptureSocket(new_sock, pcapfile, @@ -1057,7 +1059,8 @@ def run (self): listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: listener.bind((self.address, self.port)) - except socket.error as (errno, strerror): + except socket.error as xxx_todo_changeme2: + (errno, strerror) = xxx_todo_changeme2.args log.error("Error %i while binding %s:%s: %s", errno, self.address, self.port, strerror) if errno == EADDRNOTAVAIL: diff --git a/pox/openflow/of_json.py b/pox/openflow/of_json.py index b21365ea2..ac900c362 100644 --- a/pox/openflow/of_json.py +++ b/pox/openflow/of_json.py @@ -23,7 +23,7 @@ import pox.openflow.libopenflow_01 as of def _fix_of_int (n): - if isinstance(n, basestring): + if isinstance(n, str): return getattr(of, n, None) return n @@ -33,7 +33,7 @@ def _fix_of_int (n): from pox.lib.addresses import EthAddr, IPAddr def _fix_ethertype (n): - if isinstance(n, basestring): + if isinstance(n, str): try: if n.startswith("802.3/"): n = n.split("/",1)[1] @@ -47,7 +47,7 @@ def _fix_ethertype (n): return n def _fix_proto (n): - if isinstance(n, basestring): + if isinstance(n, str): if not n.endswith("_PROTOCOL"): n += "_PROTOCOL" return getattr(ipv4, n) @@ -66,7 +66,7 @@ def _fix_ip (n): import socket def _fix_port (n): - if isinstance(n, basestring): + if isinstance(n, str): return socket.getservbyname(n) return n @@ -106,7 +106,7 @@ def _unfix_ethertype (v): # want to just use a number. return ethtype_to_str(v) -_unfix_map = {k:_unfix_null for k in of.ofp_match_data.keys()} +_unfix_map = {k:_unfix_null for k in list(of.ofp_match_data.keys())} _unfix_map['in_port'] = _unfix_port _unfix_map['dl_src'] = _unfix_str _unfix_map['dl_dst'] = _unfix_str @@ -117,7 +117,7 @@ def _unfix_ethertype (v): def match_to_dict (m): d = {} #TODO: Use symbolic names - for k,func in _unfix_map.iteritems(): + for k,func in _unfix_map.items(): v = getattr(m, k) if v is None: continue if k.startswith('get_'): k = k[4:] @@ -130,7 +130,7 @@ def match_to_dict (m): def action_to_dict (a): d = {} d['type'] = of.ofp_action_type_map.get(a.type, a.type) - for k,v in fields_of(a).iteritems(): + for k,v in fields_of(a).items(): if k in ['type','length']: continue if k == "port": v = of.ofp_port_map.get(v,v) @@ -160,7 +160,7 @@ def flow_stats_to_list (flowstats): for stat in flowstats: s = {} stats.append(s) - for k,v in fields_of(stat).iteritems(): + for k,v in fields_of(stat).items(): if k == 'length': continue if k.startswith('pad'): continue if k == 'match': v = match_to_dict(v) @@ -218,7 +218,7 @@ def _init (): def dict_to_packet (d, parent=None): if isinstance(d, list): d = b''.join(chr(x) for x in data) - if isinstance(d, basestring): + if isinstance(d, str): return d payload = d.get('payload') @@ -229,7 +229,7 @@ def dict_to_packet (d, parent=None): example = cls() del d['class'] - for k,v in d.iteritems(): + for k,v in d.items(): assert not k.startswith('_') assert hasattr(example, k) assert k not in ['prev','next','raw','parsed'] @@ -250,7 +250,7 @@ def fix_parsed (m): """ if m is None: return {"type":"raw","data":[]} - if isinstance(m, basestring): + if isinstance(m, str): return {"type":"raw","data":[ord(b) for b in m]} assert isinstance(m, packet_base) if not m.parsed: @@ -258,7 +258,7 @@ def fix_parsed (m): u['unparsed_type'] = m.__class__.__name__ return u r = {} - for k,v in fields_of(m, primitives_only = False).iteritems(): + for k,v in fields_of(m, primitives_only = False).items(): if is_scalar(v): r[k] = v elif isinstance(v, (IPAddr, EthAddr)): @@ -303,17 +303,17 @@ def list_switches (ofnexus = None): ofnexus = core.openflow r = [] - for dpid,con in ofnexus._connections.iteritems(): + for dpid,con in ofnexus._connections.items(): ports = [] - for p in con.ports.values(): + for p in list(con.ports.values()): pdict = { 'port_no':p.port_no, 'hw_addr':str(p.hw_addr), 'name':p.name} - for bit,name in of.ofp_port_config_map.items(): + for bit,name in list(of.ofp_port_config_map.items()): if p.config & bit: pdict[name.split('OFPPC_', 1)[-1].lower()] = True - for bit,name in of.ofp_port_state_map.items(): + for bit,name in list(of.ofp_port_state_map.items()): if p.state & bit: pdict[name.split('OFPPS_', 1)[-1].lower()] = True ports.append(pdict) diff --git a/pox/openflow/spanning_forest.py b/pox/openflow/spanning_forest.py index 633847926..d066cabc8 100644 --- a/pox/openflow/spanning_forest.py +++ b/pox/openflow/spanning_forest.py @@ -102,7 +102,7 @@ def _handle_ConnectionUp (self, e): self._sync_port_data() def _handle_ConnectionDown (self, e): - for p in self.ports.values(): + for p in list(self.ports.values()): p.up = False def _handle_PortStatus (self, e): @@ -128,7 +128,7 @@ def _sync_port_data (self): old_ports = self.ports self.ports = {} if not con: return - for p in con.ports.itervalues(): + for p in con.ports.values(): if p.port_no >= of.OFPP_MAX: continue if p.port_no in old_ports: self.ports[p.port_no] = old_ports[p.port_no] @@ -145,7 +145,7 @@ def _compute (self): # Get port->link links = {l.port(self.dpid):l for l in self.master.topo.iterlinks(self.dpid)} - for p in con.ports.itervalues(): + for p in con.ports.values(): if p.port_no >= of.OFPP_MAX: continue p = self.ports[p.port_no] fld = False @@ -185,7 +185,7 @@ def _realize (self): if con is None: return data = [] - for port_no,cfg in self._port_out.items(): + for port_no,cfg in list(self._port_out.items()): if port_no not in self.ports: continue if port_no not in con.ports: continue p = con.ports[port_no] @@ -345,10 +345,10 @@ def iterlinks (self, sw=None): Iterate links, optionally only those on a given switch """ if sw is None: - return self.links.itervalues() + return iter(self.links.values()) if sw not in self.switches: return () - return self.switches[sw].itervalues() + return iter(self.switches[sw].values()) @@ -367,7 +367,7 @@ def _all_dependencies_met (self): def _handle_timer (self): self.t = Timer(1, self._handle_timer) - for sw in self.switches.itervalues(): + for sw in self.switches.values(): sw._handle_timer() def _handle_openflow_PortStatus (self, e): @@ -427,7 +427,7 @@ def _compute_nx (self): for u,v,d in tree.edges(data=True): self.topo.add_to_tree(d['data']) - for sw in self.switches.itervalues(): + for sw in self.switches.values(): sw._compute() def _compute_stable (self): @@ -470,7 +470,7 @@ def add_links (links): prev = getattr(self, "_prev", []) self._prev = used if stable: - for i in xrange(len(prev)-1, -1, -1): + for i in range(len(prev)-1, -1, -1): l = prev[i] if l.link in links: del links[l.link] @@ -483,7 +483,7 @@ def add_links (links): else: self.log.debug("Computing spanning forest. Links:%s", len(links)) - links = links.values() + links = list(links.values()) links.sort(key=lambda l:l.link) if randomize: @@ -501,13 +501,13 @@ def add_links (links): # print sorted([hex(n)[2:] for n in x]) self.log.debug("Spanning forest computed. Components:%s Links:%s", - len(set(id(x) for x in reachable.itervalues())),len(used)) + len(set(id(x) for x in reachable.values())),len(used)) self.topo.clear_tree() for l in used: self.topo.add_to_tree(l) - for sw in self.switches.itervalues(): + for sw in self.switches.values(): sw._compute() diff --git a/pox/openflow/spanning_tree.py b/pox/openflow/spanning_tree.py index 3e7910907..943be8eb5 100644 --- a/pox/openflow/spanning_tree.py +++ b/pox/openflow/spanning_tree.py @@ -99,7 +99,7 @@ def flip (link): v = q.pop(False) if v in done: continue done.add(v) - for w,p in adj[v].iteritems(): + for w,p in adj[v].items(): if w in tree: continue more.add(w) tree[v].add((w,p)) @@ -107,7 +107,7 @@ def flip (link): if False: log.debug("*** SPANNING TREE ***") - for sw,ports in tree.iteritems(): + for sw,ports in tree.items(): #print " ", dpidToStr(sw), ":", sorted(list(ports)) #print " ", sw, ":", [l[0] for l in sorted(list(ports))] log.debug((" %i : " % sw) + " ".join([str(l[0]) for l in @@ -138,7 +138,7 @@ def _handle_ConnectionUp (event): if _noflood_by_default: con = event.connection log.debug("Disabling flooding for %i ports", len(con.ports)) - for p in con.ports.itervalues(): + for p in con.ports.values(): if p.port_no >= of.OFPP_MAX: continue _prev[con.dpid][p.port_no] = False pm = of.ofp_port_mod(port_no=p.port_no, @@ -186,7 +186,7 @@ def _update_tree (force_dpid = None): # Now modify ports as needed try: change_count = 0 - for sw, ports in tree.iteritems(): + for sw, ports in tree.items(): con = core.openflow.getConnection(sw) if con is None: continue # Must have disconnected if con.connect_time is None: continue # Not fully connected @@ -201,7 +201,7 @@ def _update_tree (force_dpid = None): continue tree_ports = [p[1] for p in ports] - for p in con.ports.itervalues(): + for p in con.ports.values(): if p.port_no < of.OFPP_MAX: flood = p.port_no in tree_ports if not flood: diff --git a/pox/openflow/topology.py b/pox/openflow/topology.py index a35bf2963..f36e521b2 100644 --- a/pox/openflow/topology.py +++ b/pox/openflow/topology.py @@ -25,7 +25,7 @@ import itertools from pox.lib.revent import * -import libopenflow_01 as of +from . import libopenflow_01 as of from pox.openflow import * from pox.core import core from pox.topology.topology import * @@ -260,7 +260,7 @@ def _handle_con_FlowRemoved (self, event): event.halt = False def findPortForEntity (self, entity): - for p in self.ports.itervalues(): + for p in self.ports.values(): if entity in p: return p return None @@ -381,15 +381,13 @@ def _sync_pending (self, clear=False): if clear: self._pending_barrier_to_ops = {} self._pending_op_to_barrier = {} - self._pending = filter(lambda(op): op[0] == OFSyncFlowTable.ADD, - self._pending) + self._pending = [op for op in self._pending if op[0] == OFSyncFlowTable.ADD] self.switch.send(of.ofp_flow_mod(command=of.OFPFC_DELETE, match=of.ofp_match())) self.switch.send(of.ofp_barrier_request()) - todo = map(lambda(e): (OFSyncFlowTable.ADD, e), - self.flow_table.entries) + self._pending + todo = [(OFSyncFlowTable.ADD, e) for e in self.flow_table.entries] + self._pending else: todo = [op for op in self._pending if op not in self._pending_op_to_barrier diff --git a/pox/proto/arp_helper.py b/pox/proto/arp_helper.py index d29f578cc..bb3d19a26 100644 --- a/pox/proto/arp_helper.py +++ b/pox/proto/arp_helper.py @@ -97,7 +97,7 @@ def send_arp_request (connection, ip, port = of.OFPP_FLOOD, src_mac = connection.eth_addr elif src_mac is True: if port in (of.OFPP_FLOOD, of.OFPP_ALL): - for p in connection.ports.values(): + for p in list(connection.ports.values()): if p.config & OFPPC_NO_FLOOD: if port == of.ofPP_FLOOD: continue diff --git a/pox/proto/arp_responder.py b/pox/proto/arp_responder.py index e8aa873d5..cc7716631 100644 --- a/pox/proto/arp_responder.py +++ b/pox/proto/arp_responder.py @@ -87,7 +87,7 @@ def is_expired (self): class ARPTable (dict): def __repr__ (self): o = [] - for k,e in self.iteritems(): + for k,e in self.items(): t = int(e.timeout - time.time()) if t < 0: t = "X" @@ -98,7 +98,7 @@ def __repr__ (self): if mac is True: mac = "" o.append((k,"%-17s %-20s %3s" % (k, mac, t))) - for k,t in _failed_queries.iteritems(): + for k,t in _failed_queries.items(): if k not in self: t = int(time.time() - t) o.append((k,"%-17s %-20s %3ss ago" % (k, '?', t))) @@ -127,10 +127,10 @@ def set (self, key, value=True, static=True): def _handle_expiration (): - for k,e in _arp_table.items(): + for k,e in list(_arp_table.items()): if e.is_expired: del _arp_table[k] - for k,t in _failed_queries.items(): + for k,t in list(_failed_queries.items()): if time.time() - t > ARP_TIMEOUT: del _failed_queries[k] @@ -288,6 +288,6 @@ def launch (timeout=ARP_TIMEOUT, no_flow=False, eat_packets=True, _learn = not no_learn core.Interactive.variables['arp'] = _arp_table - for k,v in kw.iteritems(): + for k,v in kw.items(): _arp_table[IPAddr(k)] = Entry(v, static=True) core.registerNew(ARPResponder) diff --git a/pox/proto/arp_table.py b/pox/proto/arp_table.py index 25340bbf8..8b3c1d106 100644 --- a/pox/proto/arp_table.py +++ b/pox/proto/arp_table.py @@ -94,7 +94,7 @@ def add_entry (self, ip, mac=None): if len(self.by_ip) >= self.MAX_ENTRIES: # Sloppy, but simple. # Get ones with lowest age - entries = sorted(self.by_ip.values(), key = lambda entry: entry.age) + entries = sorted(list(self.by_ip.values()), key = lambda entry: entry.age) del entries[self.MAX_ENTRIES:] self.by_ip = {e.mac:e for e in entries} new_entry = ARPEntry(ip=ip, mac=mac) diff --git a/pox/proto/dhcpd.py b/pox/proto/dhcpd.py index 4f9d0669e..62a31ddcc 100644 --- a/pox/proto/dhcpd.py +++ b/pox/proto/dhcpd.py @@ -242,7 +242,7 @@ def fix_addr (addr, backup): self.dpid = None else: try: - dpid = long(dpid) + dpid = int(dpid) except: dpid = util.str_to_dpid(dpid) self.dpid = dpid @@ -597,8 +597,8 @@ def fix (i): if i.lower() == "true": return None if i == '()': return () return i - first,last,count = map(fixint,(first,last,count)) - router,dns = map(fix,(router,dns)) + first,last,count = list(map(fixint,(first,last,count))) + router,dns = list(map(fix,(router,dns))) if ports is not None: ports = ports.split(",") diff --git a/pox/proto/dns_spy.py b/pox/proto/dns_spy.py index 3e5e6c5af..5846993c1 100644 --- a/pox/proto/dns_spy.py +++ b/pox/proto/dns_spy.py @@ -43,7 +43,7 @@ def __init__ (self, rr): self.qtype = rr.qtype self.rr = rr - for t in pkt_dns.rrtype_to_str.values(): + for t in list(pkt_dns.rrtype_to_str.values()): setattr(self, t, False) t = pkt_dns.rrtype_to_str.get(rr.qtype) if t is not None: diff --git a/pox/proto/rip/linux_rip.py b/pox/proto/rip/linux_rip.py index 170c5bc41..20c05227d 100755 --- a/pox/proto/rip/linux_rip.py +++ b/pox/proto/rip/linux_rip.py @@ -32,7 +32,7 @@ from pox.lib.recoco import Timer, Task, RecvFrom, Recv, Select import socket import subprocess -from rip_core import * +from .rip_core import * DEFAULT_TABLENO = 1 @@ -139,7 +139,7 @@ def create_sock (iface, addr): def run (self): while True: - rr,ww,oo = yield Select(self.sock_to_iface.keys(), [], []) + rr,ww,oo = yield Select(list(self.sock_to_iface.keys()), [], []) for r in rr: #data,addr = yield RecvFrom(sock, 65535) data,addr = r.recvfrom(65535) @@ -212,7 +212,7 @@ def get_int (e, f): if k not in self.table: remove.add(k) - for e in self.table.values(): + for e in list(self.table.values()): if e.local: continue if e.key not in cur: add.append(e) @@ -251,7 +251,7 @@ def get_int (e, f): def send_updates (self, force): direct = self._get_port_ip_map() - for sock,iface in self.sock_to_iface.items(): + for sock,iface in list(self.sock_to_iface.items()): dests = direct.get(iface) responses = self.get_responses(dests, force=force) self.log.debug("Sending %s RIP packets via %s", len(responses), iface) diff --git a/pox/proto/rip/ovs_rip.py b/pox/proto/rip/ovs_rip.py index b7306b94a..1876b099c 100755 --- a/pox/proto/rip/ovs_rip.py +++ b/pox/proto/rip/ovs_rip.py @@ -67,7 +67,7 @@ import pox.lib.packet as pkt from pox.lib.recoco import Timer, Task import socket -from rip_core import * +from .rip_core import * from pox.proto.arp_helper import send_arp_reply from pox.proto.arp_table import ARPTable from pox.lib.util import dpid_to_str @@ -136,7 +136,7 @@ def __init__ (self): @property def any_ip (self): - return iter(self.ips).next() + return next(iter(self.ips)) @@ -221,7 +221,7 @@ def _refresh_ports (self): if not self._conn: return # Nothing to do now ports = {} self._ports = ports - for name,ip_prefix_pairs in self._port_cache.items(): + for name,ip_prefix_pairs in list(self._port_cache.items()): if name not in self._conn.ports: continue ofport = self._conn.ports[name] if ofport.port_no not in ports: @@ -246,7 +246,7 @@ def _refresh_ports (self): @property def all_ips (self): all_ips = set() - for portobj in self._ports.itervalues(): + for portobj in self._ports.values(): all_ips.update(portobj.ips) return all_ips @@ -301,7 +301,7 @@ def _init_ingress_table (self): fm.match.dl_type = pkt.ethernet.ARP_TYPE fm.match.nw_proto = pkt.arp.REQUEST fm.actions.append(of.ofp_action_output(port = of.OFPP_CONTROLLER)) - for portno,portobj in self._ports.iteritems(): + for portno,portobj in self._ports.items(): if portno not in self._conn.ports: continue fm.match.in_port = portno for ip in portobj.ips: @@ -315,7 +315,7 @@ def _init_ingress_table (self): fm.match.dl_type = pkt.ethernet.ARP_TYPE fm.match.nw_proto = pkt.arp.REPLY fm.actions.append(of.ofp_action_output(port = of.OFPP_CONTROLLER)) - for portno,portobj in self._ports.iteritems(): + for portno,portobj in self._ports.items(): if portno not in self._conn.ports: continue fm.match.in_port = portno fm.match.dl_dst = self._conn.ports[portno].hw_addr @@ -330,7 +330,7 @@ def _init_ingress_table (self): fm.match.tp_src = pkt.ICMP.TYPE_ECHO_REQUEST # Type fm.match.tp_dst = 0 # Code fm.actions.append(of.ofp_action_output(port = of.OFPP_CONTROLLER)) - for portno,portobj in self._ports.iteritems(): + for portno,portobj in self._ports.items(): if portno not in self._conn.ports: continue fm.match.in_port = portno fm.match.dl_dst = self._conn.ports[portno].hw_addr @@ -626,7 +626,7 @@ def send_updates (self, force): out = [] - for port,dests in direct.items(): + for port,dests in list(direct.items()): if port not in conn.ports: self.log.warn("No such port %s", port) continue @@ -677,7 +677,7 @@ def sync_table (self): self._cur = {RIP_NET_TABLE:{}, RIP_PORT_TABLE:{}} cur = self._cur - for e in self.table.values(): + for e in list(self.table.values()): if e.metric >= INFINITY: continue fm = ovs.ofp_flow_mod_table_id() fm.xid = 0 @@ -698,7 +698,7 @@ def sync_table (self): fm.actions.append(ovs.nx_action_resubmit.resubmit_table(RIP_PORT_TABLE)) cur[RIP_NET_TABLE][(e.ip, e.size)] = fm - for e in self.table.values(): + for e in list(self.table.values()): if e.metric >= INFINITY: continue fm = ovs.ofp_flow_mod_table_id() fm.xid = 0 @@ -724,8 +724,8 @@ def sync_table (self): cur[RIP_PORT_TABLE][(e.ip, e.size)] = fm if self._conn: - data1 = b''.join(x.pack() for x in self._cur[RIP_PORT_TABLE].itervalues()) - data2 = b''.join(x.pack() for x in self._cur[RIP_NET_TABLE].itervalues()) + data1 = b''.join(x.pack() for x in self._cur[RIP_PORT_TABLE].values()) + data2 = b''.join(x.pack() for x in self._cur[RIP_NET_TABLE].values()) data = data1 + data2 if data == self._prev: return # Nothing changed @@ -758,12 +758,12 @@ def get (self, dpid): def static (dpid, __INSTANCE__=None, **kw): try: - dpid = long(dpid) + dpid = int(dpid) except: dpid = util.str_to_dpid(dpid) r = core.OVSRIPRouters.get(dpid=dpid) - for prefix,rest in kw.items(): + for prefix,rest in list(kw.items()): prefix = IPAddr.parse_cidr(prefix) rest = rest.split(",") next_hop = IPAddr(rest[0]) @@ -786,7 +786,7 @@ def launch (dpid, __INSTANCE__=None, **kw): pox.openflow.nicira.launch(convert_packet_in=True) try: - dpid = long(dpid) + dpid = int(dpid) except: dpid = util.str_to_dpid(dpid) @@ -794,7 +794,7 @@ def launch (dpid, __INSTANCE__=None, **kw): core.OVSRIPRouters.add(r) # Directly attached networks - for iface,routes in kw.items(): + for iface,routes in list(kw.items()): # Try to parse iface as a port number; else a name try: iface = int(iface) diff --git a/pox/proto/rip/rip_core.py b/pox/proto/rip/rip_core.py index b3791eba4..5f58d31dd 100755 --- a/pox/proto/rip/rip_core.py +++ b/pox/proto/rip/rip_core.py @@ -206,7 +206,7 @@ def send_updates (self, force): def get_responses (self, dests, force, static_only=False, mtu=DEFAULT_MTU): # 3.10.2 outgoing = [] - for e in self.table.values(): + for e in list(self.table.values()): if not (e.changed or force): continue if static_only and not e.static: continue re = RIP.RIPEntry() @@ -335,7 +335,7 @@ def _mark_all_clean (self): Mark all entries as having been sent """ # Mark nothing changed - for e in self.table.values(): + for e in list(self.table.values()): e.changed = False def _get_port_ip_map (self): @@ -349,7 +349,7 @@ def _get_port_ip_map (self): for "dev" entries. """ direct = {} # iface -> set(ip) - for e in self.table.values(): + for e in list(self.table.values()): if e.dev and not e.local: if e.size != 32: continue if e.dev not in direct: diff --git a/pox/py.py b/pox/py.py index 41569a30f..42726974c 100644 --- a/pox/py.py +++ b/pox/py.py @@ -16,7 +16,7 @@ Provides a Python interpreter while running POX """ -from __future__ import print_function + from pox.core import core from pox.lib.util import str_to_bool @@ -199,7 +199,7 @@ def launch (disable = False, completion = None, history = False, if not core.hasComponent("Interactive"): Interactive() - import boot + from . import boot if not disable: boot.set_main_function(core.Interactive.interact) else: diff --git a/pox/tk.py b/pox/tk.py index f7f63fb83..140ccab4e 100644 --- a/pox/tk.py +++ b/pox/tk.py @@ -27,7 +27,7 @@ class MessageBoxer (object): def __init__ (self, tk): - import tkMessageBox, tkColorChooser, tkSimpleDialog, tkFileDialog + import tkinter.messagebox, tkinter.colorchooser, tkinter.simpledialog, tkinter.filedialog fields = "ERROR INFO QUESTION WARNING ABORTRETRYIGNORE OKCANCEL " fields += "RETRYCANCEL YESNO YESNOCANCEL ABORT RETRY IGNORE OK " fields += "CANCEL YES NO" @@ -95,13 +95,13 @@ def _dispatch_one (self, code, rv, args, kw): def f (): l = {'self':self} l.update(kw) - exec code in globals(), l + exec(code, globals(), l) r = f() if rv: core.callLater(rv, r) def run (self): - import Tkinter - root = Tkinter.Tk() + import tkinter + root = tkinter.Tk() root.bind('<>', self._dispatch) self.root = root @@ -126,7 +126,7 @@ def timer (): def launch (): - import boot + from . import boot core.registerNew(Tk) boot.set_main_function(core.tk.run) diff --git a/pox/topology/topology.py b/pox/topology/topology.py index 543f7d528..69135a01c 100644 --- a/pox/topology/topology.py +++ b/pox/topology/topology.py @@ -119,7 +119,7 @@ class Entity (object): def __init__ (self, id=None): if id: if id in Entity._all_ids: - print("".join(traceback.format_list(self._tb[id]))) + print(("".join(traceback.format_list(self._tb[id])))) raise Exception("ID %s already taken" % str(id)) else: while Entity._next_id in Entity._all_ids: @@ -233,9 +233,9 @@ def addEntity (self, entity): def getEntitiesOfType (self, t=Entity, subtypes=True): if subtypes is False: - return [x for x in self._entities.itervalues() if type(x) is t] + return [x for x in self._entities.values() if type(x) is t] else: - return [x for x in self._entities.itervalues() if isinstance(x, t)] + return [x for x in self._entities.values() if isinstance(x, t)] def addListener(self, eventType, handler, once=False, weak=False, priority=None, byName=False): @@ -279,7 +279,7 @@ def deserializeAndMerge (self, id2entity): - insert a new Entry if it didn't already exist here, or - update a pre-existing entry if it already existed """ - for entity_id in id2entity.keys(): + for entity_id in list(id2entity.keys()): pickled_entity = id2entity[entity_id].encode('ascii', 'ignore') entity = pickle.loads(pickled_entity) entity.id = entity_id.encode('ascii', 'ignore') @@ -308,7 +308,7 @@ def __str__(self): # TODO: display me graphically strings = [] strings.append("topology (%d total entities)" % len(self._entities)) - for id,entity in self._entities.iteritems(): + for id,entity in self._entities.items(): strings.append("%s %s" % (str(id), str(entity))) return '\n'.join(strings) diff --git a/pox/web/authentication.py b/pox/web/authentication.py index 9d6be978e..db0cbc22c 100644 --- a/pox/web/authentication.py +++ b/pox/web/authentication.py @@ -91,8 +91,8 @@ def _is_basic_auth_enabled (self): if bae is True: return True if bae is False: return False try: - if (self._check_basic_auth.im_func.func_code is - BasicAuthMixin._check_basic_auth.im_func.func_code): + if (self._check_basic_auth.__func__.__code__ is + BasicAuthMixin._check_basic_auth.__func__.__code__): authf = getattr(self, 'basic_auth_function', None) if authf is None: self.basic_auth_enabled = False @@ -145,7 +145,7 @@ def basic (__INSTANCE__=None, **kw): Lets you add username/password pairs to root of POX webserver """ from pox.web.webcore import SplitterRequestHandler - for k,v in kw.items(): + for k,v in list(kw.items()): SplitterRequestHandler.basic_auth_info[k] = v # Since you called this explicitly, force auth on regardless of diff --git a/pox/web/jsonrpc.py b/pox/web/jsonrpc.py index ca99dc0a4..ebe1a6c13 100644 --- a/pox/web/jsonrpc.py +++ b/pox/web/jsonrpc.py @@ -102,7 +102,7 @@ def _init (self): # Maybe the following arg-adding feature should just be part of # SplitRequestHandler? - for k,v in self.args.iteritems(): + for k,v in self.args.items(): setattr(self, "_arg_" + k, v) self.auth_function = self.args.get('auth', None) diff --git a/pox/web/webcore.py b/pox/web/webcore.py index 986fcfbf3..7b0209cf1 100644 --- a/pox/web/webcore.py +++ b/pox/web/webcore.py @@ -39,26 +39,26 @@ CherryPy, but I did want to include a simple, dependency-free web solution. """ -from SocketServer import ThreadingMixIn -from BaseHTTPServer import * +from socketserver import ThreadingMixIn +from http.server import * from time import sleep import select import threading -from authentication import BasicAuthMixin +from .authentication import BasicAuthMixin from pox.core import core import os import socket import posixpath -import urllib +import urllib.request, urllib.parse, urllib.error import cgi import errno try: - from cStringIO import StringIO + from io import StringIO except ImportError: - from StringIO import StringIO + from io import StringIO log = core.getLogger() try: @@ -104,7 +104,7 @@ def _handle_GoingDownEvent (self, event): cc = dict(self.sockets) self.sockets.clear() #if cc: log.debug("Shutting down %s socket(s)", len(cc)) - for s,(r,w,c) in cc.iteritems(): + for s,(r,w,c) in cc.items(): try: if r and w: flags = socket.SHUT_RDWR elif r: flags = socket.SHUT_RD @@ -134,8 +134,8 @@ def unregister (self, socket): _shutdown_helper = ShutdownHelper() -import SimpleHTTPServer -from SimpleHTTPServer import SimpleHTTPRequestHandler +import http.server +from http.server import SimpleHTTPRequestHandler class SplitRequestHandler (BaseHTTPRequestHandler): @@ -216,7 +216,7 @@ def log_message (self, fmt, *args): + "1c038d4e27a0f2004e081e2172a4051942abba260309ea6b805ab501581ae3129d90" + "1275c6404b80a72f5abcd4a2454cb334dbd9e58e74693b97425e07002003b") _favicon = ''.join([chr(int(_favicon[n:n+2],16)) - for n in xrange(0,len(_favicon),2)]) + for n in range(0,len(_favicon),2)]) class CoreHandler (SplitRequestHandler): """ @@ -255,7 +255,7 @@ def send_info (self, is_get = False): r += "
  • %s - %s
  • \n" % (cgi.escape(str(k)), cgi.escape(str(v))) r += "\n\n

    Web Prefixes

    " r += "
      " - m = [map(cgi.escape, map(str, [x[0],x[1],x[1].format_info(x[3])])) + m = [list(map(cgi.escape, list(map(str, [x[0],x[1],x[1].format_info(x[3])])))) for x in self.args.matches] m.sort() for v in m: @@ -314,7 +314,7 @@ def list_directory (self, dirpath): parts = path.rstrip("/").split("/") r.write('/') for i,part in enumerate(parts): - link = urllib.quote("/".join(parts[:i+1])) + link = urllib.parse.quote("/".join(parts[:i+1])) if i > 0: part += "/" r.write('%s' % (link, cgi.escape(part))) r.write("\n" + "-" * (0+len(path)) + "\n") @@ -329,7 +329,7 @@ def list_directory (self, dirpath): files.append(f) def entry (n, rest=''): - link = urllib.quote(n) + link = urllib.parse.quote(n) name = cgi.escape(n) r.write('%s\n' % (link,name+rest)) @@ -393,7 +393,7 @@ def wrapRequestHandler (handlerClass): (SplitRequestHandler, handlerClass, object), {}) -from CGIHTTPServer import CGIHTTPRequestHandler +from http.server import CGIHTTPRequestHandler class SplitCGIRequestHandler (SplitRequestHandler, CGIHTTPRequestHandler, object): """ diff --git a/pox/web/websocket.py b/pox/web/websocket.py index 43d9573f8..758f02725 100644 --- a/pox/web/websocket.py +++ b/pox/web/websocket.py @@ -411,7 +411,7 @@ def _on_message (self, op, msg): import json import logging msg = json.loads(msg) - for k,v in msg.items(): + for k,v in list(msg.items()): logging.getLogger(k).setLevel(v) def _on_start (self): diff --git a/tests/skeleton_generator.py b/tests/skeleton_generator.py index 9faf6f405..8cf23dba5 100755 --- a/tests/skeleton_generator.py +++ b/tests/skeleton_generator.py @@ -64,10 +64,10 @@ def mkdir(d): if not os.path.exists(d): - print "mkdir %s" % d + print("mkdir %s" % d) os.makedirs(d) else: - print "mkdir %s [exists]" % d + print("mkdir %s [exists]" % d) template = Template( """#!/usr/bin/env python @@ -102,7 +102,7 @@ class ${test_class_name} (unittest.TestCase): """) def generate_test(module): - print "Generating test for module: %s" % module + print("Generating test for module: %s" % module) lastdot = module.rfind(".") package = module[0:lastdot] if lastdot > 0 else "" name = module[lastdot+1:] @@ -110,7 +110,7 @@ def generate_test(module): dst_dir = path.join(UNIT_TEST, *test_package.split('.')) mkdir(dst_dir) - camel_name = re.sub(r'(_|^)+(.)', lambda(m): m.group(2).upper(), name) + camel_name = re.sub(r'(_|^)+(.)', lambda m: m.group(2).upper(), name) test_class_name = camel_name + "Test" test_file = path.join(dst_dir, name + "_test.py") @@ -137,7 +137,7 @@ def write_test(update=False): |stat.S_IXGRP|stat.S_IRGRP|stat.S_IXOTH|stat.S_IROTH) if not os.path.exists(test_file) or options.force: - print "Creating test %s in %s" % (test_class_name, test_file) + print("Creating test %s in %s" % (test_class_name, test_file)) write_test() else: f = open(test_file, "r") @@ -150,19 +150,19 @@ def write_test(update=False): existing_non_hashed = re.sub(r'\n[^\n]*\n', '\n', existing, 1) calculated_sha1 = sha1(existing_non_hashed) if read_sha1 == calculated_sha1: - print "Updating test %s in %s" % (test_class_name, test_file) + print("Updating test %s in %s" % (test_class_name, test_file)) write_test(True) else: - print ("Test for %s in %s already exists (and sha1 sums don't " + print(("Test for %s in %s already exists (and sha1 sums don't " "match: %s<=>%s)") % (test_class_name, - test_file, read_sha1, calculated_sha1) + test_file, read_sha1, calculated_sha1)) else: - print ("Test for %s in %s already exists (and no autogeneration " - "sig found)") % (test_class_name, test_file) + print(("Test for %s in %s already exists (and no autogeneration " + "sig found)") % (test_class_name, test_file)) count = 0 for module in modules: if any(fnmatchcase(module,glob) for glob in args): count += 1 generate_test(module) -print "Created/updated",count,"tests" +print("Created/updated",count,"tests") diff --git a/tests/unit/datapaths/switch_test.py b/tests/unit/datapaths/switch_test.py index 748494a1a..09c22772a 100755 --- a/tests/unit/datapaths/switch_test.py +++ b/tests/unit/datapaths/switch_test.py @@ -62,7 +62,7 @@ def setUp(self): dst=EthAddr("00:00:00:00:00:02"), payload=ipv4(srcip=IPAddr("1.2.3.4"), dstip=IPAddr("1.2.3.5"), - payload=udp(srcport=1234, dstport=53, payload="haha"))) + payload=udp(srcport=1234, dstport=53, payload=b"haha"))) def test_hello(self): c = self.conn @@ -101,7 +101,7 @@ def test_packet_out(self): c = self.conn s = self.switch received = [] - s.addListener(DpPacketOut, lambda(event): received.append(event)) + s.addListener(DpPacketOut, lambda event: received.append(event)) packet = self.packet c.to_switch(ofp_packet_out(data=packet, @@ -128,7 +128,7 @@ def test_rx_packet(self): c = self.conn s = self.switch received = [] - s.addListener(DpPacketOut, lambda(event): received.append(event)) + s.addListener(DpPacketOut, lambda event: received.append(event)) # no flow entries -> should result in a packet_in s.rx_packet(self.packet, in_port=1) self.assertEqual(len(c.received), 1) @@ -163,7 +163,7 @@ def test_delete_port(self): c = self.conn s = self.switch original_num_ports = len(self.switch.ports) - p = self.switch.ports.values()[0] + p = list(self.switch.ports.values())[0] s.delete_port(p) new_num_ports = len(self.switch.ports) self.assertTrue(new_num_ports == original_num_ports - 1, @@ -245,7 +245,7 @@ def setUp(self): dst=EthAddr("00:00:00:00:00:02"), payload=ipv4(srcip=IPAddr("1.2.3.4"), dstip=IPAddr("1.2.3.5"), - payload=udp(srcport=1234, dstport=53, payload="haha"))) + payload=udp(srcport=1234, dstport=53, payload=b"haha"))) def test_process_flow_mod_add(self): """ test that simple insertion of a flow works""" @@ -279,23 +279,23 @@ def table(): t = s.table msg = ofp_flow_mod(command = OFPFC_MODIFY, match=ofp_match(), actions = [ofp_action_output(port=1)]) c.to_switch(msg) - self.assertEquals([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=1)] ], [1,2,3]) - self.assertEquals(len(t.entries), 3) + self.assertEqual([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=1)] ], [1,2,3]) + self.assertEqual(len(t.entries), 3) s.table = table() t = s.table msg = ofp_flow_mod(command = OFPFC_MODIFY, match=ofp_match(nw_src="1.2.0.0/16"), actions = [ofp_action_output(port=8)]) c.to_switch(msg) - self.assertEquals([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=8)] ], [1,2]) - self.assertEquals(len(t.entries), 3) + self.assertEqual([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=8)] ], [1,2]) + self.assertEqual(len(t.entries), 3) # non-matching OFPFC_MODIFY acts as add s.table = table() t = s.table msg = ofp_flow_mod(cookie=5, command = OFPFC_MODIFY, match=ofp_match(nw_src="2.2.0.0/16"), actions = [ofp_action_output(port=8)]) c.to_switch(msg) - self.assertEquals(len(t.entries), 4) - self.assertEquals([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=8)] ], [5]) + self.assertEqual(len(t.entries), 4) + self.assertEqual([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=8)] ], [5]) def test_process_flow_mod_modify_strict(self): """ test that simple removal of a flow works""" @@ -313,15 +313,15 @@ def table(): t = s.table msg = ofp_flow_mod(command = OFPFC_MODIFY_STRICT, priority=1, match=ofp_match(), actions = [ofp_action_output(port=1)]) c.to_switch(msg) - self.assertEquals([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=1)] ], [3]) - self.assertEquals(len(t.entries), 3) + self.assertEqual([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=1)] ], [3]) + self.assertEqual(len(t.entries), 3) s.table = table() t = s.table msg = ofp_flow_mod(command = OFPFC_MODIFY_STRICT, priority=5, match=ofp_match(dl_src=EthAddr("00:00:00:00:00:02"), nw_src="1.2.3.0/24"), actions = [ofp_action_output(port=8)]) c.to_switch(msg) - self.assertEquals([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=8)] ], [2]) - self.assertEquals(len(t.entries), 3) + self.assertEqual([e.cookie for e in t.entries if e.actions == [ofp_action_output(port=8)] ], [2]) + self.assertEqual(len(t.entries), 3) diff --git a/tests/unit/lib/addresses_test.py b/tests/unit/lib/addresses_test.py index c901c6ce2..ed6da5d0c 100644 --- a/tests/unit/lib/addresses_test.py +++ b/tests/unit/lib/addresses_test.py @@ -62,7 +62,7 @@ def test_bad_cidr_succeed (self): def test_byte_order (self): self.assertEqual(IPAddr(IPAddr('1.2.3.4').toSigned()).raw, - '\x01\x02\x03\x04') + b'\x01\x02\x03\x04') #TODO: Clean up these IPv6 tests class IPv6Tests (unittest.TestCase): @@ -89,7 +89,7 @@ def test_part2 (self): """ Basic IPv6 address tests (part 2) """ - h = '\xfe\x80\x00\x00\x00\x00\x00\x00\xba\x8d\x12\xff\xfe\x2a\xdd\x6e' + h = b'\xfe\x80\x00\x00\x00\x00\x00\x00\xba\x8d\x12\xff\xfe\x2a\xdd\x6e' a = IPAddr6.from_raw(h) assert str(a) == 'fe80::ba8d:12ff:fe2a:dd6e' assert a.raw == h @@ -97,7 +97,6 @@ def test_part2 (self): assert a.num == 0xfe80000000000000ba8d12fffe2add6e assert IPAddr6.from_num(a.num) == a - assert a.is_multicast is False assert IPAddr6("FF02:0:0:0:0:0:0:1").is_multicast assert IPAddr6('2001:db8:1:2::').set_mac('00:1D:BA:06:37:64') \ diff --git a/tests/unit/lib/epoll_select_test.py b/tests/unit/lib/epoll_select_test.py index 1fe643c6c..c0ed49555 100644 --- a/tests/unit/lib/epoll_select_test.py +++ b/tests/unit/lib/epoll_select_test.py @@ -17,7 +17,7 @@ import unittest import sys import os.path -import SocketServer +import socketserver import threading import socket import signal @@ -28,13 +28,13 @@ from pox.lib.epoll_select import EpollSelect -class TCPEcho(SocketServer.StreamRequestHandler): +class TCPEcho(socketserver.StreamRequestHandler): def handle(self): data = self.rfile.readline() - print "got data: %s" % data + print("got data: %s" % data) self.wfile.write(data) -class ForkingTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): +class ForkingTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): def start(self): self.pid = os.fork() if self.pid == 0: @@ -45,7 +45,7 @@ def stop(self): os.kill(self.pid, signal.SIGKILL) def sort_fdlists(rl,wl,xl) : - key = lambda(x): x.fileno() if hasattr(x, "fileno") else x + key = lambda x: x.fileno() if hasattr(x, "fileno") else x return ( sorted(rl, key=key), @@ -76,7 +76,7 @@ def test_read_one_socket(self): ret = self.es.select([c], [c], [c], 0.1) self.assertEqual(([],[c],[]), ret) # send stuff - c.send("Hallo\n") + c.send(b"Hallo\n") # now we have something to read, right? ret = self.es.select([c], [], [c], 0.5) self.assertEqual(([c],[],[]), ret) diff --git a/tests/unit/lib/ioworker/io_worker_test.py b/tests/unit/lib/ioworker/io_worker_test.py index e4dd3396f..571ce22e9 100644 --- a/tests/unit/lib/ioworker/io_worker_test.py +++ b/tests/unit/lib/ioworker/io_worker_test.py @@ -31,9 +31,9 @@ class IOWorkerTest(unittest.TestCase): def test_basic_send(self): i = IOWorker() - i.send("foo") + i.send(b"foo") self.assertTrue(i._ready_to_send) - self.assertEqual(i.send_buf, "foo") + self.assertEqual(i.send_buf, b"foo") i._consume_send_buf(3) self.assertFalse(i._ready_to_send) @@ -43,11 +43,11 @@ def test_basic_receive(self): def d(worker): self.data = worker.peek() i.rx_handler = d - i._push_receive_data("bar") - self.assertEqual(self.data, "bar") + i._push_receive_data(b"bar") + self.assertEqual(self.data, b"bar") # d does not consume the data - i._push_receive_data("hepp") - self.assertEqual(self.data, "barhepp") + i._push_receive_data(b"hepp") + self.assertEqual(self.data, b"barhepp") def test_receive_consume(self): i = IOWorker() @@ -56,11 +56,11 @@ def consume(worker): self.data = worker.peek() worker.consume_receive_buf(len(self.data)) i.rx_handler = consume - i._push_receive_data("bar") - self.assertEqual(self.data, "bar") + i._push_receive_data(b"bar") + self.assertEqual(self.data, b"bar") # data has been consumed - i._push_receive_data("hepp") - self.assertEqual(self.data, "hepp") + i._push_receive_data(b"hepp") + self.assertEqual(self.data, b"hepp") class RecocoIOLoopTest(unittest.TestCase): @@ -88,17 +88,17 @@ def r(worker): # Does not actually execute run, but 'yield' a generator g = loop.run() # g.next() will call it, and get as far as the 'yield select' - select = g.next() + select = next(g) # send data on other socket half - right.send("hallo") + right.send(b"hallo") # now we emulate the return value of the select ([rlist],[wlist], [elist]) g.send(([worker], [], [])) # that should result in the socket being red the data being handed # to the ioworker, the callback being called. Everybody happy. - self.assertEquals(self.received, "hallo") + self.assertEqual(self.received, b"hallo") def test_run_close(self): loop = RecocoIOLoop() @@ -122,15 +122,15 @@ def test_run_write(self): (left, right) = MockSocket.pair() worker = loop.new_worker(left) - worker.send("heppo") + worker.send(b"heppo") # 'start' the run (dark generator magic here). # Does not actually execute run, but 'yield' a generator g = loop.run() # g.next() will call it, and get as far as the 'yield select' - select = g.next() + select = next(g) # now we emulate the return value of the select ([rlist],[wlist], [elist]) g.send(([], [worker], [])) # that should result in the stuff being sent on the socket - self.assertEqual(right.recv(), "heppo") + self.assertEqual(right.recv(), b"heppo") diff --git a/tests/unit/lib/mock_socket_test.py b/tests/unit/lib/mock_socket_test.py index ed830c1b4..5ccb597a4 100644 --- a/tests/unit/lib/mock_socket_test.py +++ b/tests/unit/lib/mock_socket_test.py @@ -29,23 +29,23 @@ def setUp(self): def test_simple_send(self): (a, b) = MockSocket.pair() - a.send("Hallo") - self.assertEquals(b.recv(), "Hallo") - b.send("Servus") - self.assertEquals(a.recv(), "Servus") + a.send(b"Hallo") + self.assertEqual(b.recv(), b"Hallo") + b.send(b"Servus") + self.assertEqual(a.recv(), b"Servus") def test_ready_to_recv(self): (a, b) = MockSocket.pair() - a.send("Hallo") + a.send(b"Hallo") self.assertFalse(a.ready_to_recv()) self.assertTrue(b.ready_to_recv()) - self.assertEquals(b.recv(), "Hallo") + self.assertEqual(b.recv(), b"Hallo") self.assertFalse(b.ready_to_recv()) self.assertFalse(a.ready_to_recv()) - b.send("Servus") + b.send(b"Servus") self.assertTrue(a.ready_to_recv()) - self.assertEquals(a.recv(), "Servus") + self.assertEqual(a.recv(), b"Servus") self.assertFalse(a.ready_to_recv()) def test_on_ready_to_recv(self): @@ -57,14 +57,14 @@ def ready(socket, size): (a, b) = MockSocket.pair() b.set_on_ready_to_recv(ready) - self.assertEquals(self.called, 0) - a.send("Hallo") - self.assertEquals(self.called, 1) - self.assertEquals(self.seen_size, 5) + self.assertEqual(self.called, 0) + a.send(b"Hallo") + self.assertEqual(self.called, 1) + self.assertEqual(self.seen_size, 5) # check that it doesn't get called on the other sockets data - b.send("Huhu") - self.assertEquals(self.called, 1) + b.send(b"Huhu") + self.assertEqual(self.called, 1) def test_empty_recv(self): """ test_empty_recv: Check that empty reads on socket return "" @@ -72,7 +72,7 @@ def test_empty_recv(self): test documents it as intended for now, though """ (a, b) = MockSocket.pair() - self.assertEquals(a.recv(), "") + self.assertEqual(a.recv(), b'') if __name__ == '__main__': unittest.main() diff --git a/tests/unit/openflow/libopenflow_01_test.py b/tests/unit/openflow/libopenflow_01_test.py index 83faba061..aef200906 100755 --- a/tests/unit/openflow/libopenflow_01_test.py +++ b/tests/unit/openflow/libopenflow_01_test.py @@ -30,7 +30,7 @@ def extract_num(buf, start, length): val = 0 for i in range(start, start+length): val <<= 8 - val += ord(buf[i]) + val += buf[i] return val class ofp_match_test(unittest.TestCase): @@ -39,17 +39,17 @@ def test_bit_wildcards(self): m = ofp_match() # all match entries should start out as wildcarded - for k,v in ofp_match_data.iteritems(): - self.assertEquals(getattr(m, k), None, "Attr %s should be wildcarded and reported as None" % k) - self.assertEquals(m.wildcards & v[1], v[1]) + for k,v in ofp_match_data.items(): + self.assertEqual(getattr(m, k), None, "Attr %s should be wildcarded and reported as None" % k) + self.assertEqual(m.wildcards & v[1], v[1]) # try setting and unsetting specific bit-level match entries for change in [ ("in_port", 1, OFPFW_IN_PORT), ("dl_vlan", 2, OFPFW_DL_VLAN), ("tp_dst", 22, OFPFW_TP_DST) ]: setattr(m, change[0], change[1]) - self.assertEquals(getattr(m, change[0]), change[1], "Attr %s should have been set to %s" % change[0:2]) - self.assertEquals(m.wildcards & change[2], 0, "with %s set to %s, wildcard bit %x should get unset" % change) + self.assertEqual(getattr(m, change[0]), change[1], "Attr %s should have been set to %s" % change[0:2]) + self.assertEqual(m.wildcards & change[2], 0, "with %s set to %s, wildcard bit %x should get unset" % change) setattr(m, change[0], None) - self.assertEquals(m.wildcards & change[2], change[2], "with %s reset from %s, wildcard bit %x should be set again" % change) + self.assertEqual(m.wildcards & change[2], change[2], "with %s reset from %s, wildcard bit %x should be set again" % change) def test_ip_wildcard_magic(self): """ ofp_match: check IP wildcard magic""" @@ -57,7 +57,7 @@ def test_ip_wildcard_magic(self): # do this for both nw_src and nw_dst for (attr, bitmask, shift) in ( ("nw_src", OFPFW_NW_SRC_MASK, OFPFW_NW_SRC_SHIFT), ( "nw_dst", OFPFW_NW_DST_MASK, OFPFW_NW_DST_SHIFT) ): m = ofp_match() - self.assertEquals(getattr(m, "get_"+attr)(), (None, 0), "get_%s for unset %s should return (None,0)" % (attr, attr)) + self.assertEqual(getattr(m, "get_"+attr)(), (None, 0), "get_%s for unset %s should return (None,0)" % (attr, attr)) self.assertTrue( ((m.wildcards & bitmask) >> shift) >= 32) @@ -80,7 +80,7 @@ def test_ip_wildcard_magic(self): # reset to 0.0.0.0/0 results in full wildcard setattr(m, attr, "0.0.0.0/0") - self.assertEquals(getattr(m, "get_"+attr)(), (None, 0), "get_%s for unset %s should return (None,0)" % (attr, attr)) + self.assertEqual(getattr(m, "get_"+attr)(), (None, 0), "get_%s for unset %s should return (None,0)" % (attr, attr)) self.assertTrue( ((m.wildcards & bitmask) >> shift) >= 32) def test_match_with_wildcards(self): @@ -94,7 +94,7 @@ def create(wildcards=(), **kw): for w in wildcards: setattr(m, w, None) - for (k,v) in kw.iteritems(): + for (k,v) in kw.items(): m.__setattr__(k,v) return m @@ -122,7 +122,7 @@ def assertNoMatch(ref, other, msg=""): for changes in ( { "in_port": 15 }, { "dl_src": "12:34:56:78:90:ab", "dl_vlan": 7 }, { "tp_dst" : 22 } ): wild = create() concrete = create() - for (k,v) in changes.iteritems(): + for (k,v) in changes.items(): setattr(wild, k, None) setattr(concrete, k, v) assertMatch(wild, concrete) @@ -167,7 +167,7 @@ def assert_packed_header(self, pack, ofp_type, length, xid): """ check openflow header fields in packed byte array """ def assert_num(name, start, length, expected): val = extract_num(pack, start, length) - self.assertEquals(val, expected, "packed header check: %s for ofp type %s should be %d (is %d)" % (name, ofp_type_map[ofp_type], expected, val)) + self.assertEqual(val, expected, "packed header check: %s for ofp type %s should be %d (is %d)" % (name, ofp_type_map[ofp_type], expected, val)) assert_num("OpenFlow version", 0, 1, 1) assert_num("header_type", 1, 1, ofp_type) @@ -176,7 +176,7 @@ def assert_num(name, start, length, expected): def _test_pack_unpack(self, o, xid, ofp_type=None): """ check that packing and unpacking an ofp object works, and that lengths etc. are correct """ - show = lambda(o): o.show() if hasattr(o, "show") else str(show) + show = lambda o: o.show() if hasattr(o, "show") else str(show) if not ofp_type: ofp_type = self.ofp_type[type(o)] @@ -252,7 +252,7 @@ def test_pack_custom_packet_out(self): xid_gen = xid_generator() packet = ethernet(src=EthAddr("00:00:00:00:00:01"), dst=EthAddr("00:00:00:00:00:02"), payload=ipv4(srcip=IPAddr("1.2.3.4"), dstip=IPAddr("1.2.3.5"), - payload=udp(srcport=1234, dstport=53, payload="haha"))).pack() + payload=udp(srcport=1234, dstport=53, payload=b"haha"))).pack() for actions in self.some_actions: for attrs in ( { 'data': packet }, { 'buffer_id': 5 } ): @@ -265,7 +265,7 @@ def test_pack_flow_mod_openflow_dl_type_wildcards(self): question is not matched i.e., dl_type != 0x800 -> no wildcards for IP. Test this here """ def show_wildcards(w): - parts = [ k.lower()[len("OFPFW_"):] for (k,v) in ofp_flow_wildcards_rev_map.iteritems() if v & w == v ] + parts = [ k.lower()[len("OFPFW_"):] for (k,v) in ofp_flow_wildcards_rev_map.items() if v & w == v ] nw_src_bits = (w & OFPFW_NW_SRC_MASK) >> OFPFW_NW_SRC_SHIFT nw_src_bits = (w & OFPFW_NW_SRC_MASK) >> OFPFW_NW_SRC_SHIFT if(nw_src_bits > 0): parts.append("nw_src(/%d)" % (32 - nw_src_bits)) @@ -276,7 +276,7 @@ def show_wildcards(w): def test_wildcards(match, expected): (packed,) = struct.unpack_from("!L", match.pack(flow_mod=True)) - self.assertEquals(packed, expected, "packed: %s <> expected: %s" % (show_wildcards(packed), show_wildcards(expected))) + self.assertEqual(packed, expected, "packed: %s <> expected: %s" % (show_wildcards(packed), show_wildcards(expected))) # no dl type specified -> wildcards for nw/dl are cleared test_wildcards(ofp_match(), OFPFW_ALL & ~ (OFPFW_NW_TOS | OFPFW_NW_PROTO | OFPFW_NW_SRC_MASK | OFPFW_NW_DST_MASK | OFPFW_TP_SRC | OFPFW_TP_DST)) @@ -309,7 +309,7 @@ def test_pack_custom_flow_mod(self): self.assertEqual(unpacked.match, match) self.assertEqual(unpacked.command, command) self.assertEqual(unpacked.actions, actions) - for (check_attr,val) in attrs.iteritems(): + for (check_attr,val) in attrs.items(): self.assertEqual(getattr(unpacked, check_attr), val) class ofp_action_test(unittest.TestCase): @@ -326,28 +326,27 @@ def c(cls, a_type, kw, length): unpacked = cls() unpacked.unpack(packed) self.assertEqual(action, unpacked) - for (k, v) in kw.iteritems(): + for (k, v) in kw.items(): self.assertEqual(getattr(unpacked, k), v) return packed - c(ofp_action_output, OFPAT_OUTPUT, { 'port': 23 }, 8 ) c(ofp_action_enqueue, OFPAT_ENQUEUE, { 'port': 23, 'queue_id': 1 }, 16 ) c(ofp_action_vlan_vid, OFPAT_SET_VLAN_VID, { 'vlan_vid' : 123}, 8 ) c(ofp_action_vlan_pcp, OFPAT_SET_VLAN_PCP, { 'vlan_pcp' : 123}, 8 ) p = c(ofp_action_dl_addr.set_dst, OFPAT_SET_DL_DST, { 'dl_addr' : EthAddr("01:02:03:04:05:06").toRaw() }, 16 ) - self.assertEquals(extract_num(p, 4,6), 0x010203040506) + self.assertEqual(extract_num(p, 4,6), 0x010203040506) p = c(ofp_action_dl_addr.set_src, OFPAT_SET_DL_SRC, { 'dl_addr' : EthAddr("ff:ee:dd:cc:bb:aa").toRaw() }, 16 ) - self.assertEquals(extract_num(p, 4,6), 0xffeeddccbbaa, "Ethernet in packed is %x, but should be ff:ee:dd:cc:bb:aa" % extract_num(p, 4, 6)) + self.assertEqual(extract_num(p, 4,6), 0xffeeddccbbaa, "Ethernet in packed is %x, but should be ff:ee:dd:cc:bb:aa" % extract_num(p, 4, 6)) p = c(ofp_action_nw_addr.set_dst, OFPAT_SET_NW_DST, { 'nw_addr' : IPAddr("1.2.3.4") }, 8 ) - self.assertEquals(extract_num(p, 4,4), 0x01020304) + self.assertEqual(extract_num(p, 4,4), 0x01020304) p = c(ofp_action_nw_addr.set_src, OFPAT_SET_NW_SRC, { 'nw_addr' : IPAddr("127.0.0.1") }, 8 ) - self.assertEquals(extract_num(p, 4,4), 0x7f000001) + self.assertEqual(extract_num(p, 4,4), 0x7f000001) c(ofp_action_nw_tos, OFPAT_SET_NW_TOS, { 'nw_tos' : 4 }, 8) p = c(ofp_action_tp_port.set_dst, OFPAT_SET_TP_DST, { 'tp_port' : 80 }, 8) - self.assertEquals(extract_num(p, 4,2), 80) + self.assertEqual(extract_num(p, 4,2), 80) p = c(ofp_action_tp_port.set_src, OFPAT_SET_TP_SRC, { 'tp_port' : 22987 }, 8) - self.assertEquals(extract_num(p, 4,2), 22987) + self.assertEqual(extract_num(p, 4,2), 22987) # c(ofp_action_push_mpls, OFPAT_PUSH_MPLS, {'ethertype':0x8847}, 8) # c(ofp_action_pop_mpls, OFPAT_POP_MPLS, {'ethertype':0x0800}, 8) # c(ofp_action_mpls_dec_ttl, OFPAT_DEC_MPLS_TTL, {}, 8) diff --git a/tests/unit/openflow/nicira_test.py b/tests/unit/openflow/nicira_test.py index 5529e2116..8dddb20df 100644 --- a/tests/unit/openflow/nicira_test.py +++ b/tests/unit/openflow/nicira_test.py @@ -60,6 +60,11 @@ def _init_action_nx_action_learn (self, cls): def _init_action_nx_action_pop_mpls (self, cls): return cls(ethertype=101) + def _init_action_nx_action_mpls_label (self, cls): + return cls(label=0) + + def _init_action_nx_action_mpls_tc (self, cls): + return cls(tc=0) def test_unpack_weird_header (self): """ @@ -93,7 +98,7 @@ def test_action_pack_unpack (self): for name in dir(nx): a = getattr(nx, name) if not nx._issubclass(a, of.ofp_action_vendor_base): continue - print "Trying",name,"...", + print("Trying",name,"...", end=' ') init = getattr(self, "_init_action_" + name, lambda c: c()) original = init(a) original_packed = original.pack() @@ -108,7 +113,7 @@ def test_action_pack_unpack (self): self.assertEqual(original, unoriginal, "Pack/Unpack failed for " + name) - print "Success!" + print("Success!") def test_nxm_ip (self): @@ -118,7 +123,7 @@ def test_nxm_ip (self): def try_bad (): e = nx.NXM_OF_IP_SRC(IPAddr("192.168.56.1"),IPAddr("255.255.255.0")) e.pack() - self.assertRaisesRegexp(AssertionError, '^nonzero masked bits$', + self.assertRaisesRegex(AssertionError, '^nonzero masked bits$', try_bad) @@ -153,11 +158,11 @@ def test_flow_mod_spec (self): Not comprehensive. """ learn = self._make_learn_action() - good = """00 0c 00 00 08 02 00 00 00 00 08 02 00 00 - 00 30 00 00 04 06 00 00 00 00 02 06 00 00 - 10 10 00 00 00 02 00 00""".split() - good = ''.join([chr(int(x,16)) for x in good]) - self.assertEqual(good, ''.join(x.pack() for x in learn.spec)) + good = """00 0c 00 00 08 02 00 00 00 00 08 02 00 00\ + 00 30 00 00 04 06 00 00 00 00 02 06 00 00\ + 10 10 00 00 00 02 00 00""" + good = bytearray.fromhex(good) + self.assertEqual(good, b''.join(x.pack() for x in learn.spec)) def test_match_pack_unpack (self): @@ -168,7 +173,7 @@ def test_match_pack_unpack (self): # Note that this does not currently really take into account constraints # on masks (e.g., EthAddr masks only having broadcast bit). - for nxm_name,nxm_type in nx._nxm_name_to_type.items(): + for nxm_name,nxm_type in list(nx._nxm_name_to_type.items()): nxm_class = nx._nxm_type_to_class[nxm_type] mask = None @@ -179,6 +184,8 @@ def test_match_pack_unpack (self): if issubclass(nxm_class, nx._nxm_numeric_entry): value = 0x0a mask = 0x0f + elif issubclass(nxm_class, nx._nxm_numeric): + value = 0x0a elif issubclass(nxm_class, nx._nxm_raw): value = 'aabb' # Currently never check mask for raw diff --git a/tests/unit/openflow/topology_test.py b/tests/unit/openflow/topology_test.py index a19d8ef9a..53a4266f0 100644 --- a/tests/unit/openflow/topology_test.py +++ b/tests/unit/openflow/topology_test.py @@ -35,7 +35,7 @@ class MockSwitch(EventMixin): def __init__(self): EventMixin.__init__(self) self.connected = True - self._xid_generator = itertools.count(1).next + self._xid_generator = itertools.count(1).__next__ self.sent = [] def send(self, msg): @@ -62,7 +62,7 @@ def test_reconnect_pending(self): s = self.s seen_ft_events = [] - t.addListener(FlowTableModification, lambda(event): seen_ft_events.append(event)) + t.addListener(FlowTableModification, lambda event: seen_ft_events.append(event)) entry = TableEntry(priority=5, cookie=0x31415926, match=ofp_match(dl_src=EthAddr("00:00:00:00:00:01")), actions=[ofp_action_output(port=5)]) t.install(entry) @@ -92,7 +92,7 @@ def test_install_remove(self): s = self.s seen_ft_events = [] - t.addListener(FlowTableModification, lambda(event): seen_ft_events.append(event)) + t.addListener(FlowTableModification, lambda event: seen_ft_events.append(event)) entry = TableEntry(priority=5, cookie=0x31415926, match=ofp_match(dl_src=EthAddr("00:00:00:00:00:01")), actions=[ofp_action_output(port=5)]) t.install(entry) diff --git a/tools/pox-log.py b/tools/pox-log.py index 3ba372b81..c05e1d780 100755 --- a/tools/pox-log.py +++ b/tools/pox-log.py @@ -76,7 +76,7 @@ class LogJSONDestreamer (JSONDestreamer): def rx (self, data): if data.get('CHANNEL') != mychannel: return - print "%s|%s|%s" % (data['levelname'], data['name'], data['message']) + print("%s|%s|%s" % (data['levelname'], data['name'], data['message'])) jd = LogJSONDestreamer() @@ -85,7 +85,7 @@ def rx (self, data): try: sock = socket.socket() sock.connect((host,port)) - print >>sys.stderr, "== Connected ==" + print("== Connected ==", file=sys.stderr) msg = { 'CHANNEL' : '', 'cmd' : 'join_channel', @@ -116,7 +116,7 @@ def rx (self, data): except KeyboardInterrupt: break except RuntimeError as e: - print >>sys.stderr, "== Disconnected ==" + print("== Disconnected ==", file=sys.stderr) try: sock.close() except: diff --git a/tools/pox-pydoc.py b/tools/pox-pydoc.py index 3707bc2a2..895c30aff 100755 --- a/tools/pox-pydoc.py +++ b/tools/pox-pydoc.py @@ -55,8 +55,8 @@ class or function within a module or module in a package. If the # the current directory is changed with os.chdir(), an incorrect # path will be displayed. -import sys, imp, os, re, types, inspect, __builtin__, pkgutil -from repr import Repr +import sys, imp, os, re, types, inspect, builtins, pkgutil +from reprlib import Repr from string import expandtabs, find, join, lower, split, strip, rfind, rstrip from traceback import extract_tb try: @@ -138,7 +138,7 @@ def allmethods(cl): methods[key] = 1 for base in cl.__bases__: methods.update(allmethods(base)) # all your base are belong to us - for key in methods.keys(): + for key in list(methods.keys()): methods[key] = getattr(cl, key) return methods @@ -183,7 +183,7 @@ def fixup(data): if inspect.isdatadescriptor(value): kind = 'data descriptor' return name, kind, cls, value - return map(fixup, inspect.classify_class_attrs(object)) + return list(map(fixup, inspect.classify_class_attrs(object))) # ----------------------------------------------------- module manipulation @@ -245,7 +245,7 @@ def __init__(self, filename, exc_info): def __str__(self): exc = self.exc - if type(exc) is types.ClassType: + if type(exc) is type: exc = exc.__name__ return 'problem in %s - %s: %s' % (self.filename, exc, self.value) @@ -341,7 +341,7 @@ def fail(self, object, name=None, *args): """Raise an exception for unimplemented types.""" message = "don't know how to document object%s of type %s" % ( name and ' ' + repr(name), type(object).__name__) - raise TypeError, message + raise TypeError(message) docmodule = docclass = docroutine = docother = docproperty = docdata = fail @@ -681,7 +681,7 @@ def docmodule(self, object, name=None, mod=None, *ignored): 'Modules', '#ffffff', '#aa55cc', contents) if classes: - classlist = map(lambda key_value: key_value[1], classes) + classlist = [key_value[1] for key_value in classes] contents = [ self.formattree(inspect.getclasstree(classlist, 1), name)] for key, value in classes: @@ -783,8 +783,7 @@ def spilldata(msg, attrs, predicate): push('\n') return attrs - attrs = filter(lambda data: visiblename(data[0]), - classify_class_attrs(object)) + attrs = [data for data in classify_class_attrs(object) if visiblename(data[0])] mdict = {} for key, kind, homecls, value in attrs: mdict[key] = anchor = '#' + name + '-' + key @@ -803,7 +802,7 @@ def spilldata(msg, attrs, predicate): thisclass = attrs[0][2] attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass) - if thisclass is __builtin__.object: + if thisclass is builtins.object: attrs = inherited continue elif thisclass is object: @@ -880,17 +879,17 @@ def docroutine(self, object, name=None, mod=None, note = '' skipdocs = 0 if inspect.ismethod(object): - imclass = object.im_class + imclass = object.__self__.__class__ if cl: if imclass is not cl: note = ' from ' + self.classlink(imclass, mod) else: - if object.im_self is not None: + if object.__self__ is not None: note = ' method of %s instance' % self.classlink( - object.im_self.__class__, mod) + object.__self__.__class__, mod) else: note = ' unbound %s method' % self.classlink(imclass,mod) - object = object.im_func + object = object.__func__ if name == realname: title = '%s' % (anchor, realname) @@ -1007,13 +1006,13 @@ class TextDoc(Doc): def bold(self, text): """Format a string in bold by overstriking.""" - return join(map(lambda ch: ch + '\b' + ch, text), '') + return join([ch + '\b' + ch for ch in text], '') def indent(self, text, prefix=' '): """Indent text by prepending a given prefix to each line.""" if not text: return '' lines = split(text, '\n') - lines = map(lambda line, prefix=prefix: prefix + line, lines) + lines = list(map(lambda line, prefix=prefix: prefix + line, lines)) if lines: lines[-1] = rstrip(lines[-1]) return join(lines, '\n') @@ -1031,7 +1030,7 @@ def formattree(self, tree, modname, parent=None, prefix=''): c, bases = entry result = result + prefix + classname(c, modname) if bases and bases != (parent,): - parents = map(lambda c, m=modname: classname(c, m), bases) + parents = list(map(lambda c, m=modname: classname(c, m), bases)) result = result + '(%s)' % join(parents, ', ') result = result + '\n' elif type(entry) is type([]): @@ -1107,7 +1106,7 @@ def docmodule(self, object, name=None, mod=None): 'SUBMODULES', join(submodules, '\n')) if classes: - classlist = map(lambda key_value: key_value[1], classes) + classlist = [key_value[1] for key_value in classes] contents = [self.formattree( inspect.getclasstree(classlist, 1), name)] for key, value in classes: @@ -1153,7 +1152,7 @@ def makename(c, m=object.__module__): else: title = self.bold(name) + ' = class ' + realname if bases: - parents = map(makename, bases) + parents = list(map(makename, bases)) title = title + '(%s)' % join(parents, ', ') doc = getdoc(object) @@ -1212,8 +1211,7 @@ def spilldata(msg, attrs, predicate): name, mod, maxlen=70, doc=doc) + '\n') return attrs - attrs = filter(lambda data: visiblename(data[0]), - classify_class_attrs(object)) + attrs = [data for data in classify_class_attrs(object) if visiblename(data[0])] while attrs: if mro: thisclass = mro.popleft() @@ -1221,7 +1219,7 @@ def spilldata(msg, attrs, predicate): thisclass = attrs[0][2] attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass) - if thisclass is __builtin__.object: + if thisclass is builtins.object: attrs = inherited continue elif thisclass is object: @@ -1263,17 +1261,17 @@ def docroutine(self, object, name=None, mod=None, cl=None): note = '' skipdocs = 0 if inspect.ismethod(object): - imclass = object.im_class + imclass = object.__self__.__class__ if cl: if imclass is not cl: note = ' from ' + classname(imclass, mod) else: - if object.im_self is not None: + if object.__self__ is not None: note = ' method of %s instance' % classname( - object.im_self.__class__, mod) + object.__self__.__class__, mod) else: note = ' unbound %s method' % classname(imclass,mod) - object = object.im_func + object = object.__func__ if name == realname: title = self.bold(realname) @@ -1498,7 +1496,7 @@ def resolve(thing, forceload=0): if isinstance(thing, str): object = locate(thing, forceload) if not object: - raise ImportError, 'no Python documentation found for %r' % thing + raise ImportError('no Python documentation found for %r' % thing) return object, thing else: return thing, getattr(thing, '__name__', None) @@ -1532,8 +1530,8 @@ def doc(thing, title='Python Library Documentation: %s', forceload=0): """Display text documentation, given an object or a path to an object.""" try: pager(render_doc(thing, title, forceload)) - except (ImportError, ErrorDuringImport), value: - print value + except (ImportError, ErrorDuringImport) as value: + print(value) def writedoc(thing, forceload=0): """Write HTML documentation to a file in the current directory.""" @@ -1543,9 +1541,9 @@ def writedoc(thing, forceload=0): file = open(name + '.html', 'w') file.write(page) file.close() - print 'wrote', name + '.html' - except (ImportError, ErrorDuringImport), value: - print value + print('wrote', name + '.html') + except (ImportError, ErrorDuringImport) as value: + print(value) def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" @@ -1630,7 +1628,7 @@ class Helper: '[': 'LISTS SUBSCRIPTS SLICINGS', ']': 'LISTS SUBSCRIPTS SLICINGS' } - for topic, symbols_ in _symbols_inverse.iteritems(): + for topic, symbols_ in _symbols_inverse.items(): for symbol in symbols_: topics = symbols.get(symbol, topic) if topic not in topics: @@ -1773,7 +1771,7 @@ def interact(self): def getline(self, prompt): """Read one line, using raw_input when available.""" if self.input is sys.stdin: - return raw_input(prompt) + return input(prompt) else: self.output.write(prompt) self.output.flush() @@ -1833,7 +1831,7 @@ def listkeywords(self): Here is a list of the Python keywords. Enter any keyword to get more help. ''') - self.list(self.keywords.keys()) + self.list(list(self.keywords.keys())) def listsymbols(self): self.output.write(''' @@ -1841,14 +1839,14 @@ def listsymbols(self): to. Enter any symbol to get more help. ''') - self.list(self.symbols.keys()) + self.list(list(self.symbols.keys())) def listtopics(self): self.output.write(''' Here is a list of available topics. Enter any topic name to get more help. ''') - self.list(self.topics.keys()) + self.list(list(self.topics.keys())) def showtopic(self, topic, more_xrefs=''): try: @@ -1876,8 +1874,8 @@ def showtopic(self, topic, more_xrefs=''): if more_xrefs: xrefs = (xrefs or '') + ' ' + more_xrefs if xrefs: - import StringIO, formatter - buffer = StringIO.StringIO() + import io, formatter + buffer = io.StringIO() formatter.DumbWriter(buffer).send_flowing_data( 'Related help topics: ' + join(split(xrefs), ', ') + '\n') self.output.write('\n%s\n' % buffer.getvalue()) @@ -1908,7 +1906,7 @@ def callback(path, modname, desc, modules=modules): def onerror(modname): callback(None, modname, None) ModuleScanner().run(callback, onerror=onerror) - self.list(modules.keys()) + self.list(list(modules.keys())) self.output.write(''' Enter any module name to get more help. Or, type "modules spam" to search for modules whose descriptions contain the word "spam". @@ -1933,7 +1931,7 @@ def next(self): node, children = self.state[-1] if not children: self.state.pop() - return self.next() + return next(self) child = children.pop(0) if self.descendp(child): self.state.append((child, self.children(child))) @@ -1966,9 +1964,9 @@ def run(self, callback, key=None, completer=None, onerror=None): else: loader = importer.find_module(modname) if hasattr(loader,'get_source'): - import StringIO + import io desc = source_synopsis( - StringIO.StringIO(loader.get_source(modname)) + io.StringIO(loader.get_source(modname)) ) or '' if hasattr(loader,'get_filename'): path = loader.get_filename(modname) @@ -1989,7 +1987,7 @@ def apropos(key): def callback(path, modname, desc): if modname[-9:] == '.__init__': modname = modname[:-9] + ' (package)' - print modname, desc and '- ' + desc + print(modname, desc and '- ' + desc) def onerror(modname): # Ignore non-ImportError exceptions raised whilst trying to # import modules @@ -2002,7 +2000,7 @@ def onerror(modname): # --------------------------------------------------- web browser interface def serve(port, callback=None, completer=None): - import BaseHTTPServer, mimetools, select + import http.server, mimetools, select # Patch up mimetools.Message so it doesn't break if rfc822 is reloaded. class Message(mimetools.Message): @@ -2014,7 +2012,7 @@ def __init__(self, fp, seekable=1): self.parsetype() self.parseplist() - class DocHandler(BaseHTTPServer.BaseHTTPRequestHandler): + class DocHandler(http.server.BaseHTTPRequestHandler): def send_document(self, title, contents): try: self.send_response(200) @@ -2030,7 +2028,7 @@ def do_GET(self): if path and path != '.': try: obj = locate(path, forceload=1) - except ErrorDuringImport, value: + except ErrorDuringImport as value: self.send_document(path, html.escape(str(value))) return if obj: @@ -2044,8 +2042,7 @@ def do_GET(self): '#ffffff', '#7799ee') def bltinlink(name): return '%s' % (name, name) - names = filter(lambda x: x != '__main__', - sys.builtin_module_names) + names = [x for x in sys.builtin_module_names if x != '__main__'] contents = html.multicolumn(names, bltinlink) indices = ['

      ' + html.bigsection( 'Built-in Modules', '#ffffff', '#ee77aa', contents)] @@ -2060,7 +2057,7 @@ def bltinlink(name): def log_message(self, *args): pass - class DocServer(BaseHTTPServer.HTTPServer): + class DocServer(http.server.HTTPServer): def __init__(self, port, callback): host = 'localhost' self.address = (host, port) @@ -2079,7 +2076,7 @@ def server_activate(self): self.base.server_activate(self) if self.callback: self.callback(self) - DocServer.base = BaseHTTPServer.HTTPServer + DocServer.base = http.server.HTTPServer DocServer.handler = DocHandler DocHandler.MessageClass = Message try: @@ -2100,20 +2097,20 @@ def __init__(self, window, port=7464): self.server = None self.scanner = None - import Tkinter - self.server_frm = Tkinter.Frame(window) - self.title_lbl = Tkinter.Label(self.server_frm, + import tkinter + self.server_frm = tkinter.Frame(window) + self.title_lbl = tkinter.Label(self.server_frm, text='Starting server...\n ') - self.open_btn = Tkinter.Button(self.server_frm, + self.open_btn = tkinter.Button(self.server_frm, text='open browser', command=self.open, state='disabled') - self.quit_btn = Tkinter.Button(self.server_frm, + self.quit_btn = tkinter.Button(self.server_frm, text='quit serving', command=self.quit, state='disabled') - self.search_frm = Tkinter.Frame(window) - self.search_lbl = Tkinter.Label(self.search_frm, text='Search for') - self.search_ent = Tkinter.Entry(self.search_frm) + self.search_frm = tkinter.Frame(window) + self.search_lbl = tkinter.Label(self.search_frm, text='Search for') + self.search_ent = tkinter.Entry(self.search_frm) self.search_ent.bind('', self.search) - self.stop_btn = Tkinter.Button(self.search_frm, + self.stop_btn = tkinter.Button(self.search_frm, text='stop', pady=0, command=self.stop, state='disabled') if sys.platform == 'win32': # Trying to hide and show this button crashes under Windows. @@ -2132,17 +2129,17 @@ def __init__(self, window, port=7464): self.search_ent.focus_set() font = ('helvetica', sys.platform == 'win32' and 8 or 10) - self.result_lst = Tkinter.Listbox(window, font=font, height=6) + self.result_lst = tkinter.Listbox(window, font=font, height=6) self.result_lst.bind('', self.select) self.result_lst.bind('', self.goto) - self.result_scr = Tkinter.Scrollbar(window, + self.result_scr = tkinter.Scrollbar(window, orient='vertical', command=self.result_lst.yview) self.result_lst.config(yscrollcommand=self.result_scr.set) - self.result_frm = Tkinter.Frame(window) - self.goto_btn = Tkinter.Button(self.result_frm, + self.result_frm = tkinter.Frame(window) + self.goto_btn = tkinter.Button(self.result_frm, text='go to selected', command=self.goto) - self.hide_btn = Tkinter.Button(self.result_frm, + self.hide_btn = tkinter.Button(self.result_frm, text='hide results', command=self.hide) self.goto_btn.pack(side='left', fill='x', expand=1) self.hide_btn.pack(side='right', fill='x', expand=1) @@ -2258,9 +2255,9 @@ def hide(self, event=None): self.stop() self.collapse() - import Tkinter + import tkinter try: - root = Tkinter.Tk() + root = tkinter.Tk() # Tk will crash if pythonw.exe has an XP .manifest # file and the root has is not destroyed explicitly. # If the problem is ever fixed in Tk, the explicit @@ -2308,9 +2305,9 @@ class BadUsage: pass except ValueError: raise BadUsage def ready(server): - print 'pydoc server ready at %s' % server.url + print('pydoc server ready at %s' % server.url) def stopped(): - print 'pydoc server stopped' + print('pydoc server stopped') serve(port, ready, stopped) return if opt == '-w': @@ -2319,7 +2316,7 @@ def stopped(): if not args: raise BadUsage for arg in args: if ispath(arg) and not os.path.exists(arg): - print 'file %r does not exist' % arg + print('file %r does not exist' % arg) break try: if ispath(arg) and os.path.isfile(arg): @@ -2331,12 +2328,12 @@ def stopped(): writedoc(arg) else: help.help(arg) - except ErrorDuringImport, value: - print value + except ErrorDuringImport as value: + print(value) except (getopt.error, BadUsage): cmd = os.path.basename(sys.argv[0]) - print """pydoc - the Python documentation tool + print("""pydoc - the Python documentation tool %s ... Show text documentation on something. may be the name of a @@ -2359,6 +2356,6 @@ def stopped(): Write out the HTML documentation for a module to a file in the current directory. If contains a '%s', it is treated as a filename; if it names a directory, documentation is written for all the contents. -""" % (cmd, os.sep, cmd, cmd, cmd, cmd, os.sep) +""" % (cmd, os.sep, cmd, cmd, cmd, cmd, os.sep)) if __name__ == '__main__': cli() diff --git a/tools/reindent-pox.py b/tools/reindent-pox.py index 0a45a2363..02eaa711c 100755 --- a/tools/reindent-pox.py +++ b/tools/reindent-pox.py @@ -52,8 +52,8 @@ def usage(msg=None): if msg is not None: - print >> sys.stderr, msg - print >> sys.stderr, __doc__ + print(msg, file=sys.stderr) + print(__doc__, file=sys.stderr) def errprint(*args): sep = "" @@ -68,7 +68,7 @@ def main(): try: opts, args = getopt.getopt(sys.argv[1:], "drnvh", ["dryrun", "recurse", "nobackup", "verbose", "help"]) - except getopt.error, msg: + except getopt.error as msg: usage(msg) return for o, a in opts: @@ -94,7 +94,7 @@ def main(): def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: - print "listing directory", file + print("listing directory", file) names = os.listdir(file) for name in names: fullname = os.path.join(file, name) @@ -106,10 +106,10 @@ def check(file): return if verbose: - print "checking", file, "...", + print("checking", file, "...", end=' ') try: f = open(file) - except IOError, msg: + except IOError as msg: errprint("%s: I/O Error: %s" % (file, str(msg))) return @@ -117,24 +117,24 @@ def check(file): f.close() if r.run(): if verbose: - print "changed." + print("changed.") if dryrun: - print "But this is a dry run, so leaving it alone." + print("But this is a dry run, so leaving it alone.") if not dryrun: bak = file + ".bak" if makebackup: shutil.copyfile(file, bak) if verbose: - print "backed up", file, "to", bak + print("backed up", file, "to", bak) f = open(file, "w") r.write(f) f.close() if verbose: - print "wrote new", file + print("wrote new", file) return True else: if verbose: - print "unchanged." + print("unchanged.") return False def _rstrip(line, JUNK='\n \t'): @@ -204,7 +204,7 @@ def run(self): want = have2want.get(have, -1) if want < 0: # Then it probably belongs to the next real stmt. - for j in xrange(i+1, len(stats)-1): + for j in range(i+1, len(stats)-1): jline, jlevel = stats[j] if jlevel >= 0: if have == getlspace(lines[jline]): @@ -214,7 +214,7 @@ def run(self): # comment like this one, # in which case we should shift it like its base # line got shifted. - for j in xrange(i-1, -1, -1): + for j in range(i-1, -1, -1): jline, jlevel = stats[j] if jlevel >= 0: want = have + getlspace(after[jline-1]) - \ @@ -255,13 +255,14 @@ def getline(self): return line # Line-eater for tokenize. - def tokeneater(self, type, token, (sline, scol), end, line, + def tokeneater(self, type, token, xxx_todo_changeme, end, line, INDENT=tokenize.INDENT, DEDENT=tokenize.DEDENT, NEWLINE=tokenize.NEWLINE, COMMENT=tokenize.COMMENT, NL=tokenize.NL): + (sline, scol) = xxx_todo_changeme if type == NEWLINE: # A program statement, or ENDMARKER, will eventually follow, # after some (possibly empty) run of tokens of the form