Merge "Switch to a single PacketSocketAddress constructor" am: 2d24f7a39e am: a357696c2f

am: 9ec43cc7fe

Change-Id: Id17253fbe7d22117dff5766ce5b50b4e446e5090
This commit is contained in:
Neil Fuller
2019-06-20 14:19:53 -07:00
committed by android-build-merger

View File

@@ -69,7 +69,10 @@ public final class SocketUtils {
*/
@NonNull
public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex) {
return new PacketSocketAddress((short) protocol, ifIndex);
return new PacketSocketAddress(
(short) protocol /* sll_protocol */,
ifIndex /* sll_ifindex */,
null /* sll_addr */);
}
/**
@@ -77,7 +80,10 @@ public final class SocketUtils {
*/
@NonNull
public static SocketAddress makePacketSocketAddress(int ifIndex, @NonNull byte[] hwAddr) {
return new PacketSocketAddress(ifIndex, hwAddr);
return new PacketSocketAddress(
(short) 0 /* sll_protocol */,
ifIndex /* sll_ifindex */,
hwAddr /* sll_addr */);
}
/**