Charles Chan
Committed by Charles Chan

Add IPv4 multicast MAC address/mask

Change-Id: Iaed31c0d5bc40305767c4d5be8aeeca1b9f67e6d
...@@ -22,9 +22,26 @@ import java.util.Arrays; ...@@ -22,9 +22,26 @@ import java.util.Arrays;
22 */ 22 */
23 public class MacAddress { 23 public class MacAddress {
24 24
25 + /**
26 + * Dummy MAC address.
27 + */
25 public static final MacAddress NONE = valueOf("a4:23:05:00:00:00"); 28 public static final MacAddress NONE = valueOf("a4:23:05:00:00:00");
29 + /**
30 + * All-zero MAC address.
31 + */
26 public static final MacAddress ZERO = valueOf("00:00:00:00:00:00"); 32 public static final MacAddress ZERO = valueOf("00:00:00:00:00:00");
33 + /**
34 + * Broadcast MAC address.
35 + */
27 public static final MacAddress BROADCAST = valueOf("ff:ff:ff:ff:ff:ff"); 36 public static final MacAddress BROADCAST = valueOf("ff:ff:ff:ff:ff:ff");
37 + /**
38 + * IPv4 multicast MAC address.
39 + */
40 + public static final MacAddress IPV4_MULTICAST = valueOf("01:00:5e:00:00:00");
41 + /**
42 + * IPv4 multicast MAC mask.
43 + */
44 + public static final MacAddress IPV4_MULTICAST_MASK = valueOf("ff:ff:ff:80:00:00");
28 45
29 private static final byte[] LL = new byte[]{ 46 private static final byte[] LL = new byte[]{
30 0x01, (byte) 0x80, (byte) 0xc2, 0x00, 0x00, 47 0x01, (byte) 0x80, (byte) 0xc2, 0x00, 0x00,
......