'Initializes
port_eth can be True to use the MAC associated with the port by the
switch, None to use the \'dpid MAC\', or an EthAddr.'

def __init__(self, dpid, port, port_eth=None, auto_accept=False, install_flows=True, offer_timeout=None, request_timeout=None, total_timeout=None, discovery_timeout=None, name=None):

    self.auto_accept = auto_accept
    self.install_flows = install_flows
    if (name is None):
        self.log = log
    else:
        self.log = core.getLogger(name)
    if hasattr(dpid, 'dpid'):
        dpid = dpid.dpid
    self.dpid = dpid
    self.port_name = port
    self.port_eth = port_eth
    self._state = self.NEW
    self._start = None
    self.offers = []
    self.offer_xid = None
    self.ack_xid = None
    self.accepted = None
    self.requested = None
    self.bound = None
    self.total_timeout = (total_timeout or self.TOTAL_TIMEOUT)
    self.total_timer = None
    self.discover_timeout = (discovery_timeout or self.DISCOVER_TIMEOUT)
    self.discover_timer = None
    self.offer_timeout = (offer_timeout or self.OFFER_TIMEOUT)
    self.offer_timer = None
    self.request_timeout = (request_timeout or self.REQUEST_TIMEOUT)
    self.request_timer = None
    self._packet_listener = None
    self._try_start()
    if (self.state != self.INIT):
        self._listen_for_connection()
