1MACADDR(3) macaddr 1.0.1 MACADDR(3)
2
3
4
6 packet.link.macaddr - MacAddr module
7
9 Create an object to represent a MAC address. A MAC address is given ei‐
10 ther by a series of hexadecimal numbers or using the ":" notation. It
11 provides a mechanism for comparing this object with a regular string.
12
14 class MacAddr(builtins.str)
15 MacAddr address object
16
17 Usage:
18 from packet.link.macaddr import MacAddr
19
20 mac = MacAddr('E4CE8F589FF4')
21
22 The following expressions are equivalent:
23 mac == 'E4CE8F589FF4'
24 mac == 'e4ce8f589ff4'
25 mac == 'e4:ce:8f:58:9f:f4'
26
27
28 Methods defined here:
29 ---------------------
30
31 __eq__(self, other)
32 Compare two MAC addresses and return True if both are equal.
33
34 __ne__(self, other)
35 Compare two MAC addresses and return False if both are equal.
36
37 Static methods defined here:
38 ----------------------------
39
40 __new__(cls, mac)
41 Create new instance by converting input string into a persistent
42 representation of a MAC address.
43
45 No known bugs.
46
48 Jorge Mora (mora@netapp.com)
49
50
51
52NFStest 3.2 21 March 2023 MACADDR(3)