summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/lib/mac.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ryu/lib/mac.py b/ryu/lib/mac.py
index 2dbf6e80..be4d7d60 100644
--- a/ryu/lib/mac.py
+++ b/ryu/lib/mac.py
@@ -14,6 +14,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+DONTCARE = '\x00' * 6
+BROADCAST = '\xff' * 6
+
+
+def is_multicast(addr):
+ return bool(ord(addr[0]) & 0x01)
+
+
def haddr_to_str(addr):
return ''.join(['%02x:' % ord(char) for char in addr[0:6]])[:-1]