aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_mac.py
blob: c9ee11e66587840b5f48b92e52536d01ee9645ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
  MAC Types

"""

from util import mactobinary


class VppMacAddress():
    def __init__(self, addr):
        self.address = addr

    def encode(self):
        return {
            'bytes': self.bytes
        }

    @property
    def bytes(self):
        return mactobinary(self.address)

    @property
    def address(self):
        return self.addr.address