Package android.system
Class PacketSocketAddress
- java.lang.Object
-
- java.net.SocketAddress
-
- android.system.PacketSocketAddress
-
- All Implemented Interfaces:
Serializable
public final class PacketSocketAddress extends SocketAddress
Packet socket address. Corresponds to Linux'sstruct sockaddr_ll.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description byte[]sll_addrHardware address.shortsll_hatypeARP hardware type.intsll_ifindexInterface index.bytesll_pkttypePacket type.shortsll_protocolProtocol.
-
Constructor Summary
Constructors Constructor Description PacketSocketAddress(int sll_ifindex, byte[] sll_addr)Constructs a new PacketSocketAddress suitable for sending to.PacketSocketAddress(short sll_protocol, int sll_ifindex)Constructs a new PacketSocketAddress suitable for binding to.PacketSocketAddress(short sll_protocol, int sll_ifindex, short sll_hatype, byte sll_pkttype, byte[] sll_addr)Constructs a new PacketSocketAddress.
-
-
-
Field Detail
-
sll_protocol
public short sll_protocol
Protocol. An Ethernet protocol type, e.g.,ETH_P_IPV6.
-
sll_ifindex
public int sll_ifindex
Interface index.
-
sll_hatype
public short sll_hatype
ARP hardware type. One of theARPHRD_*constants.
-
sll_pkttype
public byte sll_pkttype
Packet type. One of thePACKET_*constants, such asPACKET_OTHERHOST.
-
sll_addr
public byte[] sll_addr
Hardware address.
-
-
Constructor Detail
-
PacketSocketAddress
public PacketSocketAddress(short sll_protocol, int sll_ifindex, short sll_hatype, byte sll_pkttype, byte[] sll_addr)Constructs a new PacketSocketAddress.
-
PacketSocketAddress
public PacketSocketAddress(short sll_protocol, int sll_ifindex)Constructs a new PacketSocketAddress suitable for binding to.
-
PacketSocketAddress
public PacketSocketAddress(int sll_ifindex, byte[] sll_addr)Constructs a new PacketSocketAddress suitable for sending to.
-
-