Python: how to bitmask and compare mac address?
<p>I'm new to Python.</p>

<p>The following line of code extract dst mac and src mac from a Ethernet packet.</p>

<pre><code>dst, src, _eth_type = struct.unpack_from('!6s6sH', buffer(msg.data), 0)
</code></pre>

<p>As we know, mac address is of 6-byte. What I want to archive is to compare if the first 5 bytes of dst/src mac addresses equal. How to write python code for that?</p>
