summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lorenzo Colitti <lorenzo@google.com> 2020-03-19 05:16:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-03-19 05:16:39 +0000
commitc2083f4503e325fb6b075aa7787c90ed91b93feb (patch)
tree23fd86774b1221f07f02c902e9e89b4d280696d6
parent96f8a65ee3a95a05591cfd5cb90d4238f51f97c4 (diff)
parent4920ee68a0ca2b9c7a7180fb7d9bb61100b73fdf (diff)
Merge "Document the arguments to SocketUtils.makePacketSocketAddress."
-rw-r--r--core/java/android/net/util/SocketUtils.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/net/util/SocketUtils.java b/core/java/android/net/util/SocketUtils.java
index e9ea99f84f90..696708408c22 100644
--- a/core/java/android/net/util/SocketUtils.java
+++ b/core/java/android/net/util/SocketUtils.java
@@ -66,6 +66,10 @@ public final class SocketUtils {
/**
* Make socket address that packet sockets can bind to.
+ *
+ * @param protocol the layer 2 protocol of the packets to receive. One of the {@code ETH_P_*}
+ * constants in {@link android.system.OsConstants}.
+ * @param ifIndex the interface index on which packets will be received.
*/
@NonNull
public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex) {
@@ -78,6 +82,9 @@ public final class SocketUtils {
/**
* Make a socket address that packet socket can send packets to.
* @deprecated Use {@link #makePacketSocketAddress(int, int, byte[])} instead.
+ *
+ * @param ifIndex the interface index on which packets will be sent.
+ * @param hwAddr the hardware address to which packets will be sent.
*/
@Deprecated
@NonNull
@@ -89,7 +96,12 @@ public final class SocketUtils {
}
/**
- * Make a socket address that packet socket can send packets to.
+ * Make a socket address that a packet socket can send packets to.
+ *
+ * @param protocol the layer 2 protocol of the packets to send. One of the {@code ETH_P_*}
+ * constants in {@link android.system.OsConstants}.
+ * @param ifIndex the interface index on which packets will be sent.
+ * @param hwAddr the hardware address to which packets will be sent.
*/
@NonNull
public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex,