switch_impl: temporary fix to port_no type error

Somewhere in the PacketOut processing code of switch_impl, we're passing a
port instead of a port_no to real_send(). This is a temporary fix.
Block LLDP ethertype, as suggested by https://github.com/noxrepo/pox/pull/8#issuecomment-4634139
Merge pull request #8 from grwl/master

l2_learning: Don't forward bridge-filtered MAC addresses [Merge]

This also adds a "--transparent" option that forwards everything.

(Merged from pull request by grwl)
packet: Fix some LLDP packet parsing

Seems to just be that struct.parse() (which doesn't exist) was
called instead of struct.unpack().  No idea how long this has
existed.

Thanks to Masayoshi Kobayashi for pointing it out.
l2_learning: Fix typo from 9391541aaa
of_01: Fix for platforms without select.PIPE_BUF

This value is used for slicing up output chunks, but it's not
available on all platforms.  This patch looks for it where
PyPy sometimes hides it, and otherwise just uses a hardcoded
default value (which is compatible with POSIX).

The DeferedSender mechanism (of which this is part) is seldom
actually invoked (explaining why nobody noticed this before),
and will probably be removed once the ioworker stuff gets a
bit more mature.

This patch is based on one by apanda.
revent: Fix bug when removing multiple listeners

removeListeners() wouldn't actually remove more than one listener.
Fixed.
openflow: Add xid property to ErrorIn event

You could of course have accessed this using the_event.ofp.xid,
but it's such a useful property for error messages that I
figured a shortcut wouldn't hurt.
openflow: Add workaround for HP switches

HP switchies don't support barrier messages (which I am pretty
sure are not optional...), but POX's connection procedure relied
on them to decide when a connection was "up".  The result was
that POX wouldn't accept connections from HP switches.

This commit is a sort of ridiculous workaround.  POX still sends
a barrier request, but instead of just looking for the
corresponding barrier reply, it also will accept a corresponding
OpenFlow error message (i.e., with the same xid).  The error
will still be logged, but POX will accept the connection.
l2_learning: Minor cleanup
l2_learning: Don't try to drop nonexistent buffers

(Resolves issue #9)

l2_learning's drop() function is sometimes called simply to
make the switch consume a buffer by sending a packet_out. BUT,
this is called regardless of whether the switch buffered the
packet or not (i.e., if buffer_id is -1 or not). If there's no
buffer, there's no point in doing this to begin with AND the
switch will probably return an error, so in this case we just
shouldn't do it. :)
l2_learning: Don't try to flood unbuffered packets

This is similar to that raised in Issue #9.  If we want to
flood a packet, but it isn't buffered at the switch, we
no longer try.  We COULD try to flood it based on the data
we got from the packet_in, but it might be incomplete so
we just don't.
 Merging in pull request #11
 Clean graph.py up, this results in no functional changes
openflow.libopenflow: ofp_phy_port now overrides __hash__()

Not suppsed to override __eq__ without overriding __hash__ ;-)
openflow.libopenflow: and, fixing a syntax error

testing FTW
Merge branch 'master' into debugger