public class KeepalivePacketData extends Object
ConnectivityManager.PacketKeepalive
API.Modifier and Type | Class and Description |
---|---|
static class |
KeepalivePacketData.InvalidPacketException |
Modifier and Type | Field and Description |
---|---|
byte[] |
data
Packet data.
|
InetAddress |
dstAddress
Destination IP address
|
byte[] |
dstMac
Destination MAC address.
|
int |
dstPort
Destination port
|
int |
protocol
Protocol of the packet to send; one of the OsConstants.ETH_P_* values.
|
InetAddress |
srcAddress
Source IP address
|
int |
srcPort
Source port
|
Modifier | Constructor and Description |
---|---|
protected |
KeepalivePacketData(InetAddress srcAddress,
int srcPort,
InetAddress dstAddress,
int dstPort,
byte[] data) |
Modifier and Type | Method and Description |
---|---|
static KeepalivePacketData |
nattKeepalivePacket(InetAddress srcAddress,
int srcPort,
InetAddress dstAddress,
int dstPort)
Creates an IPsec NAT-T keepalive packet with the specified parameters.
|
public final int protocol
public final InetAddress srcAddress
public final InetAddress dstAddress
public final int srcPort
public final int dstPort
public byte[] dstMac
public final byte[] data
protected KeepalivePacketData(InetAddress srcAddress, int srcPort, InetAddress dstAddress, int dstPort, byte[] data) throws KeepalivePacketData.InvalidPacketException
public static KeepalivePacketData nattKeepalivePacket(InetAddress srcAddress, int srcPort, InetAddress dstAddress, int dstPort) throws KeepalivePacketData.InvalidPacketException